From 30300843e0c66ca3eefa97f5787f95b07c256d2f Mon Sep 17 00:00:00 2001 From: Epoch Qwert Date: Sun, 23 Nov 2014 14:25:42 -0600 Subject: fixed gitignore. >_> added a bunch of new piddly shit. --- src/bin/ipconvert.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/bin/ipconvert.c (limited to 'src/bin/ipconvert.c') diff --git a/src/bin/ipconvert.c b/src/bin/ipconvert.c new file mode 100644 index 0000000..5420e27 --- /dev/null +++ b/src/bin/ipconvert.c @@ -0,0 +1,8 @@ +#include + +int main(int argc,char *argv[]) { + int addr=inet_addr(argv[1]); + printf("%x\n",htonl(addr)); + printf("%u\n",htonl(addr)); + printf("%u.%u.%u.%u\n",addr&255,addr>>8&255,addr>>16&255,addr>>24&255); +} -- cgit v1.2.3