diff options
author | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-11-23 14:25:42 -0600 |
---|---|---|
committer | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-11-23 14:25:42 -0600 |
commit | 30300843e0c66ca3eefa97f5787f95b07c256d2f (patch) | |
tree | b29343b30092689786ffcac3913b683ff7555dbe /src/bin/ipconvert.c | |
parent | a23b5f921d551863dbcae494e58622164a1d3492 (diff) | |
download | misc-30300843e0c66ca3eefa97f5787f95b07c256d2f.tar.gz misc-30300843e0c66ca3eefa97f5787f95b07c256d2f.zip |
fixed gitignore. >_> added a bunch of new piddly shit.
Diffstat (limited to 'src/bin/ipconvert.c')
-rw-r--r-- | src/bin/ipconvert.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 <stdio.h> + +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); +} |