oops, that <stdlib.h> should have been <netinet/in.h> for htonl()