Exporting iPod Touch library
The only means I have ever found of doing this is third-party software. I have used Senuti for this, and can confirm that it works.

The current version of Senuti: http://www.fadingred.com/senuti/. The free trial version allows you to restore up to 1000 songs. There is also a fully-free version from 2008 [MD5 (Senuti.0.52.dmg) = e84ebf4614ded95c53dc750492297c87] at http://wstein.org/senuti/, but though the source code is available (there and at SourceForge), it has not been maintained, and I have not confirmed that it still works.
(You can get an older version from the developer, too.)

There is also TouchCopy: http://www.wideanglesoftware.com/touchcopy. It appears to be very complete but is expensive, and the trial version is more limiting than is that of Senuti.