summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchd/ofcconn.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-3/+3
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Start reworking the "device" support in switchd: Once connected, areyk2016-10-121-19/+23
| | | | | | | | | | | | | | | | | 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 local copy of ofp.h and use net/ofp.h insteadreyk2016-09-301-2/+3
|
* Implement socket server code that properly handles async I/O, partialreyk2016-09-301-2/+1
| | | | | | | | | | | 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@
* Teach switchd(8) how to fork+exec.rzalamena2016-09-141-3/+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@
* Fix previous. Obvously the condition is reversed.yasuoka2016-08-081-2/+2
|
* Split ofcconn into switch part and connection part to make the switchyasuoka2016-08-081-191/+302
| | | | | | part be able to have multiple connections. ok reyk.
* fix typos in commentsreyk2016-07-201-5/+5
|
* pledge(2) all the switchd processes.reyk2016-07-201-5/+19
|
* Correctly use ssize_t instead of size_t for read/write return values.reyk2016-07-191-3/+4
| | | | Pointed out by David Hill and clang.
* A bit of cleanup and style changes. ofcconn needs more work.reyk2016-07-191-56/+57
|
* Don't use .p_shutdown in the proc structreyk2016-07-191-1/+2
|
* Import switchd(8), a basic WIP OpenFlow implementation for OpenBSD.reyk2016-07-191-0/+509
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@