Noob C questions incoming:
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int
getaddrinfo(const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
void
freeaddrinfo(struct addrinfo *ai)
Taken from http://www.nxmnpg.com/3/getaddrinfo. Namely I'm interested in why it isn't just getaddrinfo(char *hostname) and is a const instead.
I have an idea what a pointer is. It seems to me that almost all of the functions in C prefer pointers passed to just variables, is this correct?