Glen Gibb
1feb499bf3
Merge commit '7b3017805866b2bb36a092a3ea25ff0ec9b6fd9e' into experimental
...
Conflicts:
datapath/hwtable-dummy/hwtable-dummy.c
datapath/hwtable_dummy/Modules.mk
datapath/hwtable_dummy/hwtable_dummy.c
datapath/hwtable_nf2/hwtable_nf2.c
utilities/dpctl.c
Resolved above conflicts
2008-09-22 16:02:39 -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
Ben Pfaff
9c6191bf82
dhcp: Make dhcp_msg_to_string() support a multiline format also.
...
The upcoming ofp-discover program wants to print out the binding
information, and dhcp_msg_to_string() is pretty close to what it
wants. But one-field-per-line is easier for other programs to parse.
2008-07-22 14:01:10 -07:00
Ben Pfaff
489d9ca0be
dhcp: Break out netdev configuration from DHCP binding.
...
This allows us to have DHCP clients that don't actually bind or unbind
a network device's IP address. This is useful for doing controller
discovery without actually reconfiguring a network device.
2008-07-22 14:01:01 -07:00
Ben Pfaff
67a603dde8
Make openflow.h SWIG-friendly.
2008-07-21 11:39:39 -07:00
Ben Pfaff
6d841e9f81
Implement DHCP client.
2008-07-18 14:16:40 -07:00
Ben Pfaff
d838ee2e03
vconn: Make errors in vconn names non-fatal errors.
...
This prevents bad vconn names obtained via discovery from killing
the secure channel.
2008-07-18 14:16:40 -07:00
Ben Pfaff
d07d22508e
vconn: New function vconn_ssl_is_configured().
...
The secure channel, in discovery mode, wants to enable TCP connections
by default only if SSL has not been configured. This function allows
it to do that.
2008-07-18 14:16:40 -07:00
Ben Pfaff
1297ff43df
vconn: Add new function vconn_transact() and use it to simplify dpctl.c.
2008-07-18 14:16:38 -07:00
Ben Pfaff
4d90ee6aef
vconn: Add utility functions make_openflow() and update_openflow_length().
...
Use these functions to simplify code that creates and sends
OpenFlow packets.
2008-07-18 14:08:18 -07:00
Ben Pfaff
c57a8d1089
rconn: Add questionability.
2008-07-18 14:07:03 -07:00
Ben Pfaff
b8769714c1
rconn: Rewrite to use explicit state machine.
2008-07-18 14:07:03 -07:00
Ben Pfaff
e334e4e0e7
rconn: Add new max_backoff argument to rconn_new().
...
This allows the caller more control over reconnection backoff.
2008-07-18 14:07:03 -07:00
Ben Pfaff
bc286c00ea
netdev: add ability to set IPv4 addresses and add a default gateway.
2008-07-18 14:07:03 -07:00
Ben Pfaff
2afec34627
netdev: Add ability to permanently set device flags.
2008-07-18 13:55:12 -07:00
Ben Pfaff
24eb1d1546
netdev: Add more functions for manipulating device flags.
...
These are convenient for use in secchan and elsewhere.
2008-07-18 13:43:41 -07:00
Ben Pfaff
9dc091a35f
netdev: New function netdev_drain().
2008-07-18 13:42:38 -07:00
Ben Pfaff
e55d52c988
netdev: Add argument to netdev_open() to specify Ethernet type to capture.
...
This is needed by the controller, which wants to listen only for
OpenFlow discovery BPDUs on its network devices.
Also, update all existing callers.
2008-07-18 13:42:38 -07:00
Ben Pfaff
b563a5247c
netdev: Do not modify the caller's buffer in netdev_send().
...
This makes it possible to use a buffer whose contents are stack-allocated.
2008-07-18 13:42:38 -07:00
Ben Pfaff
f422511c1a
packets: Make flow_extract() output a pointer to L7 data also.
...
Useful for the DHCP client, which wants to pick apart UDP packets
and extract the DHCP payload.
2008-07-18 13:42:38 -07:00
Ben Pfaff
cc57cfe85c
packets: New macros for detecting IP fragments.
2008-07-18 13:42:38 -07:00
Ben Pfaff
7470a21307
packets: Move IP checksum functionality into new csum.c, csum.h.
2008-07-18 13:42:38 -07:00
Ben Pfaff
841ae14767
packets: Distinguish max Ethernet length with and without VLAN header.
2008-07-18 13:42:37 -07:00
Ben Pfaff
6231bb85af
packets: New IP header macros.
2008-07-18 13:42:37 -07:00
Ben Pfaff
49d9301d46
packets: Make Ethernet broadcast address available as a global object.
2008-07-18 13:42:37 -07:00
Ben Pfaff
0ad4720dc6
buffer: New functions buffer_reserve(), buffer_push(),
...
buffer_try_pull().
2008-07-18 13:42:37 -07:00
Ben Pfaff
86ad61454e
buffer: Rename buffer_reserve_headroom to buffer_prealloc_headroom.
...
Similarly for buffer_reserve_tailroom.
The new name better reflects what they do, and make way for a different
use of the term "reserve" in the upcoming buffer_reserve() function.
2008-07-18 13:42:37 -07:00
Ben Pfaff
d6ea83302a
buffer: Make buffer_pull() return the start of the pulled data.
...
Some callers find this useful.
2008-07-18 13:42:37 -07:00
Ben Pfaff
47cebfdbef
New function xmemdup0().
2008-07-18 13:42:37 -07:00
Ben Pfaff
f10a48ce3a
New function ds_clear().
2008-07-18 13:42:37 -07:00
Ben Pfaff
61e2e15051
New function random_range().
2008-07-18 13:42:37 -07:00
Ben Pfaff
1e0f761030
New header file timeval.h for time-related functionality.
2008-07-18 13:42:37 -07:00
Ben Pfaff
fd90251602
New header file "type-props.h" for testing properties of types.
2008-07-18 13:42:37 -07:00
Ben Pfaff
792576de01
Log an error when the time is negative at vlog startup.
2008-07-18 13:24:16 -07:00
Ben Pfaff
f81c152daf
New function eth_addr_is_zero().
2008-07-18 13:23:23 -07:00
Ben Pfaff
a92ae5b340
New function netdev_arp_lookup().
...
The secchan needs to handle ARP requests from the controller itself, so
it has to translate the controller's IP address into a MAC address to
allow it to match those packets on dl_src. (OpenFlow doesn't allow us
to look into ARP packets and match on the encapsulated IP addresses, so
this is the best we can do.)
2008-07-18 13:23:23 -07:00
Ben Pfaff
4532f9cdfb
New function rconn_get_ip().
2008-07-18 13:23:23 -07:00
Ben Pfaff
809743618e
New function vconn_get_ip().
...
The secchan needs to know the IP address of the peer so that it can
handles ARP requests from the controller by itself.
2008-07-18 13:23:23 -07:00
root
f90bb58969
OpenFlow Table Monitoring (table-mtr) option to dpctl utility
2008-07-17 17:31:48 -07:00
Ben Pfaff
e88c18152d
Assert on structure sizes in openflow.h.
...
This causes the build to fail if structures are not the sizes that we
expect.
2008-07-17 09:47:25 -07:00
Ben Pfaff
b993fa9c2b
Adjust OpenFlow to have same structure layout on 32- and 64-bit platforms.
...
Pointed out by "Brandon Heller" <brandon.heller@gmail.com >.
2008-07-17 09:47:25 -07:00
Ben Pfaff
70cb7e7e05
Fix typo in comment.
2008-07-08 18:48:29 -07:00
Ben Pfaff
bebf175930
Make the secure channel and controller send out keepalives.
...
It can happen that the secure channel thinks that it is connected
to the controller, but in fact the connection has dropped. For
example, a switch intermediate between the secure channel and the
controller could have a flow inserted, due to a malfunction, that
causes packets in one direction or the other to be dropped. When
this happens, the Linux kernel's TCP implementation will continue
retransmitting packets for somewhere between 13 and 30 minutes,
depending on the connection's retransmission timeout (according
to linux/Documentation/networking/ip-sysctl.txt) with the default
Linux settings.
We want to detect the lost connection and re-connect much faster
than that. We use OpenFlow echo request and reply messages: if
no message is received from the controller for N seconds, we
send out an echo request. If no reply (actually, any message at
all) is received for an additional N seconds, then we assume
that the connection has been lost, and reconnect.
2008-07-01 11:14:45 -07:00