ipaddress to hostname without a single shred of error checking. This code will take an ipaddress as an argument and return the hostname associated with it using gethostbyaddr. It should have more error checking and a lot of other stuff, but this is just to show the base code. Cut and paste away. [includecode#../code/gethostbyaddr.c]

Comments

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

About the Author...