Initial commit for Project #3

"setup" directory contains the unpacked setup.tgz referenced from the spec
run_mininet.py shouldn't hard-code an IP

Dunno why they sent the files out like this...it's not like that IP won't be
different for everyone?  Oh well, it's better now.
Copy LearningSwtich from p1

Our normal switch will behave as a LearningSwitch, so let's start with that.
Update controller creation for multiple switches
NAT internal/external interface differentiation

NAT controller now ignores traffic that isn't intended for it.  Additionally,
it can diffentiate between its internal and external interfaces.  The internal
interface is the one on the port with the highest valid port number.  All
other ports are assumed to be external.
Identify log output from each controller type
Update Project #3 spec

Course staff updated the spec with some clarifications.
Switch internal/external interface definitions

Whoops, original implementation had the clients on the outside of the NAT.  No
wonder I was so confused with some of the implications that I was coming up
with...yay late night coding.
Update spec and run_mininet.py

Looks like the course staff fixed some of the bugs that many were unhappy
with. :)
Add solutions for Projects #1 and #2
Basic NAT implementation done!

Still need to work out some of the finer details the spec asks for, but for
now, it works!
Implement endpoint-independent mapping

If the a machine inside the NAT reuses a source port when connecting to a new
external host, the NAT should re-use its NAT port as well.
Refactor flow creation code

Move flow creation into a function, so it can be reused elsewhere.
Rename terminology to use internal/external

Use "internal"/"external" instead of "source"/"destination".
Allow internal-internal host communication

It's not elegant, just flood packets out the other internal ports.  Ship it!
Fix NAT table storing the wrong dst address
Implement endpoint-independent filtering

Once an internal entity has established an outbound connection, any external
host can connect to the internal host via the NAT port that was opened.
Refactor flow action creation code

Split the action creation code out into a separate function for easier reuse
later.
Require three-way handshake before creating flow

Require the TCP connection to fully establish, prior to creating the NAT rule.

TCP simultaneous open should be supported as well, by ensuring SEQs are
recorded when seen by each party, and not expecting an ACK to arive alongside
a SEQ in the case of the connectee's portion of the handshake.
Implement transitory/established timeouts

Now that we go through the TCP three-way handshake, we can correctly apply
these timeouts to our connections.  "Transitory idle" applies until the
connection has established, at which point "established idle" takes over.
The NAT table is lazily cleaned up, instead of having a periodic timer that
keeps it clean.