LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

System Configuration to get and Change "localhost" IP Address

Is there a way to use System Configuration to get and set the "localhost" IP Address? 

 

I'm attempting to create a tool to collect all networked items (including localhost), and then allow the use to change the IP address (or randomly set them all). 

 

Right now I'm having great luck with everything EXCEPT localhost..... I'm sure I'm just missing something silly, or maybe this isn't possible but I thought I'd ask. 

 

I understand that I can do this to gather the localhost IP and Alias. 

rkmadse_0-1660107900309.png

But I'm wanting to be able to pull in it's properties using System Configuration so that I don't have to have a separate chunk of code for localhost. 

 

I'm currently doing this for everything else.... to gather that is. 

rkmadse_1-1660107994501.png

I know I can also utilize the following to get this information for everything BUT localhost.

rkmadse_2-1660108083912.png

 

Thanks

 

 

 

 

0 Kudos
Message 1 of 3
(724 Views)

This seems kinda hokey... but is closer to what I'm hoping to achieve as the output, just seems like I'm doing it wrong though. 

 

Eventually I want to be able to take this list of IPs, and then allow the user to edit them and update them all, it's a security feature. 

 

rkmadse_0-1660111887987.png

 

Output

rkmadse_0-1660112197133.png

 

 

0 Kudos
Message 2 of 3
(663 Views)

You can't change the IP address for "localhost", it's by definition 127.0.0.1 (for IPv4, IPv6 is not as simple).

 

But the System Configuration API uses MyComputer as local system identifier and an empty resource string should be synonym to that. Of course the local system can and nowadays almost certainly does have multiple network adapters and hence network addresses. One of them is the primary, and the others are secondary.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 3
(685 Views)