| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
It worked fine before but gawk warns about it.
Signed-off-by: Leon M. George <leon@georgemail.eu>
|
|
|
|
|
|
| |
For gawk compatibility.
Signed-off-by: Leon M. George <leon@georgemail.eu>
|
|
|
|
|
|
|
|
|
|
|
| |
There's hardly an shell logic in ipcalc.sh and a $* that would garble
parameter positions.
Move the awk invokation to the shebang.
A rename from "ipcalc.sh" to "ipcalc" is desirable but could prove tricky
with packages in other repositories depending on the filename.
Signed-off-by: Leon M. George <leon@georgemail.eu>
|
|
|
|
|
|
|
|
| |
It's possible to move range boundaries in a way that the start address
lies behind the end address.
Detect this condition and exit with an error message.
Signed-off-by: Leon M. George <leon@georgemail.eu>
|
|
|
|
|
|
| |
Make sure our own address doesn't lie in the calculated range.
Signed-off-by: Leon M. George <leon@georgemail.eu>
|
|
|
|
|
|
|
| |
With this patch, ipcalc only calculates range boundaries if the
corresponding parameters are supplied.
Signed-off-by: Leon M. George <leon@georgemail.eu>
|
|
|
|
| |
SVN-Revision: 39100
|
|
|
|
|
|
| |
Signed-off-by: Luka Perkov <luka@openwrt.org>
SVN-Revision: 39006
|
|
|
|
|
|
|
|
| |
Calculate complements by using awk's xor() function with a mask of 0xffffffff
instead of relying on the compl() function which appears to produce broken
results on certain 64bit architectures.
SVN-Revision: 34875
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the attached patch makes ipcalc.sh accept IP/Netmask combinations in
CIDR notation. Before you could only do:
# sh ipcalc.sh 192.168.0.0 255.255.255.0 1 10
IP=192.168.0.0
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
NETWORK=192.168.0.0
PREFIX=24
START=192.168.0.1
END=192.168.0.11
with this patch you can also execute it with:
sh ipcalc.sh 192.168.0.0/24 1 10
IP=192.168.0.0
NETMASK=255.255.255.0
BROADCAST=192.168.0.255
NETWORK=192.168.0.0
PREFIX=24
START=192.168.0.1
END=192.168.0.11
The patch is based on #1260 [1], i just changed one line to calculate
the START end END ips right. I wonder why that never got included. If
there is no reason not to do i would like to ask you to commit that
patch, because its a functionality i (and probably others) miss quite often.
Btw, i also fixed 4 useless tabs, that might look a bit strange in the
patch.
Regards, Manuel
SVN-Revision: 26930
|
|
|
|
| |
SVN-Revision: 25528
|
|
|
|
|
|
| |
code there
SVN-Revision: 25495
|
|
|
|
| |
SVN-Revision: 16619
|
|
rename /bin/ipcalc to /bin/ipcalc.sh (fixes #1452)
SVN-Revision: 6595
|