DAAP notes mark 1
As you know Bob, Apple today introduced iTunes 4, with two significant enhancements: Music Sharing via Rendezvous, and an online Music Store.
I suspect lots of people will be looking at how the store works, to enable non-Maccies to take advantage of it, but I want to look at the Music Sharing first.
My iBook is still unhappy, but Ken was kind enough to send me some dumps to look over.
Discovery is via zeroconf/mDNS/Rendezvous queries for the _daap._tcp service. After that, communication is via the DAAP on TCP port 3689. DAAP is essentially HTTP.
A typical request header looks like
GET /server-info HTTP/1.1 Host: 10.0.1.7 Accept: */* User-Agent: iTunes/4.0 (Macintosh; N; PPC) Client-DAAP-Version: 1.0 Accept-Encoding: gzip
with the matching response
HTTP/1.1 200 OK Date: Tue, 29 Apr 2003 04:02:29 GMT DAAP-Server: iTunes/4.0 (Mac OS X) Content-Type: application/x-dmap-tagged Content-Length: 118 Content-Encoding: gzip
Some things to note it sure looks like HTTP; until the actual streaming, all the responses are Content-Type application/x-dmap-tagged and Content-Encoded gzip; "dmap" will appear later also. There's a DMAP that's the DECT Multimedia Access Profile that's at least in the same ballpark, but doesn't seem to be related.
The x-dmap-tagged data looks a lot like the iPod/iTunes database format, unsurprisingly.
The actual pre-streaming requests are
- /server-info
- /content-codes
- /login
- /update?session-id=4409&revision-number=1
- /databases?session-id=4409&revision-number=3
- /databases/32/items?type=music&meta=dmap.itemid, dmap.itemname, dmap.itemkind, dmap.persistentid, daap.songalbum, daap.songartist, daap.songbitrate, daap.songbeatsperminute, daap.songcomment, daap.songcompilation, daap.songcomposer, daap.songdateadded, daap.songdatemodified, daap.songdisccount, daap.songdiscnumber, daap.songdisabled, daap.songeqpreset, daap.songformat, daap.songgenre, daap.songdescription, daap.songrelativevolume, daap.songsamplerap.songsize, daap.songstarttime, daap.songstoptime, daap.songtime, daap.songtrackcount, daap.songtracknumber, daap.songuserrating, daap.songyear, daap.songdatakind, daap.songdataurl, com.apple.itunes.norm-volume&session-id=4409&revision-number=3
- /databases/32/containers?meta=dmap.itemid, dmap.itemname, dmap.persistentid, com.apple.itunes.smart-playlist&session-id=4409&revision-number=3
- /databases/32/containers/1861/items?type=music&meta=dmap.itemkind, dmap.itemid, dmap.containeritemid&session-id=4409&revision-number=3
- /databases/32/containers/3692/items?type=music&meta=dmap.itemkind, dmap.itemid, dmap.containeritemid&session-id=4409&revision-number=3
- /databases/32/containers/3894/items?type=music&meta=dmap.itemkind, dmap.itemid, dmap.containeritemid&session-id=4409&revision-number=3
- /databases/32/containers/3897/items?type=music&meta=dmap.itemkind, dmap.itemid, dmap.containeritemid&session-id=4409&revision-number=3
- /databases/32/containers/3925/items?type=music&meta=dmap.itemkind, dmap.itemid, dmap.containeritemid&session-id=4409&revision-number=3
- /update?session-id=4409&revision-number=3&delta=3
the final stream request looks like
GET /databases/32/items/1553.mp3?session-id=4409 HTTP/1.1 Host: 10.0.1.7 Cache-Control: no-cache Accept: */* x-audiocast-udpport:49154 icy-metadata:1 User-Agent: iTunes/4.0 (Macintosh; N; PPC) connection: close
Note the audiocast and icecast headers. The stream response is somewhat puzzling.
HTTP/1.1 200 OK Date: Tue, 29 Apr 2003 04:02:59 GMT DAAP-Server: iTunes/4.0 (Mac OS X) Content-Type: application/x-dmap-tagged Content-Length: 1696740 Accept-Ranges: bytes
It still claims to be x-dmap-tagged, but the content this time is clearly just the mp3 stream
More detailed dumps are available.
2003-04-28 22:36:00 | Comments (3) | TrackBack (0) | Computers::Macintosh
Anonymous
jtl and I have been poking at Apple's recently unveiled iTunes 4. I was working on something like what he posted here, but Todd is far more efficient at this sort of thing than I am. By the time my notes covered the first request/response - his note
2003-04-29 13:41:00