LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the NIC number and description by program

I may need to choose one of the NIC. Thanks.

0 Kudos
Message 1 of 7
(4,500 Views)

Look under the "Data Communication >> Protocols >> TCP" palette and you'll find two VI's called "IP to String" and "String to IP". The combination of these will allow you to find all IP addresses or names of the network adapters on your computer. (Note: you can right click on String to IP and select "Multiple Outputs" which displays all available network adapters).

 

Coincidentally, this was one of the questions in the head-to-head Coding Challenge at NIWeek this year. 😉

 

If you need the description, you must make DLL calls into OS libraries.

 

20895i31CA7A2BBE797DA3

Message 2 of 7
(4,495 Views)

The number of the NIC is the MAC adress, or the Physical Address. I have a trick to do that if your problem is not solved.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 3 of 7
(4,489 Views)

Coq Rogue is right... I didn't answer your question at all! Unfamiliar with the term "NIC number", I assumed IP rather than MAC address. A simple Google search on my part would have saved some embarrassment! Smiley Surprised

 

OK, so to find a MAC address, the routines you use are dependent upon the OS of your target computer. Here are some links that give several methods for different targets:

 

http://forums.ni.com/t5/LabVIEW/Getting-Mac-Address-reliably-on-windows/m-p/1026738?requireLogin=Fal...

http://decibel.ni.com/content/docs/DOC-9978

http://forums.ni.com/t5/Real-Time-Measurement-and/Get-mac-address-of-cRIO/m-p/707371

Message 4 of 7
(4,480 Views)

Use the system exec to run an ipconfig command then parse the output.

 

========================
=== Engineer Ambiguously ===
========================
Message 5 of 7
(4,471 Views)

Hi Coq Rouge,

 

May I know how you do it.

 

I need to get the info as below. The number 1, 2 and 3 with their description.

 

1. \Device\NPF_{..................} (Realtek RTL8168C/8111C PC
I-E Gigabit Ethernet NIC)
2...............

3...............

0 Kudos
Message 6 of 7
(4,392 Views)

 



 

0 Kudos
Message 7 of 7
(3,484 Views)