Skip to content

Latest commit

 

History

History
90 lines (61 loc) · 2.58 KB

README.md

File metadata and controls

90 lines (61 loc) · 2.58 KB

IP Calculator

Program to calculate information about IP addresses,
providing just what is requested on the 42 cursus' netwhat test.

GitHub code size in bytes Number of lines of code Code language count GitHub top language GitHub last commit


💭 Motivation

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.

🛠️ Usage

Requirements

The program is written in C language and thus needs the gcc compiler and some standard C libraries to run.

Installation

Simply clone the repository:

$ git clone https://github.com/appinha/ip_calc-netwhat-42cursus.git

Running

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]

Program printscreen - IP address information

For information about the given subnet mask/CIDR, run:

$ sh ipc.sh [subnet mask or CIDR]

Program printscreen - CIDR information

Program printscreen - subnet mask information

💡 Tips

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]