RE: Retrieving Adapter information
RE: Retrieving Adapter information
- Subject: RE: Retrieving Adapter information
- From: Kirk Haderlie <email@hidden>
- Date: Wed, 20 Aug 2003 09:09:14 -0700
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.
-----Original Message-----
From: Quinn [
mailto:email@hidden]
Sent: Wednesday, August 20, 2003 1:00 AM
To: 'email@hidden'
Subject: Re: Retrieving Adapter information
At 11:44 -0700 18/8/03, Kirk Haderlie wrote:
>
We are developing a Cross-Platform sockets class and need to get the
>
adapter information under OS X, how can this be done?
What are you actually using this information for? There are a
variety of ways to get at the interface list on a Mac OS X system,
and the right API to choose depends on what your high-level goal is.
Specifically, what's your position on the following?
1. Are you interested in all of the networking hardware on the
machine, or just the list of interfaces that are active as far as
TCP/IP is concerned?
2. Do you care only about IP addresses, or do you need to get the
hardware addresses as well? If the latter, what do you want to do
about interfaces, like PPP, that have no hardware addresses? What
are you using the hardware addresses for? [For example, getting a
list of hardware addresses for networking purposes has a different
solution than getting a single, stable, hardware address for copy
protection or licence management purposes.]
3. Do you want to receive notification when the interface list
changes? This is generally a *really* good idea, because Mac OS X
users expect their software to continue to work in a dynamic TCP/IP
environment.
If you can fill us in on the details we can provide appropriate guidance.
Share and Enjoy
--
Quinn "The Eskimo!" <
http://www.apple.com/developer/>
Apple Developer Technical Support * Networking, Communications, Hardware
_______________________________________________
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.
_______________________________________________
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.