In comp.os.linux.networking Goran <(E-Mail Removed)>:
> Hello,
> I need to validate a gateway address by knowing a ip address and
> netmask. How do i calculate this? I want to do this in either in C or
> from a shell script.
The gateway IP can be anywhere inside the subnet, 'ipcalc' is one
out of numerous apps, search "freshmeat.net" for others.
$ ipcalc -h
ipcalc: ip address expected
Usage: ipcalc [OPTION...]
-b, --broadcast Display calculated broadcast address
-h, --hostname Show hostname determined via DNS
-m, --netmask Display default netmask for IP (class A, B, or C)
-n, --network Display network address
-p, --prefix Display network prefix
-s, --silent Don't ever display error messages
Help options:
-?, --help Show this help message
--usage Display brief usage message
--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo
(E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 435: Internet shut down due to maintenance