I'm also trying to reverse engineer the iTunes sharing protocol so I can have a linux box share its collection. At first glance it doesn't seem trivial. It looks like if you share your music collection iTunes enables a built-in web server that runs on port 3689. This web server is complete with HTTP basic authentication and gzip support. For instance, telnet to localhost on port 3689 and try "GET /content-codes HTTP/1.0" and you'll get a listing.

From what I understand the first real connection goes something like this: Your iTunes client connects to an iTunes server and says "Tell me what you know about the songs you have" and the iTunes server responds with a list of the properties for each song. For instance "daap.songcomposer" and "dmap.listingitem" and then it gives a key to map that property to such as "ascpmcna" for the composer.

The problem I'm having is decoding the content and finding the field delimiters.

Feel free to email me at the provided address (rands@geoffeg.org), I'd love to have someone to work with on this.

Geoffeg