diff options
author | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-10-21 12:49:50 -0500 |
---|---|---|
committer | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-10-21 12:53:12 -0500 |
commit | 12201178a5950eecd9537e642b1246011490b499 (patch) | |
tree | b606b8f77af7d8b77a92ef5a3f7c905d66b97ad9 /src/bin/dcchelper.c | |
parent | 1852f2d7d63c39d0fd97a2774d1bd16bf53ec67d (diff) | |
download | misc-12201178a5950eecd9537e642b1246011490b499.tar.gz misc-12201178a5950eecd9537e642b1246011490b499.zip |
updated rebuild.sh to work better with libexec and bin instead of just bin.
added epochttpd 2
Diffstat (limited to 'src/bin/dcchelper.c')
-rw-r--r-- | src/bin/dcchelper.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/bin/dcchelper.c b/src/bin/dcchelper.c new file mode 100644 index 0000000..bf8f28b --- /dev/null +++ b/src/bin/dcchelper.c @@ -0,0 +1,20 @@ +#include <stdio.h> + +int main(int argc,char *argv[]) { + char *wanip; + if(argc < 2) { + return printf("usage: %s [IP]\n",argv[0]); + } + if(!strncmp(argv[1],"127.",4)) { + wanip="127.0.0.1"; + } + else if(!strncmp(argv[1],"1.",2)) { + wanip="1.41.41.1"; + } + else if(!strncmp(argv[1],"192.168.0.",10)) { + wanip="192.168.0.2"; + } else { + wanip="98.159.69.172"; + } + return printf("%u\n",htonl(inet_addr(wanip))); +} |