Retrieve gateway's internet IP
Posted on 2003-10-26
Let's asume a LAN with some windows machines, one of
it with the IP 10.1.1.1.
10.1.1.1 is connected to the internet via a gateway with
the LAN IP 10.1.1.254.
The ISP assigned the IP 126.96.36.199 to the gateway.
My question is:
Do you know a way using winsock or iphlpapi to retrieve
this last IP? I tried GetIpForwardTable and
GetBestRoute but those functions just give me the
gateway's LAN IP.
Thanks in advance!