Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Apple's "DVD or CD Sharing" protocol work?

Macs have a "DVD or CD Sharing" service for remote access to optical drives. (Apple also provides Windows software that implements the sharing half only, no reading.) I want to use the service from Linux, to read an optical disk on a Mac. But I can't find any software or even much information about the protocol. I thought I would document what I've found here, and see what others can figure out.

My friend enabled "DVD or CD Sharing" on his Mac. I can see the service via zeroconf (using Avahi). Notably:

Service Type: _odisk._tcp
Address: <hostname>.local/192.168.1.115:49152

Searching for "_odisk._tcp", I found a mention in the "Mac Hacker's Handbook". You can find it on pages 69 and 70. I don't have the book, so I used Amazon's preview. It shows some examples of an HTTP-based protocol.

However, I can't make a successful request. The first time I tried to "GET /" on the port given by zeroconf, I got "401 Unauthorized". I asked my friend to turn off security. Then, "GET /" returned "404 Not Found". I tried the path from the first listing in the book, "GET /ods-ask-status?askID=2", and got "406 Not Acceptable". So I know I'm on to something. However, I can't get past the 406. I have been entering the HTTP requests directly (with nc), and tried it exactly as in the trace in the book (only changing the host), as well as entering all sorts of Accept: and Accept-*: headers. Since the trace in the Amazon preview is hard to read, I have tried other interpretations. No luck. (If someone has the book, maybe they can type the listing.)

There is no other documentation for the protocol that I can find. At this point, I should just get two computers using DVD or CD Sharing and sniff them, but that would be hard for me to set up right now. So I'm offering the problem here. Maybe you can get famous by writing the open source implementation of this protocol. ;-)

like image 881
Andrew Avatar asked Feb 18 '11 21:02

Andrew


1 Answers

There is a server implementation available on github, which seems to do the server side of the job: https://github.com/nightwend/ODSServer

The protocol seems to be based on HTTP range requests to access the disk image; however, it seems to require particular User-Agent: headers to work (yuck!)

An updated version with support to announce the CD/DVD from within the server (with additional information) also seems to exist: https://github.com/rcknr/ODSServer/tree/dev

like image 120
Marcel Waldvogel Avatar answered Sep 28 '22 02:09

Marcel Waldvogel