inetntop does not print a url

The inet_ntop function takes a structure containing an IP address and converts it to a string format. It doesn’t know anything about URLs.

When accept returns, all that’s happened at this point is that a TCP connection was made, and their_addr contains the IP address of the endpoint which connected, in this case ::1, which is what is printed.

You need to further read from the socket, which presumably contains HTTP, to learn what URL was called.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top