cidr /

Filename Size Date modified Message
freebsd.bin
linux_ppc.bin
linux_x86.bin
win32
win32.bin
52 B
110 B
1.5 KB
517 B
446 B
7.0 KB
4.9 KB
9.4 KB
2.0 KB
6.5 KB
1.9 KB
CIDR - Classless Inter-Domain Routing
Tool for calculating masks from address ranges.

Introduction:
In the old days, IPv4 addressing was easy.  If you had network 10.0.0.0/8,
you knew that 10 was the network address and 0.0.0 to 255.255.255 were
addresses for your hosts.  Well, it's not so easy not, classless
addressing means that the standard classes of /8, /16 and /24 are gone.
That number can now be anything, it's a good thing (TM) but difficult to
calculate.  When digiServ (http://www.digiserv.net/) asked me if I could
code a tool to calculate the network addresses for rangers of addresses to
help them firewall troublesome users without affecting people from other
netblocks, I jumped at the task.  This tool will works like this:

Usage:
cidr [starting address] [ending address].
If I specify cidr 201.64.115.0 201.64.115.255
I will get the following information back:
  Block: 201.64.115.0/24
  Mask: 255.255.255.0

That is what this tool is for.  It can also help you specify the smallest
netblock you should be using to contain your hosts.  The tool consists of
two main files:

cidr.c <- The main library code
cidr_cmd.c <- The command line interface

The less important files are:

cidr_oop.cpp <- The C++ wrapper class code
cidr.h <- The header for the cidr.c library and class
cidr_config.h <- Miscellaneous options for building the code.

Under win32/ you will also find a GUI program for Windows users.
It is recommended that you use the binaries for Win32 as you may
have difficulty building the GUI.

Building
========
To build the command line tool:

On GNU / UNIX systems, type:

make
as root, then:
make install
then make clean.

You will have compiled and installed cidr.  Then just type cidr -h for
information.

On Borland C++, type:
make -f Makefile.bor
Then copy cidr.exe to whereever you wish.  Though win32.bin/cidr.exe might
be smaller due to UPC compression, so I recommend you use that version.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.