• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Detecting 2 Ethernet inbuilt
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting 2 Ethernet inbuilt


  • Subject: Re: Detecting 2 Ethernet inbuilt
  • From: Josh Graessley <email@hidden>
  • Date: Mon, 31 Oct 2005 15:54:14 -0800


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:

The reason why I care :-), is that I need to configure up the Ethernet Port
with the right network settings which I'm presently doing. Correctly or
Incorrectly my code was working fine, while there was one inbuilt Ethernet
port as you can find that easily (Either en0 or use use the Port string
"In-built Ethernet")


But now with at least >=2 there I need to find the right Ethernet port now,
as the user might not have put the Ethernet in absolutely the right Ethernet
port. (Also adding in a PCI card like you say will also work better, also
makes me wonder what get's reported back in IORegistry land, does this use
its own drivers or the Apple IUniNet Ethernet model ?)


Thanks
Mark.

  Does anybody know how you detect the 2xEthernet ports which are
inbuilt in
the new Tower systems, and which corresponds to port 1 and port 2
from what
I have seen from the technical diagrams on Apple support.

  I can guess that I can iterate over the IOEthernetInterface in the
IORegistry, but how to do you know which is which and maybe in the
future is
others get thrown in for good measure, if it clear but I don't have
access
to this machine to play with :-(.

Why do you care if they are built-in? By adding PCI cards you can add
multiple Ethernet ports to any recent PowerMac, and if your code
handles that case correctly, it will handle the new PowerMacs as well.


Ben

--

<http://artins.org/ben> | KB1FMP

"Love is an Epic-level challenge." -- Durkon





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com


This email sent to email@hidden

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Re: Detecting 2 Ethernet inbuilt (From: Mark Thomas <email@hidden>)

  • Prev by Date: Re: Detecting 2 Ethernet inbuilt
  • Previous by thread: Re: Detecting 2 Ethernet inbuilt
  • Index(es):
    • Date
    • Thread