Interaction of interplanetary shocks and rotational discontinuities with the Earth's bow shock