Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Porting Winsock DHCP Server; is OS/X ignoring Broadcast UDP in recvall()?



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:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden
References: 
 >Re: Porting Winsock DHCP Server; is OS/X ignoring Broadcast UDP in recvall()? (From: "Hostile Fork" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.