Commit Graph
71 Commits
Author SHA1 Message Date
Ben Pfaff 6b617bac12 Move exported headers to include/openflow, private headers to lib/.
This makes it easier to install the headers, or to use them directly from
another software package with -I$(openflow)/include, without invading
the top-level include file namespace.
2008-10-29 15:15:45 -07:00
Ben Pfaff 40a6fb4e18 Hardcode path to tcpdump as /usr/sbin/tcpdump.
Otherwise it won't be found when run as non-root because such users
typically don't have /usr/sbin in $PATH.  (We use tcpdump in a fashion
that doesn't require root privilege.)
2008-10-16 13:48:09 -07:00
Ben Pfaff 4a4424a739 Support up to 0xff00 ports in OpenFlow, without changing the implemented max. 2008-10-14 10:53:27 -07:00
Justin Pettit a835cab0ea Return error message when a flow can't be added due to full tables.
When a flow cannot be added to any tables because they are full, send
a message with type OFPET_FLOW_MOD_FAILED and code OFPFMFC_ALL_TABLES_FULL.
2008-10-13 17:49:45 -07:00
Justin Pettit 94f287969d Add support for Source-NAT to Linux 2.6 datapaths.
To enable SNAT, run configure with the "--enable-snat" flag.  This has
only been tested with the 2.6.23 kernel...more diverse testing will follow.
Documentation and a cleaner build setup will also be in a future check-in.
2008-10-11 00:30:02 -07:00
Ben Pfaff f669a5fcc7 In ofp_packet_to_string(), make tcpdump print Ethernet headers also. 2008-10-06 09:52:37 -07:00
Justin Pettit 1489ca2657 Add support for vendor-defined and variable-length actions.
Allow vendors to define their own actions.  Actions were originally fixed-
length, which was a bit constraining.  Actions now contain a length field,
which gives them more flexibility.
2008-10-03 16:44:13 -07:00
Justin Pettit 6530561934 Show OpenFlow wire version when pretty printing features reply.
This allows easy detection of version number with "dpctl show".
2008-09-26 15:28:41 -07:00
Justin Pettit 06e22ff0fe Modify VLAN actions to support setting both VID and priority.
Stripping VLANs is now done through the OFPAT_STRIP_VLAN action (i.e., you
don't specify a magic value in the generirc VLAN action).  Also, it is now
possible to modify the priority bits associated with the VLAN tag through
the OFPAT_SET_VLAN_PCP action.  The OFPAT_SET_DL_VLAN has been renamed to
OFPAT_SET_VLAN_VID.
2008-09-25 15:00:38 -07:00
Justin Pettit a52b6f66fd Cleanup printing of ofp_port_mod a bit. 2008-09-23 11:22:03 -07:00
Justin Pettit 77c8eed5b4 First cut of pretty printer of ofp_port_mod messages. 2008-09-22 17:59:50 -07:00
Justin Pettit 9da88ee2ad Modify OpenFlow commands related to ports to be more expressive.
This new OpenFlow message format provides a cleaner interface and greater
detail and control over ports.  It is now possible to see what features
the switch's port is currently configured as having, what it's advertising,
and what it's capable of handling.  It is also possible to return the
features advertised by the port's peer.
2008-09-22 15:18:22 -07:00
Justin Pettit cade93d46d Slight improvement to printing of ofp_port_status messages. 2008-09-19 02:00:06 -07:00
Justin Pettit 034f125955 Added lookup count to ofp_table_stats. 2008-09-18 19:47:27 -07:00
Justin Pettit e4cf5c4b82 Added OFPFC_MODIFY_STRICT flow mod command.
This cleans up the handling of modifying existing flows.  There now exists
OFPFC_MODIFY and OFPFC_MODIFY_STRICT commands, which have the same matching
characteristics to their OFPFC_DELETE* counterparts.  When adding a flow that
already exists, the counters and timers are now reset (ie, its treated as a
new flow).  This commit also adds the "--strict" option to dpctl to allow
strict matching for "mod-flows" and "del-flows".
2008-09-16 16:07:41 -07:00
Ben Pfaff b7d8bab74d Merge commit 'origin/master'
Conflicts:

	switch/datapath.c
	utilities/dpctl.c
2008-09-15 15:43:44 -07:00
Ben Pfaff f593e3ab70 Merge branch "partner", to simplify partner integration. 2008-09-15 15:31:36 -07:00
Justin Pettit 57d5205765 Add support for OFPFC_MODIFY Flow Mod command.
The OFPFC_MODIFY command allows the controller to modify the actions of
existing flows.  When it does this, it does not reset counters or timers.
2008-09-15 15:27:04 -07:00
Ben Pfaff 9c1b16772c Implement OFPT_HELLO simple version negotiation. 2008-09-15 14:29:53 -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
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 95204b0bf0 Don't use designated array initializers in code compiled outside of Linux.
Needed for partner builds.
2008-09-04 13:53:27 -07:00
Ben Pfaff eb0341e711 Rename utility functions to avoid partner namespace conflicts. 2008-09-04 13:53:27 -07:00
Ben Pfaff 5549180a54 Rename struct buffer to struct ofpbuf.
Fixes namespace conflict for partner development.
2008-09-04 13:53:26 -07:00
Justin Pettit 7d7d973d8b Add serial number to description status message. 2008-09-03 17:51:42 -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 3dcacb2268 Allow and use shorthands such as "ip" or "tcp" for specifying flows. 2008-08-18 14:26:50 -07:00
Ben Pfaff 1aa7f822ed Make ofp_packet_in() print the flow corresponding to the buffer also. 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
Justin Pettit a71357e8f7 Fix dump-flows to be usable by add-flows.
Some of the fields when printing a flow are hex, but they don't have a
preceeding "0x".  When one tries to import them, they're treated as decimal
and weird results occur.  Bug 27.
2008-08-17 23:17:07 -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 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 1c6aac2d04 Fix formatting of flow matches in ofp-print:
Print a comma after wildcard matches as well as exact matches.
2008-08-07 13:29:10 -07:00
Natasha Gude cef6834a20 IP_ARGS takes address of nw_addr 2008-07-30 14:41:47 -07:00
Ben Pfaff f730dded18 Move Autoconf's macro definitions into config.h.
This makes "make" output slightly more readable.
2008-07-21 15:05:53 -07:00
Ben Pfaff 258f32a084 Respond to echo requests in OpenFlow implementations.
Nothing yet sends such requests.  This is preparation for their
use in following commits.
2008-07-01 10:51:50 -07:00
Justin Pettit 34d507b6a6 Improve flow handling in dpctl.
This makes the handling of defining and printing actions more consistent in
dpctl.  The flow portion of the output of "dump-flows" can now be used as the
input of "add-flows".  Flows can be added on the command line with the new
"add-flow" command.
2008-06-30 23:05:14 -07:00
Justin Pettit cb5f13f1b9 Add printing of all supported action types. 2008-06-24 16:48:55 -07:00
Ben Pfaff e5bbe3bcc8 Print actions in ofp_flow_mod messages. 2008-05-28 10:46:54 -07:00
Ben Pfaff 0f81e793e5 Pretty-print port numbers when printing ofp_switch_features messages. 2008-05-28 10:46:54 -07:00
Ben Pfaff cf46e1e8a2 Print special ports by name in ofp_packet_in messages. 2008-05-28 09:58:23 -07:00
Ben Pfaff bdac0887d2 Put newline before packet info in ofp_packet_out pretty-print output. 2008-05-28 09:58:22 -07:00
Ben Pfaff 6c08c24913 Print more special ports by name in ofp-print.c. 2008-05-28 09:58:22 -07:00
Justin Pettit 3e2fac45e7 Cleanup extraneous printing of spaces when dumping flows. 2008-05-19 17:35:01 -07:00
root f2faa2f778 When printing flow expired messages, we should end the line with "\n" instead of "n". 2008-05-07 18:20:13 -07:00
Justin Pettit befb4cbdc3 Fixed problem where the first line of a stats reply message was not showing up on its own line. 2008-05-07 15:35:53 -07:00
root a6c34acd7a Clean-up some compiler warnings related to printing numbers. 2008-05-05 18:49:10 -07:00
Ben Pfaff f7bf3916ff Implement aggregate flow statistics in kernel and userspace switches. 2008-05-02 16:58:33 -07:00