#include <arpa/inet.h>
#include <stdio.h>
 * Just musing around, some useful little functions in the pocket...

int main(int argc,char *argv[]) {
  unsigned char *p;

  // What ordering my computer uses ? Mine (i7) is little-endian, and yours ?
  int i = 0x01020304;
  p = (char *)&i;

  // First convert dotted Internet address into NBO 32 bits struct
  struct in_addr addr;
  printf("inet_aton %d\n",inet_aton("",&addr));
  // What is this number in HO ?
  printf("Network byte orderring %08x\n",addr.s_addr);
  // Exhibit bytes with NBO..
  p = (char *)&(addr.s_addr);

  // Ok, now try simpler? conversion
  in_addr_t addr2;
  addr2 = inet_addr("");
  printf("Network byte ordering %08x\n",addr2);

  // Uh? Why would you like an HO address ???
  in_addr_t addr3;
  addr3 = inet_network("");
  printf("Host byte ordering : %08x\n",addr3);

  // Woh! invert from NBO to string (char *)...
  char rep[INET_ADDRSTRLEN];
  return 0;