resolving multiple ip addresses

  • Thread starter Thread starter SLIDE6
  • Start date Start date
S

SLIDE6

I want to write a function to retrieve the current IP address of a computer.
All the examples I've seen rely on taking the first address from a list.
But I'm in something of a predicament -- that address isn't always right.
For example, if my computer is connected to a VPN, the address I want (the
one associated with the VPN) might be the third entry in the list! Is there
some more intelligent way to determine what the "correct" address is?
 
SLIDE6 said:
I want to write a function to retrieve the current IP address of a
computer. All the examples I've seen rely on taking the first address from
a list. But I'm in something of a predicament -- that address isn't always
right. For example, if my computer is connected to a VPN, the address I
want (the one associated with the VPN) might be the third entry in the
list! Is there some more intelligent way to determine what the "correct"
address is?

Ping each address to see if it's live?
 
Back
Top