socketp.c
/* return dotted notation for an IPv4 address in host byte order
 */
return dotted notation for an IPv4 address in host byte order
return dotted notation for an IPv4 address in host byte order
char *dotted_addr(uint32_t addr)
{
    static char dotted[sizeof("xxx.xxx.xxx.xxx")] ;
    sprintf(dotted, "%d.%d.%d.%d",
            (addr >> 24) & 0xff,
            (addr >> 16) & 0xff,
            (addr >>  8) & 0xff,
            addr         & 0xff) ;
    return dotted ;
}
char * dotted_addr ( uint32_t addr ) { static char dotted [ sizeof ( " " ) ] ; sprintf ( dotted , " " , ( addr >> 24 ) & 0xff , ( addr >> 16 ) & 0xff , ( addr >> 8 ) & 0xff , addr & 0xff ) ; return dotted ; }
return dotted notation for an IPv4 address in host byte order
return dotted notation for an IPv4 address in host byte order