Re: Retrieving Adapter information
Re: Retrieving Adapter information
- Subject: Re: Retrieving Adapter information
- From: "Justin C. Walker" <email@hidden>
- Date: Wed, 20 Aug 2003 10:19:28 -0700
On Wednesday, August 20, 2003, at 09:09 AM, Kirk Haderlie wrote:
Quinn,
Our goal is to get the IP address and MAC address for each adapter.
These
are being used has a way to identify network interfaces which can be
used to
communicate on the network. I ended up pulling code from ifconfig
which
seems to work well. Where could I find the documentation on the
sysctl used
in ifconfig? I lifted the code not understanding what exactly the
sysctl
call was returning. Where does the detailed information on this kind
of
information live? The man pages do not do it justice. As you can
tell I am
not a networking expert. I am just doing the port to OS X. We will be
using BSD sockets. Any documentation you could point me to would be
great.
The best documentation for the BSD networking APIs is still Stevens's
"Unix Network Programming, v1, 2nd Ed", Prentice Hall. He goes into
detail about the kind of thing you are interested in (cf. Ch. 17 on
Routing Sockets).
You might also look at "man getifaddrs" and see if that helps.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | Some people have a mental
| horizon of radius zero, and
| call it their point of view.
| -- David Hilbert
*--------------------------------------*-------------------------------*
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.