summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchctl (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-214-9/+37
| | | | | | | | | 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
* struct sockaddr_storage is guaranteed to be large enough, no need to checkflorian2018-10-151-9/+1
| | | | | the size. OK kn, deraadt
* #if 0 unused chunk for nowderaadt2017-08-011-1/+5
|
* /tmp/cvsa9y4jmespie2017-07-061-2/+2
|
* Use the sizeof operator on a struct not a pointer to one.jsg2017-01-311-2/+2
| | | | ok rzalamena@
* log_verbose() -> log_setverbose()reyk2017-01-091-3/+3
|
* Don't convert endianess for flow-mod command field, it is a 8 bit field.rzalamena2016-12-221-3/+3
|
* Implement the connection state machine for OpenFlow 1.0 and 1.3 to detectrzalamena2016-12-021-12/+42
| | | | | | | invalid state transitions and invalid protocol version switching after the hello messages exchange. ok reyk@
* Add simple client to add flows from switchctl. Not finished yet, butreyk2016-11-244-52/+339
| | | | | | it is better for rzalamena and me to work on it in the tree. OK rzalamena@
* Unbreak the tree: OFP_GROUP_ANY was renamed to OFP_GROUP_ID_ANY.tb2016-11-181-2/+3
| | | | fix found joint with rpe, ok reyk
* Add ofp_validate() for all supported versions. Will be used by switchctl,reyk2016-11-171-2/+2
| | | | no functional change.
* - Ar arg Ar arg is better written as Ar arg argjmc2016-11-151-7/+7
| | | | - sort
* Add a socket_setport() util function, in addition to socket_getport(),reyk2016-11-151-1/+6
| | | | | and use it in switchctl to set a default port for "dump". No functional change for switchd itself.
* Describe the 'dump' commandreyk2016-11-151-3/+22
|
* swap dump arguments to expect the address firstreyk2016-11-151-6/+12
|
* Add a simple openflow client to dump switch information. Thereyk2016-11-155-38/+266
| | | | | | | | | | 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@
* spread the Xr! as a bonus, typo fix in switchd.conf.5 too;jmc2016-10-201-3/+4
| | | | Xr diff from kapetanakis giannis
* Start reworking the "device" support in switchd: Once connected, areyk2016-10-124-87/+127
| | | | | | | | | | | | | | | | | 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
|
* The -DNAME=switch flag is an artifact from the PoC when I couldn'treyk2016-07-191-9/+6
| | | | decide on a name. Remove it and fix the name to switchd now.
* Remove unused variablereyk2016-07-191-7/+1
|
* Import switchd(8), a basic WIP OpenFlow implementation for OpenBSD.reyk2016-07-195-0/+808
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@