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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top