diff options
author | Felix Fietkau <nbd@openwrt.org> | 2006-10-07 11:57:20 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2006-10-07 11:57:20 +0000 |
commit | d58a09110ccfa95f06c983fe796806f2e035c9d2 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /openwrt/package/base-files/default/bin/ipcalc | |
parent | af034797eeb62b62ac05442d5a688b28ccd0f16b (diff) | |
download | mtk-20170518-d58a09110ccfa95f06c983fe796806f2e035c9d2.zip mtk-20170518-d58a09110ccfa95f06c983fe796806f2e035c9d2.tar.gz mtk-20170518-d58a09110ccfa95f06c983fe796806f2e035c9d2.tar.bz2 |
move old kamikaze out of trunk - will put buildroot-ng in there as soon as all the developers are ready
SVN-Revision: 4944
Diffstat (limited to 'openwrt/package/base-files/default/bin/ipcalc')
-rwxr-xr-x | openwrt/package/base-files/default/bin/ipcalc | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/openwrt/package/base-files/default/bin/ipcalc b/openwrt/package/base-files/default/bin/ipcalc deleted file mode 100755 index 318980e..0000000 --- a/openwrt/package/base-files/default/bin/ipcalc +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -awk -f /usr/lib/common.awk -f - $* <<EOF -BEGIN { - ipaddr=ip2int(ARGV[1]) - netmask=ip2int(ARGV[2]) - network=and(ipaddr,netmask) - broadcast=or(network,compl(netmask)) - - start=or(network,and(ip2int(ARGV[3]),compl(netmask))) - limit=network+1 - if (start<limit) start=limit - - end=start+ARGV[4] - limit=or(network,compl(netmask))-1 - if (end>limit) end=limit - - print "IP="int2ip(ipaddr) - print "NETMASK="int2ip(netmask) - print "BROADCAST="int2ip(broadcast) - print "NETWORK="int2ip(network) - print "PREFIX="32-bitcount(compl(netmask)) - - # range calculations: - # ipcalc <ip> <netmask> <start> <num> - - if (ARGC > 3) { - print "START="int2ip(start) - print "END="int2ip(end) - } -} -EOF |