summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchctl/switchctl.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* As per advice from claudio@, further restrict the pledge in switchctl(8).akoshibe2018-10-241-1/+4
| | | | | | | Only stdio is needed when running the 'show *' commands. Everything else is only needed while parsing args and opening sockets. OK claudio@ deraadt@ phessler@
* Add the ability to query a switch(4) instance via its control device. Alsoakoshibe2018-10-211-3/+5
| | | | | | | | | explicitly set the OpenFlow version during the handshake prior to a query. Since switchctl(8) behaves like a controller in this case, a switch can't be connected to switchd(8) while it is being queried in this way. OK claudio@, tb@ and mestre@ for pledge changes
* Use the sizeof operator on a struct not a pointer to one.jsg2017-01-311-2/+2
| | | | ok rzalamena@
* Add simple client to add flows from switchctl. Not finished yet, butreyk2016-11-241-3/+14
| | | | | | it is better for rzalamena and me to work on it in the tree. OK rzalamena@
* Add a simple openflow client to dump switch information. Thereyk2016-11-151-29/+26
| | | | | | | | | | implementation re-uses the openflow code from switchd. Not finished yet, but it is better to continue working on it in the tree. Later versions will also include a way to add flows from the command line - this is being worked on for switchd and some code of the "ASCII-to-flow" parser will be shared here as well. As discussed with and lightly tested by rzalamena@
* Start reworking the "device" support in switchd: Once connected, areyk2016-10-121-30/+33
| | | | | | | | | | | | | | | | | 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@
* Adjust the mac_port format string since it got upgraded to 32bitsreyk2016-09-281-2/+2
| | | | (following OpenFlow 1.3).
* pledge switchctlreyk2016-07-201-1/+9
|
* Import switchd(8), a basic WIP OpenFlow implementation for OpenBSD.reyk2016-07-191-0/+348
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@