Confinement of semiflexible polymers