|
|
|
The program for matching CIDR addresses will take the form of an interactive program that first reads an input file and then enters a loop querying the user for addresses and, on each one, reporting the CIDR prefix that best matches the given address. Please use the following format for the input file: The input file should be a series of newline terminated lines, each containing a single network prefix, specified as <dotted-quad>/<len> Where a <dotted-quad> is replaced by an IP address of the form a.b.c.d, where each of a, b, c, and d are specified as decimal integers in the range of 0 to 255, and <len> is replace by a single decimal integer in the range 1 to 32. Note that the '/' is required, is a forward slash, and there are no intervening spaces between the <dotted-quad> the slash, and the <len>. Note also that the angle brackets are _not_ part of the syntax, but are used to denote syntax elements that will be replaced. The flow of the program should be
Example input file (note that this will not be used for grading, but can be used to make sure that your parsing is OK). |
|
|