summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchd/ofrelay.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Learn remote switch flow tables properties to find out where to installrzalamena2016-12-221-1/+3
| | | | | | | 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-1/+2
| | | | | | | invalid state transitions and invalid protocol version switching after the hello messages exchange. ok reyk@
* Fix some styles issues: break big lines and remove some useless spaces.rzalamena2016-11-171-2/+2
|
* Remove "workarounds" for the read and write path that were needed toreyk2016-11-111-94/+14
| | | | | | | | | handle /dev/switch connections that didn't quite behave like TCP connections (no support for writev, no partial reads). With rzalamena's changes to switch(4), it now works as expected and doesn't need any special treatment anymore. OK rzalamena@
* Start reworking the "device" support in switchd: Once connected, areyk2016-10-121-2/+2
| | | | | | | | | | | | | | | | | 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@
* Add support for multipart replies and implement a simple ofp 1.3.5 errorrzalamena2016-10-071-1/+3
| | | | | | message sending function. ok reyk@
* I added a second buffer as fix for the fact that /dev/switch doesn'treyk2016-10-051-6/+7
| | | | | | | | | act like a socket. Unfortunately, this broke handling of jumbo buffers in the adjusted version of ofrelay. Don't abort the connection until there is no more data to read or the connection has been closed. Problem out by rzalamena@
* More debuggingreyk2016-10-051-1/+4
|
* Disable write events if there is nothing to write.reyk2016-09-301-7/+20
|
* Implement socket server code that properly handles async I/O, partialreyk2016-09-301-0/+505
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@