Commit 5373e7fe authored by Jonathon Duerig's avatar Jonathon Duerig
Browse files

Clarified input/output specifications

parent 7481da21
Command Line Options
None yet. This program reads from the standard input and writes to the
standard output.
......@@ -7,9 +12,16 @@ weight (this must be integral), followed by a series of integers, each one
representing a node which the LAN is connected to. The LANs are automatically
numbered in order of appearance (starting at 0).
Currently, the program assumes IPv4 addresses and a 10.* prefix. However,
should the need arise, this can easily be changed to an IPv6 address or
some other prefix.
<weight> <node> <node> [node [...]]
Example graph:
1 0 1 2
1 5 2 3
This graph would contain two LANs. The first has a weight of one, and is
connected to nodes 0, 1, and 2. The second is also of weight 1 and is
connected to nodes 5, 2, and 3.
......@@ -24,11 +36,6 @@ The bitmask for a global net is 0xFFFFFFFF << (lanBits + hostBits).
The bitmask for a lan net is (0xFFFFFFFF >> hostBits) << hostBits.
The bitmask for a host is 0xFFFFFFFF.
Unless I got mixed up somewhere along the line. If so, someone email me. :)
These bitmasks would change if one were using IPv6 addresses (changeable at
compile time through some constants).
Each additional line of output is a specification of an IP address. There
are two numbers and an IP dotted quadruplet. The first number is the LAN
number (which is the ordinality of that LAN - 1). The second is the number
......@@ -37,6 +44,17 @@ of a node.
This means that the node has the IP address on the interface connected with
the LAN.
<LAN> <node> <IP>
Example output:
0 0
0 1
0 2
1 2
1 3
1 5
......@@ -44,6 +62,9 @@ The input is used to populate a graph object. This object contains many
LANs, each LAN being a node in the graph. It is important to realize that
the graph the program is interested in is a graph of a bunch of LANs connected
to each other by nodes. A kind of inverse of the graph we normally think of.
The reason that we care about LANs in nets rather than nodes is because each
interface of a node can be part of a different net, whereas every interface
in a LAN should be part of the same net.
This LAN-graph is then converted into an appropriate form and fed into the
METIS graph-partitioning algorithm. The result is that each LAN is given
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment