How can I find that an IP address is a LAN IP address or WAN IP address? I am writing a C API in Windows.Thanks
Private IP addresses are usually set from the private IP address spaces:
10.0.0.0/8
172.16.0.0/12
192.168.0.0/16
If the interface's IP addresses falls into one of these spaces, you can assume it is a private IP. Otherwise, it is a public (WAN) IP.