So, I'm reading Beej's Guide to Network Programming, and he uses this function:
void *get_in_addr(struct sockaddr *sa)
{
if (sa->sa_family == AF_INET) {
return &(((struct sockaddr_in*)sa)->sin_addr);
}
So, I get what its doing in general. What I'm having trouble understanding is what exactly the * in the function declaration is doing. Also, this function seems to be returning a memory location, but its void. Whats going on here?