I have two programs that communicate to each other and one piece of data sent is the IP address stored as an unsigned long integer. It is retrieved in one program via the sockaddr_in struct when it accepts an outside connection. I then stored the IP address from the sin_addr member of the struct and the s_addr sub-member which returns the unsigned long version of the IP address.
I look here http://www.retran.com/beej/inet_ntoaman.html and it suggests that I can get the textual (human readable) version of the IP address by using the inet_ntoa function, but it expects the in_addr struct as a parameter.
Is there a function I can use that returns the textual IP address using an unsigned long integer as the parameter?