Commit Graph
290 Commits
Author SHA1 Message Date
Ben Pfaff b5b2cd3880 Mark functions not meant to be exported as static. 2008-04-22 17:48:22 -07:00
Justin Pettit 0d3a0643c4 Switch from "stat" to "stats" everywhere. 2008-04-16 15:38:25 -07:00
Natasha Gude 8623e6c16e Updated version references to OFP_VERSION 2008-04-16 11:30:55 -07:00
Justin Pettit d485c3f0ce Finish removing references to the MAC table. 2008-04-15 13:42:35 -07:00
Ben Pfaff 6f8d45bf7d Merge remote branch 'repo/master' into stats
Conflicts:

	datapath/table-mac.c
2008-04-15 09:57:38 -07:00
Ben Pfaff d2552c15f3 Make table_id in OpenFlow messages 8 bits, since 255 should be enough.
Suggested by Justin.
2008-04-15 09:56:46 -07:00
Ben Pfaff 0a1a667973 Make duration in ofp_flow_stats a 32-bit quantity (instead of 16).
Otherwise duration is capped at under 24 hours.

Suggested by Justin.
2008-04-15 09:56:41 -07:00
Justin Pettit 0a9024a2d7 Changes based on feedback from GigaFin. 2008-04-10 15:50:25 -07:00
Ben Pfaff f6cae73ec3 Implement OpenFlow statistics in switches and in dpctl.
This has two notable omissions.  First, only at most 4k of flow statistics
are reported.  Second, aggregate statistics are not yet supported.  Both
of these are fairly easily fixable, just not fixed yet.
2008-04-04 16:22:40 -07:00
Ben Pfaff a14c841f32 Factor out printing the list of available vconns. 2008-04-04 16:22:23 -07:00
Ben Pfaff 60a87c9b00 Break data_hello and control_hello messages into multiple messages.
We want to allow multiple OpenFlow connections to a switch, so that
dpctl and other management tools can also connect to a switch that
is connecte to the controller.  These tools will want to fetch the
information in the data_hello message, but currently this can only
be done by sending a control_hello message, which changes the
switch configuration state.  So breaking the hello messages up into
multiple different messages, only some of which affect configuration
state, cures the problem.

