summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchd/ofp.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Learn remote switch flow tables properties to find out where to installrzalamena2016-12-221-5/+2
| | | | | | | the default table-miss flow for OpenFlow 1.3.5. This is enough to make switchd(8) to work with switch(4) and HP 3800 switch out-of-the-box. ok reyk@
* Implement the connection state machine for OpenFlow 1.0 and 1.3 to detectrzalamena2016-12-021-4/+76
| | | | | | | invalid state transitions and invalid protocol version switching after the hello messages exchange. ok reyk@
* Implement support for version negotiation using hello messages. Thisrzalamena2016-11-221-1/+12
| | | | | | | also prevents connections from switching the version in the middle of the operation. tweak from and ok reyk@
* Move ofp_output() into ofp_common.c and few function prototypes intoreyk2016-11-041-25/+1
| | | | switchd.h. No functional change.
* Start reworking the "device" support in switchd: Once connected, areyk2016-10-121-21/+12
| | | | | | | | | | | | | | | | | device is just an fd that is connected to a switch, either via TCP or via /dev/switch. Change the switchctl from "device add" to "connect" etc. This change is an intermediate step towards other changes, including the configuration grammar, so a few things will be left undocumented for now. switchctl(8) examples, switchctl connect /dev/switch0 switchctl connect /dev/switch0 forward-to 10.1.1.1 switchctl connect 127.0.0.1 switchctl connect 127.0.0.1 forward-to 10.1.1.1 switchctl disconnect /dev/switch0 Discussed with rzalamena@
* Remove ofp_validate_header() herereyk2016-10-051-35/+1
|
* Remove local copy of ofp.h and use net/ofp.h insteadreyk2016-09-301-2/+2
|
* Disable write events if there is nothing to write.reyk2016-09-301-2/+3
|
* Implement socket server code that properly handles async I/O, partialreyk2016-09-301-196/+58
| | | | | | | | | | | messages, multiple messages per buffer and important things like connection limits and file descriptor accounting. It works with TCP connections as well as switch(4). The ofrelay.c part replaces networking that was in ofp.c and will soon handle all socket connections of switchd. It is called "ofrelay" because it will be used as client, server, and forwarder. OK rzalamena@
* Rename ofp_send to ofp_outputreyk2016-09-291-2/+2
|
* Fix a memory leak and a loop in the ofp_read() that happens every time arzalamena2016-09-261-2/+4
| | | | | | | | | message is received or a socket is closed. This is just a temporary fix to avoid switchd(8) from hogging the cpu and leaking memory while testing. ok reyk@
* Teach switchd(8) how to fork+exec.rzalamena2016-09-141-8/+3
| | | | | | | | Note: this daemon has the -Wcast-qual compilation flag which trigger a warning that wasn't enable in httpd(8) or relayd(8). This will be fixed in a next diff and then synchronized with other daemons. ok reyk@
* Turn ofp*_debug functions into ofp*_validate functions to follow areyk2016-07-211-6/+43
| | | | | similar approach like iked: first validate the packet, then parse it, and execute actions. debug logging is a side effect of validation.
* fix typos in commentsreyk2016-07-201-2/+2
|
* pledge(2) all the switchd processes.reyk2016-07-201-4/+13
|
* Update OpenFlow 1.3 stub based on the 1.0 code.reyk2016-07-201-1/+2
|
* Correctly use ssize_t instead of size_t for read/write return values.reyk2016-07-191-2/+2
| | | | Pointed out by David Hill and clang.
* Import switchd(8), a basic WIP OpenFlow implementation for OpenBSD.reyk2016-07-191-0/+336
switchd consists of two parts: 1. switchd(8) and switchctl(8), an OpenFlow controller or "vswitch". 2. switch(4), an OpenFlow-aware kernel "bridge". This the 1st part, the driver will be imported later. The code will remain disabled for a while, but it helps development to have it in the tree. switchd currently supports partial OpenFlow 1.0, but the goal is to use OpenFlow 1.3.5 instead (switch(4) already does 1.3.5). For more background information see: http://www.openbsd.org/papers/bsdcan2016-switchd.pdf https://youtu.be/Cuo0qT-lqig With help from yasuoka@ goda@ Import discussed with deraadt@