I want to try and get the ip address of a client after calling accept. This is what I have so far, but I just end up getting some long number that is clearly not an ip addr
what your are getting is the raw 32 bit integer representation of the IP address. to get the familiar dot separated string, use the function:
char * inet_ntoa(struct in_addr addr);
that will convert the integer to a static string.