Also, clean up the kernel datapath a bit, by adding helper functions
for allocating and resizing Generic Netlink messages that encapsulate
OpenFlow messages.
2008-04-04 16:22:21 -07:00
Ben Pfaff ae3f2361b6 Allow secchan to listen for management connections also.
This is needed in the userspace switch code also.  That
change is implemented in later change "Send replies to
OpenFlow requests only to the sender".  Really that part
of the change should be moved into this one, but intervening
changes are intertwined enough with the same code to
make that difficult.
2008-04-04 16:20:55 -07:00
Ben Pfaff 14da11884d Rename controller_connection to rconn and use it in secchan also.
Also, clean up code and add comments.
2008-04-04 16:20:55 -07:00
Ben Pfaff 3140992bb7 Make vconn-tcp log an error when the connection drops mid-packet. 2008-04-04 16:20:55 -07:00
Ben Pfaff 8240e9cdc7 Make vconn log all incoming and outgoing OpenFlow packets at debug level. 2008-04-04 16:20:55 -07:00
Ben Pfaff c2fa32706e Add new functions for pretty-printing an OpenFlow message to a string.
This makes it possible to send pretty-printed versions of OpenFlow
messages to vlog.
2008-04-04 16:20:55 -07:00
Ben Pfaff 0a0a1dbe4c Add vlog functions and macros for testing whether a module and level are enabled. 2008-04-04 16:20:54 -07:00
Ben Pfaff f57b5979f4 Fix bug in vconn-tcp, vconn-ssl that prevented minimum-length OpenFlow packets from being received correctly. 2008-04-04 16:20:54 -07:00
Ben Pfaff d819180e3d Add comments to queue module. 2008-04-01 09:52:59 -07:00
Ben Pfaff 327a6be24f Clean up and comment poll-loop module. 2008-04-01 09:52:59 -07:00
Ben Pfaff 57ed58bca4 Get rid of ip.h, migrating its users to packets.h. 2008-04-01 09:52:59 -07:00
Ben Pfaff d927b51cb4 Get rid of mac.h, migrating its users to packets.h.
As a consequence, this fixes tests for multicast and local Ethernet
addresses, which formerly tested for the high bits but should
have tested for the low bits of the first octet.
2008-04-01 09:52:59 -07:00
Ben Pfaff 34e3dc5916 Fix memory leak in poll-loop.c. 2008-04-01 09:52:59 -07:00
Ben Pfaff 8a7d8ff6bf Compile, but do not distribute, the generate file dhparams.c.
Improves upon 3d5c5b2b2, "Remove explicit addition of auto-generated
dhparams.c", by allowing "make" to work as well as "make dist" :-)
2008-03-28 09:36:45 -07:00
Justin Pettit 3d5c5b2b2a Remove explicit addition of auto-generated dhparams.c, since it makes "make dist" puke. 2008-03-28 00:17:45 -07:00
casado 3f0201adb5 Update copyright on all non-GPL files 2008-03-27 20:12:18 -07:00
Ben Pfaff 18f6c89fb0 Set l4 pointer properly in buffers that contain IP options.
The important part of this change is handling of IP options.  The
rest is intended to ensure that packet->l3 and packet->l4 never
point outside the valid range of a packet in the presence of a
minimum-length Ethernet frame.  Other code (particularly in forward.c)
assumes that if the IP protocol is TCP or UDP, then packet->l4 points
to a tcp_header or udp_header.  Whether this is a good idea is
debatable--it probably warrants clean-up, at least--but that what's
there now.
2008-03-27 17:50:33 -07:00
Ben Pfaff ee5d466f7f New function list_replace(), to replace a list element in-place. 2008-03-27 17:50:33 -07:00
Ben Pfaff 76c58e37e3 Add pointers to headers to buffer, and initialize them in flow_extract.
This will be used in the userspace switch implementation.
2008-03-27 17:50:33 -07:00
Ben Pfaff bce273b4c0 Add abstraction of packet queue, and use it in the controller.
The packet queue abstraction will also be used in the userspace
switch.
2008-03-27 17:50:33 -07:00
Ben Pfaff a9111b6015 Add the ability to connect to a vconn asynchronously.
Until now, vconn_connect() has always completed the connection
synchronously, blocking as necessary.  In the userspace
switch, we want to be able to continue forwarding packets even
if the connection to the controller drops.  Thus, this change set
that makes that possible.

The approach taken is perhaps more ambitious than needed, as it
actually adds a new high-level mechanism for polling on arbitrary
file descriptors.  This necessitates quite a bit of change to
each of the userspace programs that use vconns, but it also has
the effect of simplifying them.  The new structure of these programs
is a lot less fragile than the old one (which tended to end up
livelocking or hanging when something wasn't quite right), so it
seems like the changes are worth it.
2008-03-27 17:50:33 -07:00
Ben Pfaff 5f9a684de5 Add 1024-bit Diffie-Hellman parameters to vconn-ssl.
1024-bit Diffie-Hellman is somewhat weak, but I haven't been able to
figure out how to make OpenSSL use longer Diffie-Hellman keys than that.
If this isn't available, OpenSSL doesn't let connections proceed.

This change should be reverted when we figure out how to make OpenSSL
use longer Diffie-Hellman keys.
2008-03-27 17:50:33 -07:00
Ben Pfaff 5875f5b634 Make vlog preserve errno.
This means that adding logging to code disturbs the program's state
as little as possible.  This is a precautionary measure, not in response
to any particular bug.
2008-03-27 17:50:33 -07:00
root 291431ce2d Add "#include <string.h>" so strerror() doesn't produce compiler warnings. 2008-03-20 18:14:58 -07:00
Justin Pettit d170209c76 Make sure all the needed SSL files are included in generated distributions. 2008-03-19 23:13:42 -07:00
Ben Pfaff 70da0ae278 Punctuation and grammar fixes. 2008-03-19 09:52:32 -07:00
Ben Pfaff 800a2f4c03 Change fatal errors in SSL connection from VLOG_DBG to VLOG_ERR.
Suggested by Justin.
2008-03-19 09:52:04 -07:00
Ben Pfaff fc1ff3f88a Remove support for 512- and 1024-bit Diffie-Hellman.
As Justin points out, these key lengths are too low-security to be acceptable
any longer.
2008-03-19 09:37:11 -07:00
Ben Pfaff cf6207b610 Support SSL in secchan and controller. 2008-03-13 15:17:45 -07:00
Martin Casado 468e00132f Initial import 2008-03-04 13:12:53 -08:00