#include void putipstr(uint32_t, char *); void putipstr(uint32_t ip, char *s) { uint32_t delim = '.' << 24 | '.' << 16 | '.' << 8; do { uint8_t byte = ip >> 24; ip <<= 8; if (byte > 9) { if (byte > 99) { *s++ = byte / 100 + '0'; byte %= 100; } *s++ = byte / 10 + '0'; byte %= 10; } *s++ = (char)byte + '0'; delim >>= 8; *s++ = (char)delim; } while (delim); }