Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. NIC Detection

NIC Detection

Scheduled Pinned Locked Moved The Lounge
questionsysadmin
10 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    realJSOP
    wrote on last edited by
    #1

    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

    J D S G 4 Replies Last reply
    0
    • R realJSOP

      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

      J Offline
      J Offline
      Jim Crafton
      wrote on last edited by
      #2

      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

      R 1 Reply Last reply
      0
      • R realJSOP

        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

        D Offline
        D Offline
        Dan Neely
        wrote on last edited by
        #3

        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

        R 1 Reply Last reply
        0
        • J Jim Crafton

          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

          R Offline
          R Offline
          realJSOP
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • D Dan Neely

            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

            R Offline
            R Offline
            realJSOP
            wrote on last edited by
            #5

            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

            J D 2 Replies Last reply
            0
            • R realJSOP

              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

              J Offline
              J Offline
              John M Drescher
              wrote on last edited by
              #6

              In 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

              1 Reply Last reply
              0
              • R realJSOP

                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

                S Offline
                S Offline
                StevenWalsh
                wrote on last edited by
                #7

                I think there is a property with WMI where you can check if it is TCP/IP, this should exclude that from the list

                1 Reply Last reply
                0
                • R realJSOP

                  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

                  D Offline
                  D Offline
                  Dan Neely
                  wrote on last edited by
                  #8

                  Odd, XPs always defaulted to using the real NIC automatically for me.

                  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

                  1 Reply Last reply
                  0
                  • R realJSOP

                    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

                    G Offline
                    G Offline
                    Graham Bradshaw
                    wrote on last edited by
                    #9

                    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.

                    J 1 Reply Last reply
                    0
                    • G Graham Bradshaw

                      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.

                      J Offline
                      J Offline
                      Jeff Dickey
                      wrote on last edited by
                      #10

                      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

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups