netcalc is a slimmed down clone of sipcalc, using the output format of ipcalc. It is written in C and only depends on a POSIX compliant C library. Both IPv4 and IPv6 are supported.
curl -sS https://deb.troglobit.com/pubkey.gpg | sudo tee /etc/apt/trusted.gpg.d/troglobit.asc
echo "deb [arch=amd64] https://deb.troglobit.com/debian stable main" | sudo tee /etc/apt/sources.list.d/troglobit.list
sudo apt-get update && sudo apt-get install netcalc
Automatically built images available here:
A Dockerfile is provided to simplify building and running netcalc
.
docker build -t netcalc:latest .
docker run --rm netcalc:latest netcalc 172.16.10.10/16
First download the latest official release from GitHub:
Always use the versioned tarballs, they contain all required files to be able to build.
The GNU Configure & Build system use /usr/local
as the default install
prefix. Here we override that to use /usr/
, the netcalc binary will
then be installed in /usr/bin
:
$ ./configure --prefix=/usr
$ make -j5
$ sudo make install-strip
If you want to contribute, or simply just try out the latest but unreleased features, then you need to know a few things about the [GNU build system][buildsystem]:
configure.ac
and a per-directoryMakefile.am
are key filesconfigure
andMakefile.in
are generated fromautogen.sh
, they are not stored in GIT but automatically generated for the release tarballsMakefile
is generated byconfigure
script
To build from GIT; clone the repository and run the autogen.sh
script.
This requires the GNU tools automake
, autoconf
and libtool
to be
installed on your system. Released tarballs do not require these tools.
$ sudo apt install git automake autoconf
Then you can clone the repository and create the configure
script,
which is not part of the GIT repo:
git clone https://github.com/troglobit/netcalc.git
cd netcalc/
./autogen.sh
./configure && make
GIT sources are a moving target and are not recommended for production systems, unless you know what you are doing!
The original sipcalc
project was created by Simon Ekstrand in 2001.
It is no longer actively maintained, but has a lot of features and is
available on major Linux distributions and works on *BSD and Solaris.
Use GitHub to file bug reports, questions, feature requests or patches — preferably as pull requests.