author | Medo <smaxein@googlemail.com> |
Thu, 31 May 2012 00:35:06 +0200 | |
changeset 7155 | 273ad375d64e |
child 7158 | a0573014ff4f |
permissions | -rw-r--r-- |
7155
273ad375d64e
Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
1 |
#include "logging.h" |
273ad375d64e
Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
2 |
|
273ad375d64e
Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
3 |
char* flib_format_ip(uint32_t numip) { |
273ad375d64e
Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
4 |
static char ip[16]; |
273ad375d64e
Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
5 |
snprintf(ip, 16, "%u.%u.%u.%u", numip>>24, (numip>>16)&0xff, (numip>>8)&0xff, numip&0xff); |
273ad375d64e
Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
6 |
return ip; |
273ad375d64e
Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff
changeset
|
7 |
} |