Re: Porting Winsock DHCP Server; is OS/X ignoring Broadcast UDP in recvall()?
Re: Porting Winsock DHCP Server; is OS/X ignoring Broadcast UDP in recvall()?
- Subject: Re: Porting Winsock DHCP Server; is OS/X ignoring Broadcast UDP in recvall()?
- From: Peter Sichel <email@hidden>
- Date: Fri, 1 Feb 2008 19:26:57 -0500
On Feb 1, 2008, at 5:46 PM, Hostile Fork wrote:
Though I'll need to figure out a good cross-platform way to get the
hardware ethernet address from pcap's device handle. I suppose I
could send my own IP address a packet, capture it, and then read the
data out of the header...but that seems roundabout! Better ideas
appreciated...
I'm not too clear about cross platform mechanisms since
this is basically a function of the driver at the data link
layer.
In most UNIX systems, you can use Sysctl to get the
NET_RT_IFLIST and read it from there as described
in Stevens "UNIX Network Programming"
CTL_NET.AF_ROUTE.0.AF_INET.NET_RT_IFLIST.0
This might at least cover other UNIX like systems
(versus the System Configuration Framework
which is Mac OS X only).
- Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden