Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If anyone is interested in figuring out how AirDrop works .. I registered OpenAirDrop.org a long time ago. I would be happy to point it to a github site.


AirDrop uses mDNS and link-local ipv6

ifconfig shows that a new network interface called p2p[1-N] is created when AirDrop is opened. For instance:

p2p1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 ether 12:9a:dd:a9:9f:1e inet6 fe80::109a:ddff:fea9:9f1e%p2p1 prefixlen 64 scopeid 0x8 media: autoselect status: active

Sniffing traffic on this interface shows mDNSv6 packets being sent to ff02::fd port 5353. Containing the strings "_airdrop", your machine name and so on.

sudo tcpdump -ni p2p1 Password: tcpdump: WARNING: p2p1: no IPv4 address assigned tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on p2p1, link-type EN10MB (Ethernet), capture size 65535 bytes 01:56:41.647582 IP6 fe80::109a:ddff:fea9:9f1e.5353 > ff02::fb.5353: 0- [0q] 6/0/3 (Cache flush) SRV MacBook-Air.local.:57829 0 0, (Cache flush) TXT "cname=MacBook Air" "phash=MvwrscY0f8Bc5+f5vR+ncIthkl8=", PTR _airdrop._tcp.local., PTR ea4be4d626af._airdrop._tcp.local., (Cache flush) PTR MacBook-Air.local., (Cache flush) AAAA fe80::109a:ddff:fea9:9f1e (365) 01:56:41.647657 IP6 fe80::109a:ddff:fea9:9f1e > ff02::fb: frag (0|1232) 5353 > 5353: 0- [0q] 1/0/0 (Cache flush) NULL[|domain] 01:56:41.647675 IP6 fe80::109a:ddff:fea9:9f1e > ff02::fb: frag (1232|1232) 01:56:41.647686 IP6 fe80::109a:ddff:fea9:9f1e > ff02::fb: frag (2464|1232) 01:56:41.647698 IP6 fe80::109a:ddff:fea9:9f1e > ff02::fb: frag (3696|1232) 01:56:41.647704 IP6 fe80::109a:ddff:fea9:9f1e > ff02::fb: frag (4928|1232) 01:56:41.647710 IP6 fe80::109a:ddff:fea9:9f1e > ff02::fb: frag (6160|1050)

The MAC address of my Airport card in this machine is: 10:9a:dd:a9:9f:1e

Wikipedia says this about fe80::/10

fe80::/10 — Addresses in the link-local prefix are only valid and unique on a single link. Within this prefix only one subnet is allocated (54 zero bits), yielding an effective format of fe80::/64. The least significant 64 bits are usually chosen as the interface hardware address constructed in modified EUI-64 format. A link-local address is required on every IPv6-enabled interface—in other words, applications may rely on the existence of a link-local address even when there is no IPv6 routing. These addresses are comparable to the auto-configuration addresses 169.254.0.0/16 of IPv4.

[edit] and for all of those who claim that AirDrop uses some proprietary mode on the Airport card, read this:

http://hints.macworld.com/article.php?story=2011091321364956...

And ask yourself how that supposition could possibly be true when AirDrop can be made to work on Ethernet cards.


Thanks for your investigation. Regarding the proprietary mode Apple claims to be required, I guess this mode allows an AirDrop link to be established without disassociating from the (infrastructure mode) WiFi base station by switching between the two links quickly enough. Obviously Ethernet has no such limitation. Indeed, in my opinion, AirDrop is more useful over Ethernet than WiFi.


Multi-mode WiFi drivers became the norm less than 10 years ago. The trick here may be getting all the devices involved in a given AirDrop session on the same channel.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: