As you may know, Apple announced AirPlay which allow iTunes and iPhone/iPad to connect to a remote display to show media. Actually, few years ago, apple already implemented similar technology into AirPort express to play music from a remote iTunes. How this technology implemented? There are few documents really describe this very well, it may named as DACP or RAOP or something. Let’s discover it a little bit through some actual packets regarding an iTunes playing an MP3 song though a Airport Express audio link.
Below is the packets (hided some packets for easier reading). In the beginning, iTunes discovered existence of an AirPort express smartly through a bundle of MDNS (Multicast DNS) packets over udp port 5353. Then, a TCP connection to 5000 port of AirPort Express was established and the actual communication is very similar to RTSP.
we can look into a SETUP request in RTSP sequence to see further info exchanged.
and below is the relative response packet
The session was successfully setup. UDP 6002 port was used to be a RTP timing flow and UDP 6001 port was used to be a control session; In the mean while, the Audio payload were to be transmitted through a flow over UDP port 6000 in the format of RTP dynamic payload.
The interactive process is very clean and elegant. Usage of MDNS is a smart way to discover one or many AirPlay devices in the network. Enjoy it.