NIC Detection
-
I have to write code that retrieves MAC addresses of all the NICs in the system (I know *how* to do this). My question is this - is it safe to assume that any NICs built into a motherboard will be the device 0, with add-on wireless (like in some laptops) would be 1, and any USB-based NICs would be 2 and so on? Also, my 1394 port is seen as a network adapter. (How weird is that?) Is there a way to tell if a given NIC is NOT an add-on via PCMCIA, USB, and 1394?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I have to write code that retrieves MAC addresses of all the NICs in the system (I know *how* to do this). My question is this - is it safe to assume that any NICs built into a motherboard will be the device 0, with add-on wireless (like in some laptops) would be 1, and any USB-based NICs would be 2 and so on? Also, my 1394 port is seen as a network adapter. (How weird is that?) Is there a way to tell if a given NIC is NOT an add-on via PCMCIA, USB, and 1394?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001John Simmons / outlaw programmer wrote:
Also, my 1394 port is seen as a network adapte
Well the epson printer (connected via USB) I have shows up as a removable drive on XP!
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
-
I have to write code that retrieves MAC addresses of all the NICs in the system (I know *how* to do this). My question is this - is it safe to assume that any NICs built into a motherboard will be the device 0, with add-on wireless (like in some laptops) would be 1, and any USB-based NICs would be 2 and so on? Also, my 1394 port is seen as a network adapter. (How weird is that?) Is there a way to tell if a given NIC is NOT an add-on via PCMCIA, USB, and 1394?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001John Simmons / outlaw programmer wrote:
Also, my 1394 port is seen as a network adapter. (How weird is that?)
by design. RFC2734/3146 allow you to run ethernet over it. It never caught on though and Vista/server 2k8 both removed support for it.
You know, every time I tried to win a bar-bet about being able to count to 1000 using my fingers I always got punched out when I reached 4.... -- El Corazon
-
John Simmons / outlaw programmer wrote:
Also, my 1394 port is seen as a network adapte
Well the epson printer (connected via USB) I have shows up as a removable drive on XP!
¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog
So do my internal SATA drives (also in XP).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
John Simmons / outlaw programmer wrote:
Also, my 1394 port is seen as a network adapter. (How weird is that?)
by design. RFC2734/3146 allow you to run ethernet over it. It never caught on though and Vista/server 2k8 both removed support for it.
You know, every time I tried to win a bar-bet about being able to count to 1000 using my fingers I always got punched out when I reached 4.... -- El Corazon
I wish they'd remove support for it in XP. Every time I do a reinstall of the OS, I have to disable the 1394 adapter and enable the actual NIC.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I wish they'd remove support for it in XP. Every time I do a reinstall of the OS, I have to disable the 1394 adapter and enable the actual NIC.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001In the past I have had a similar annoyance under linux with the 1394 adapter. The good thing is you can either not build 1394 nic support into the kernel or blacklist the module...
John
-
I have to write code that retrieves MAC addresses of all the NICs in the system (I know *how* to do this). My question is this - is it safe to assume that any NICs built into a motherboard will be the device 0, with add-on wireless (like in some laptops) would be 1, and any USB-based NICs would be 2 and so on? Also, my 1394 port is seen as a network adapter. (How weird is that?) Is there a way to tell if a given NIC is NOT an add-on via PCMCIA, USB, and 1394?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001I think there is a property with WMI where you can check if it is TCP/IP, this should exclude that from the list
-
I wish they'd remove support for it in XP. Every time I do a reinstall of the OS, I have to disable the 1394 adapter and enable the actual NIC.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
I have to write code that retrieves MAC addresses of all the NICs in the system (I know *how* to do this). My question is this - is it safe to assume that any NICs built into a motherboard will be the device 0, with add-on wireless (like in some laptops) would be 1, and any USB-based NICs would be 2 and so on? Also, my 1394 port is seen as a network adapter. (How weird is that?) Is there a way to tell if a given NIC is NOT an add-on via PCMCIA, USB, and 1394?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001John Simmons / outlaw programmer wrote:
Is there a way to tell if a given NIC is NOT an add-on via PCMCIA, USB, and 1394?
I don't think so. Some laptops have the "built-in" network adapter hanging off an (internal) USB connection.
-
John Simmons / outlaw programmer wrote:
Is there a way to tell if a given NIC is NOT an add-on via PCMCIA, USB, and 1394?
I don't think so. Some laptops have the "built-in" network adapter hanging off an (internal) USB connection.
Anytime you're on a notebook (or one of those "slimline desktops" that's basically a notebook on its side, without a directly-attached monitor/keyboard), you're in Dante's Seventh Ring as far as being able to make reasonable guesses about what's where how...one of my clients went on an M&A binge last year and now they're "managing" 27(!) different laptop models...it's going to take a couple of years to get that flushed down to something that a finite number of support people can actually handle... and with many vendors doing their own "especially for X" versions of Windows (XP/2003/Vista), you can't even have a single system image... I'm all for software diversity and really wish we had more of it. But attempting to centralize *hardware* support in a middling-to-large business which was a bunch of small businesses a year ago causes more problems than it solves. I've already recommended to these guys that, next time they throw their checkbook around, they not only leave the previous IT group in place, but they add to it so it can *liaise with* (the new) corporate. Use whatever you want on the desktop, as long as it will take a standard OS image (Windows, *n?x, Mac). But having no more than a half-dozen notebooks corporate-wide is a good target to shoot for (especially if they're the ones that get high marks from both users and support folks). There are some vendors (*cough*Dell*cough*) I'd certainly not deal with again by choice - because I shouldn't have to play Forrest Gump whenever I get handed somebody's notebook. It's *not* a box of chocolates!
Jeff Dickey Seven Sigma Software and Services Phone/SMS: +65 8333 4403 Yahoo! IM: jeff_dickey MSN IM: jeff_dickey at hotmail.com ICQ IM: 8053918 Skype: jeff_dickey