Re: [tcpdump-workers] Obtaining MAC on OSX using AF_LINK

2011-01-02 Thread Guy Harris
On Jan 2, 2011, at 2:33 PM, Guy Harris wrote: >> It seems that the pacap_addr.sa_data should be of type (struct sockaddr_dl*) > > Yes. As per later in my message, that's actually "No"; I missed the "sa_data" part. *addr* should be cast to something of type (struct sockaddr_dl *); sa_data in a

Re: [tcpdump-workers] Obtaining MAC on OSX using AF_LINK

2011-01-02 Thread Guy Harris
On Dec 30, 2010, at 5:00 PM, Mathew Rowley wrote: > I am trying to understand how to get the MAC address when a pcap_addr family > is of type AF_LINK. ...on OS X, which is relevant here. AF_LINK is a BSDism, and only OSes that inherit AF_LINK from whatever flavor of BSD introduced it support

[tcpdump-workers] Obtaining MAC on OSX using AF_LINK

2010-12-30 Thread Mathew Rowley
I am trying to understand how to get the MAC address when a pcap_addr family is of type AF_LINK. It seems that the pacap_addr.sa_data should be of type (struct sockaddr_dl*) but then the sockaddr_dl sdl_alen is of variable size (I was expecting), and LLADDR doesnt help much. Any insight? Here i