LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Find NetMask using CVI

Hi,

 

I'm trying to create a function that tries to decide which of the connected interfaces are a match to a device that is connected to the computer.

The function gets the device IP and should return the suitable interface to use.

After getting the connected interface, I'm sending the data to the device over telnet, so the device can send back to the connected interface UDP packets.

 

So, I'm using GetAllTCPaddresses to get the ip addresses of the interfaces, and I need the netmask to decide which interface to use.

To make a long story short - I need a way to discover the interfaces ip address and netmask.

 

Thanks

 

0 Kudos
Message 1 of 2
(2,642 Views)

Hello,

Unfortunately there are no built in functions in the CVI libraries to do that.

You would have to use some external library or call ipconfig.exe and parse the data.

I found this example that may be helpful.

 

Jacob R. | Applications Engineer | National Instruments

0 Kudos
Message 2 of 2
(2,620 Views)