Re-wrote the program to accept the netmask as an argument

This commit is contained in:
2020-09-16 11:22:03 +02:00
parent 41a934985a
commit 73b9e160b2
2 changed files with 105 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
# subnetcalc #
A very simple subnet calculator written in C. It's nothing fancy at all,
just a small project of mine to get going with C.
just a small project of mine to get me going with C.
Simply build it (make), run it (./subnetcalc) and enter the subnet
mask in slash notation but without the slash.
@@ -8,3 +8,11 @@ For example enter 24 for a 24-bit subnet mask and the
program will output the total number of addresses in the range aswell
as the total number of usable address for hosts.
You can also give the netmask to the program as an argument. For example:
$> ./subnetcalc 24
Netmask bit: 24
256 total addresses
254 usable addresses for hosts