Results 1 to 2 of 2
Does anybody know how to get external ip address with c and socket?
To make things clear,
A linux machine may have multiple ip address, for example,
127.0.0.1 (local ip ...
- 12-11-2009 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 1
how to get external ip address?
Does anybody know how to get external ip address with c and socket?
To make things clear,
A linux machine may have multiple ip address, for example,
127.0.0.1 (local ip address)
198.12.1.12 (external address)
if there a c function like getaddrinfo(..) which can get the external address(198.12.1.12), rather than the local address(127.0.0.1)?
Thanks a lot.
- 12-11-2009 #2
I don't know how, but the tool ifconfig can tell such things.
So I would browse the source code of that tool to look how it does the job.Debian GNU/Linux -- You know you want it.


Reply With Quote