This is how you would convert a 32 bit integer ipv4;
int e = 12345678;
u_char ip[4];
ip[0] = ip & 0xFF;
ip[1] = (ip >> 8) & 0xFF;
ip[2] = (ip >> 16) & 0xFF;
ip[3] = (ip >> 24) & 0xFF;
printf("\t%d.%d.%d.%d\n", bytes[0], bytes[1], bytes[2], bytes[3]);
How can I convert ipv6 to dotted string? What instead of 0xFF? PLEASE HELP