Check for validity of IP address [modified]
-
Hello I need the c code to perform the following task "Given an IP address, check for validity of IP address". Suppose the ip address is 172.16.10.61. So it is a valid address. Here to check it by taking separately each byte and check the range( 0-255) ( for exapmle using strtok(ipaddress, ".") ).I work in a fedora Linux 11. Instead of using the strtok on ip address string any direct library function is there? Thanking you, Krishna:rose:
modified on Thursday, March 25, 2010 8:51 AM
-
Hello I need the c code to perform the following task "Given an IP address, check for validity of IP address". Suppose the ip address is 172.16.10.61. So it is a valid address. Here to check it by taking separately each byte and check the range( 0-255) ( for exapmle using strtok(ipaddress, ".") ).I work in a fedora Linux 11. Instead of using the strtok on ip address string any direct library function is there? Thanking you, Krishna:rose:
modified on Thursday, March 25, 2010 8:51 AM
Let Me Google That For You. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hello I need the c code to perform the following task "Given an IP address, check for validity of IP address". Suppose the ip address is 172.16.10.61. So it is a valid address. Here to check it by taking separately each byte and check the range( 0-255) ( for exapmle using strtok(ipaddress, ".") ).I work in a fedora Linux 11. Instead of using the strtok on ip address string any direct library function is there? Thanking you, Krishna:rose:
modified on Thursday, March 25, 2010 8:51 AM
Google gives the solution in php program, but I want in c-code
-
Google gives the solution in php program, but I want in c-code
-
Google gives the solution in php program, but I want in c-code
krish_kumar wrote:
but I want in c-code...
Which is exactly what was provided to you.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
-
Google gives the solution in php program, but I want in c-code
Google's first hit: "How to validate IP address in C"... :rolleyes:
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]