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
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Private IP addresses are usually set from the private IP address spaces:
10.0.0.0/8172.16.0.0/12192.168.0.0/16If 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.