A toroid is essentially a solenoid that has been bent into a circle - it looks like a doughnut. Tipler discusses the magnetic field inside a torroid. This actually is an important geometry since some charged-particle accelerators and also some prototype fusion reactors use torroidal magnets. Let's look at the 'long, densely wound solenoid' from the perspective of Ampere's law. To apply Ampere's law, we choose a rectangular path.
L is inside and parallel to the axis of the solenoid.
The opposite side is far outside the solenoid where for an infinite solenoid the field is zero and for a finite solenoid we expect the field to be vanishingly small. The field is necessarily perpendicular to the other two sides of the rectangle and do not contribute to the path integral. Inside a long, densely wrapped solenoid, the magnetic field is constant. This is a useful and important result. Our goal is to develop the framework with which we can deduce the electric and magnetic fields present in any given system of charges and currents.