Program to calculate information about IP addresses,
providing just what is requested on the 42 cursus' netwhat test.
Motivation · Usage · Tips
This program was developed to help cadets from École 42 on studying for and taking the netwhat test. For further information about this, please refer to the netwhat repo.
The program is written in C language and thus needs the gcc
compiler and some standard C libraries to run.
Simply clone the repository:
$ git clone https://github.com/appinha/ip_calc-netwhat-42cursus.git
Go to the cloned directory:
$ cd ip_calc-netwhat-42cursus
For information about the given IP address, run:
$ sh ipc.sh [IP address] [subnet mask or CIDR]
For information about the given subnet mask/CIDR, run:
$ sh ipc.sh [subnet mask or CIDR]
Set an alias for running the program, for instance:
alias ipc="cd path/to/ip_calc-netwhat-42cursus && sh ipc.sh $1 $2"
Then, it suffices to run:
ipc [IP address] [subnet mask or CIDR]
or:
ipc [subnet mask or CIDR]