Commit Graph

156 Commits

Author SHA1 Message Date
Ben Pfaff 9c1b16772c Implement OFPT_HELLO simple version negotiation. 2008-09-15 14:29:53 -07:00
Ben Pfaff 553dfa572d Break passive vconns out into separate pvconn routines and data structures.
There really was nothing in common between the active and passive vconns.
This arrangement makes more sense.
2008-09-15 14:29:53 -07:00
Ben Pfaff 9fe9a47916 Make "struct vconn" opaque. 2008-09-15 14:29:53 -07:00
Ben Pfaff 74cacf6067 Get rid of OFP_MAXLEN.
Statistics or vendor extensions can fill up the whole 64 kB.
2008-09-10 20:05:49 -07:00
Ben Pfaff d0fb7347b9 Delete OFPST_SWITCH and make it available as a Nicira vendor extension. 2008-09-10 15:00:47 -07:00
Ben Pfaff 39136b0fb9 Make switches send error messages when they receive a bad request. 2008-09-10 13:22:25 -07:00
Ben Pfaff 696db2c3b6 Add vendor-specific messages and statistics to OpenFlow protocol. 2008-09-10 13:21:34 -07:00
Justin Pettit 176265ed07 Use new method to describe table entries in OpenFlow wire protocol.
Older versions of OpenFlow pre-defined a few different types of tables and the
Features Reply message would indicate how many of those entries existed.  This
was very inflexible, so now the Features Reply just indicates how many tables
there are.  The controller now sends a Table Stats request to find out how
many entries are supported and the fields that can be wildcarded.

This change also removes the "buffer_mb" field from the Features Reply, since
it was not being used and seemed to be of limited value.
2008-09-10 13:03:25 -07:00
Ben Pfaff b5e9402df5 Implement 802.1D Spanning Tree Protocol. 2008-09-09 14:15:57 -07:00
Ben Pfaff b5bcab1b47 Add ability to monitor both ends of secchan connections from dpctl. 2008-09-08 10:05:13 -07:00
Ben Pfaff 9e7df18a42 vconn: New function vconn_get_name(). 2008-09-08 10:05:13 -07:00
Ben Pfaff b5e16b0723 Respin "Make vconns keep track of their names and include them in log messages."
This time, leave out the segfaults.
2008-09-04 09:47:05 -07:00
Justin Pettit 7d7d973d8b Add serial number to description status message. 2008-09-03 17:51:42 -07:00
Justin Pettit af04b055a7 Revert "Make vconns keep track of their names and include them in log messages."
This reverts commit a39a2431c1.
2008-09-03 17:43:30 -07:00
Ben Pfaff a39a2431c1 Make vconns keep track of their names and include them in log messages. 2008-09-02 14:28:22 -07:00
Ben Pfaff 263aa64c49 Add support for extensions submodule. 2008-08-28 17:36:33 -07:00
Ben Pfaff 686e34c8b7 Make the secchan report a few more switch-status items. 2008-08-28 14:25:05 -07:00
Ben Pfaff 3cc1ae6a32 Add ability to run fatal signal hooks upon normal termination too.
This is convenient since in many cases we want these hooks to run in
both cases.
2008-08-28 14:24:39 -07:00
Ben Pfaff e9ab3dbf6d Make -P or --pidfile keep programs from running if already running. 2008-08-28 13:17:16 -07:00
Ben Pfaff 1a41889356 vlog: Implement rate-limiting. 2008-08-26 13:25:19 -07:00
Ben Pfaff 2667dfda01 New functions ds_put_strftime(), ds_chomp(). 2008-08-26 13:25:17 -07:00
Ben Pfaff 394270a0e5 New header for saturating arithmetic. 2008-08-26 12:04:41 -07:00
Ben Pfaff e3d722e73b Implement new OpenFlow "switch statistics" feature.
This should be useful for reporting the status of a switch on its
front-panel display (for those switches that have one) or in the
controller UI.
2008-08-26 11:53:51 -07:00
Ben Pfaff b057b10a74 rconn: Add functions for reporting connection statistics. 2008-08-26 11:51:17 -07:00
Ben Pfaff 3e464f2c68 Add functions for reporting dhcp client statistics. 2008-08-26 11:51:17 -07:00
Ben Pfaff 12e6e0e2dd New functions ds_truncate(), ds_last(). 2008-08-26 11:51:17 -07:00
Ben Pfaff 0415ee1ac9 New function ds_put_printable().
Use the function in dhcp_option_to_string().
2008-08-26 11:51:17 -07:00
Justin Pettit f1c6daebf3 Send PORT_STATUS messages on port and link changes. Add ability to remotely enable and disable a port through the PORT_MOD message. 2008-08-22 12:47:54 -07:00
Ben Pfaff 15938f6d22 Don't compare wildcards, nw_src_mask, nw_dst_mask fields in hash table.
They should always compare equal, so there's no point in wasting the
time.
2008-08-18 14:26:50 -07:00
Ben Pfaff 9630e41005 Implement subnet mask matching in OpenFlow. 2008-08-18 14:26:50 -07:00
Ben Pfaff 17a6a6dade Fix typo in comment. 2008-08-18 14:02:48 -07:00
Justin Pettit d6a1e67a8d Add stats message that allows querying description of components in OpenFlow. 2008-08-16 09:43:05 -07:00
Justin Pettit b41a6a0a6d Added new interface statistics. 2008-08-14 23:12:37 -07:00
Justin Pettit 0226bbc742 Switch to new packet-out format and add OFPP_IN_PORT.
The original packet-out format allowed multiple actions to be specified for
buffered packets, but only a destination port for messages including data.
This change makes packet-out more consistent by allowing multiple actions
regardless of how the packet is stored.

This change also disallows sending packets through the incoming port without
explicitly using the OFPP_IN_PORT virtual port.
2008-08-14 00:07:18 -07:00
Ben Pfaff 903d0940fb Drop rconn's responsibility for limiting the tx queue.
Now it helps clients track the number of in-flight messages, but lets the
clients do the limiting themselves.  This will come in handy for packet-in
rate limiting (in an upcoming commit), in which we want to track in-flight
packet-in messages separately from other in-flight messages.
2008-08-12 15:21:30 -07:00
Ben Pfaff a837a38209 Implement signal-driven time tracking.
Checking the current time only when a periodic timer expires allows us
to reduce the number of system calls to obtain the current time to 10 per
second (from an arbitrary number) plus one per poll loop.

This fixes poll_block() to properly handle being interrupted.
Otherwise, a timeout longer than the interval between signals will never
complete (because it will restart from the beginning after every
signal).
2008-08-12 15:21:30 -07:00
Ben Pfaff b67da66b07 Make fatal-signal more willing to share signals with other handlers. 2008-08-12 14:24:22 -07:00
Ben Pfaff 7bee00fad9 Implement OpenFlow hard timeouts.
This updates the OpenFlow protocol version and changes the names of
structure members, so any software that uses OpenFlow will need to be
updated to match.
2008-08-07 15:19:31 -07:00
Ben Pfaff eca2aeb329 Implement OFPC_FRAG_DROP fragment handling policy. 2008-08-07 10:34:37 -07:00
Ben Pfaff d7f1e2b535 Drop controller-bound traffic that arrives on the controller's port.
Before, if a hub connected a number of OpenFlow switches and the controller,
then in-band control traffic from one of the OpenFlow switches would be
seen by each of the other switches and forwarded up to the controller as
an ofp_packet_in message.  That message would then be seen by all of the
other OpenFlow switches and also forwarded, and so on in an infinite loop.

This change prevents this situation by keeping secchan from forwarding
ofp_packet_in messages for a packet destined to the controller that
arrives on the port where the controller is located.

This code has at least two weaknesses.  First, if the controller's port
changes, then the flows set up to drop packets will not be deleted.  This
should not be a major problem: if this inadvertently kills a switch's
connection to the controller, then the switch will realize it after it
stops receiving data and re-connect.  Its new connection will have new
flow data and therefore its packets will not be dropped.

Second, the notion of the "controller's port" does not take into account
the possibility of loops in the network topology.  We need spanning tree
protocol for that.
2008-08-07 10:10:11 -07:00
Ben Pfaff ca477c1000 Fix typo in comment. 2008-08-05 10:50:09 -07:00
Ben Pfaff bf13819340 Make it easier for the compiler to optimize IP_IS_FRAGMENT. 2008-08-04 14:46:01 -07:00
Ben Pfaff aa26396ed5 dhcp: New function dhcp_option_equals(). 2008-07-30 15:46:38 -07:00
Ben Pfaff bab6bdbe58 vconn: Implement Unix domain socket vconn.
These are useful for local management connections because, unlike TCP
sockets, they are subject to regular file system permissions.
2008-07-30 15:45:21 -07:00
Ben Pfaff 5680957f84 Move unix socket helper functions into socket-util.
This makes them available for use by the upcoming vconn_unix.
2008-07-30 15:45:05 -07:00
Ben Pfaff 85a2e91f5f vconn: Introduce infrastructure for stream socket-based vconns. 2008-07-30 15:44:22 -07:00
Ben Pfaff 5fed6531b9 Enable secchan, ofp-discover to update /etc/resolv.conf.
This way it becomes possible to more reliably refer to the controller
and the PKI server using hostnames.
2008-07-23 14:30:59 -07:00
Ben Pfaff df3a28bf74 Support controller discovery in Debian packages. 2008-07-23 13:12:23 -07:00
Ben Pfaff a412f49bb0 New function make_pidfile_name().
The upcoming ofp-kill utility wants to use this.
2008-07-23 13:12:23 -07:00
Ben Pfaff 32c18a40af New program ofp-discover. 2008-07-23 13:12:21 -07:00