Re: Detecting 2 Ethernet inbuilt
Re: Detecting 2 Ethernet inbuilt
- Subject: Re: Detecting 2 Ethernet inbuilt
- From: Mark Thomas <email@hidden>
- Date: Tue, 01 Nov 2005 23:24:07 +0000
- Organization: Coderus Ltd
Hi,
I guess one point which I forgot to mention is that I need to know this
information is that we have a multimedia installation process which shows
which cable is placed where. So Prior systems that just had 1 Ethernet port
and live was easy, but now with new PowerMac's not so.
Now if the system has 2 inbuilt Ethernet ports I need to show a different
animation and show the user to insert the Ethernet cable into port 1.
Now even though I have told the user to insert into Ethernet port 1, I
would like my configure code to deal if they have inserted it into Port 2
and so find out which Ethernet port they have inserted into. I also want to
keep user interaction to a minimum.
Now once I have know which Ethernet Port I am using the SystemConfig
framework, via the MoreSCF code base and that code doesn't care which
Ethernet Interface its working.
Its just the bits in the beginning I need to know this.
Thanks
Mark.
> Message: 5
> Date: Mon, 31 Oct 2005 15:54:14 -0800
> From: Josh Graessley <email@hidden>
> Subject: Re: Detecting 2 Ethernet inbuilt
> To: Macintosh Network Programming <email@hidden>
> Message-ID: <email@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
>
> What exactly are you trying to do?
>
> There is an elaborate system that handles interface naming. This is
> implemented in the IntefaceNamer plugin for configd. It has a few
> heuristics. This code will always set the built-in interface name to
> en0. In the case that there are two built-in ethernet ports, I
> believe they will be en0 and en1, but I'm not certain. At any rate,
> the interface name will not change. When a PCI card or other devices
> that implements an ethernet card appears for the first time, the
> interface namer will allocate an unused name for that interface. The
> interface namer will remember the MAC address for ethernet ports so
> the name can be persistent even if the PCI or PC Card is removed and
> later inserted again.
>
> If you are editing the network settings, you should be going through
> the right channels to do that. You probably need to be modifying the
> network preferences. I believe there is an API to do that by
> modifying the persistent store. The model of this persistent store is
> documented here:
>
> <http://developer.apple.com/documentation/Networking/Conceptual/
> SystemConfigFrameworks/SC_UnderstandSchema/chapter_4_section_2.html>
>
> In general, your code should not care whether or not a specific
> interface is a built-in interface.
>
> -josh
>
> On Oct 31, 2005, at 3:30 PM, Mark Thomas wrote:
_______________________________________________
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