Magnetic and electric fields in the magnetosheath