How can I find an Internet IP address is static or dynamic via C or C++ or a language that something else
? Thank you.
3 replies to this topic
#1
Posted 05 December 2010 - 09:54 PM
|
|
|
#2
Posted 05 December 2010 - 10:35 PM
The most obvious solution that comes to mind would be to look up the host name and match the string "dynamic". or "static", this is more reliable than just guessing otherwise.
Regardless you would need to know C and utilize a network API such as this before you could do that: gethostbyaddr Function (Windows)
Regardless you would need to know C and utilize a network API such as this before you could do that: gethostbyaddr Function (Windows)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 05 December 2010 - 11:55 PM
Thanks for your answer, is there different way? Because I suppose IP addresses's host names don't always contain one of "static" or "dynamic" words. I have just searched at http://whatismyipadd...com/ip-hostname, an IP's hostname was not contain one of these words.
#4
Posted 06 December 2010 - 03:00 AM
Afaik, unless you are work on the computer itself or you have access to DHCP server that assigns the IP address for the computer's network, you could not get this information. However this is my impression from my experience in networking, I can be wrong since I never actually looked into this sort of issue.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









