Re:How does Starbucks knows how to grab my MAC Address?
by larrywallace on Sunday December 14, 2014 @07:08PM
(#8750065)
Yes, I am connected to the store's wifi. Once I am on their network, how do they actually grab it? What headers names do they inspect for, etc. I'd like to actually know the implementation details and code sample. I looked everywhere on Stackeroverflow and can't find anyone who has done this.
[ Parent
| on HN ]
Re:How does Starbucks knows how to grab my MAC Address?
by Rondom on Sunday December 14, 2014 @07:43PM
(#8750163)
Since you are connected to their network they know your MAC.
What they will likely do is take your IP and look to which MAC their DHCP-Server has assigned that IP to. There are other possibilities though, but they are more complicated (using ARP-cache or requests, doing a raw packet dump at the webserver).
If you want learn more, I think you could read a bit about the different layers first, and then read about how ethernet, IP/ARP and DHCP work. There are likely no "headers" (I assume you mean HTTP-headers) they inspect.
Re:How does Starbucks knows how to grab my MAC Address?
by grubles on Sunday December 14, 2014 @07:33PM
(#8750140)
A MAC address is part of their network once you attempt to connect to their wifi. The MAC address identifies your physical network adapter to the router. Once your network adapter is known by the router, the router can assign your adapter an Internet Protocol (IP) address.
Note: the above is a 10,000 foot observation of what happens.
More in-depth: https://en.wikipedia.org/wiki/MAC_address