The region of a planet's space around the planet where the planet's magnetic field dominates over the planetary wind. The magnetosphere is shaped by the interaction of the planet's magnetic field with the solar wind, which is composed of charged particles ejected from the sun.