summaryrefslogtreecommitdiffstats
path: root/usr.sbin/switchd (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Define constmap in ofp_map.h to be shared along with ofp_map.creyk2016-11-184-16/+12
|
* Remove leading _ from include guards as this violates the reserved space.reyk2016-11-183-12/+12
|
* Add more maps to print. As discussed with rzalamena@reyk2016-11-181-1/+6
|
* Exclude the description field from the generated maps by default.reyk2016-11-181-5/+18
|
* Small code improvements:rzalamena2016-11-181-35/+47
| | | | | | | - Free ibufs on validation failures; - Don't use htons() for flow-mod command; ok reyk@
* Fix the flowmod header to send the correct command and buffer id.reyk2016-11-181-1/+7
| | | | OK rzalamena@
* Define the struct constmap in each generated C file.reyk2016-11-181-3/+7
|
* Fix file reference in generated comment OK rzalamena@reyk2016-11-181-3/+3
|
* Fix some styles issues: break big lines and remove some useless spaces.rzalamena2016-11-173-8/+11
|
* In oflowmod, automatically open the instructions block with the firstreyk2016-11-171-3/+9
| | | | instruction. This allows to make the grammar more flexible.
* Add an abstraction layer / API to create flows including all matchesreyk2016-11-174-39/+321
| | | | | | | | | and instructions. This makes it easier to integrate flow features in switchd and switchctl later. Written and committed during a long flight. OK rzalamena@
* Accept OFP_XM_T_ETH_TYPE.reyk2016-11-171-1/+11
| | | | OK rzalamena@
* Add ofp_validate() for all supported versions. Will be used by switchctl,reyk2016-11-172-2/+22
| | | | no functional change.
* Added the missing code to build flow-mod messages and to installrzalamena2016-11-173-3/+123
| | | | | | table-miss by default for switch(4). ok reyk@
* Sync switchd(8) and vmd(8) with the latest proc.c changes. This syncrzalamena2016-11-162-7/+27
| | | | | | basically imports the imsg_flush() fix from reyk@ in httpd(8). ok reyk@
* Add a socket_setport() util function, in addition to socket_getport(),reyk2016-11-152-2/+21
| | | | | and use it in switchctl to set a default port for "dump". No functional change for switchd itself.
* Move ofp_validate_header() into ofp_common.c. No functional change.reyk2016-11-113-40/+40
|
* Remove "workarounds" for the read and write path that were needed toreyk2016-11-112-96/+15
| | | | | | | | | 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@
* Implement support for flow-mod messages validation, this includes:rzalamena2016-11-071-2/+300
| | | | | | action and instructions validation. ok reyk@
* Fix a small parsing error in packet-in: don't count ofp_match header bytesrzalamena2016-11-071-1/+2
| | | | | | | when iterating over the OXMs. It only works because the last bytes are either padding or something that looks like OXM. ok reyk@
* Empty -> empty in log messagesreyk2016-11-041-3/+3
|
* Move ofp_output() into ofp_common.c and few function prototypes intoreyk2016-11-044-43/+42
| | | | switchd.h. No functional change.
* spread the Xr! as a bonus, typo fix in switchd.conf.5 too;jmc2016-10-202-5/+9
| | | | Xr diff from kapetanakis giannis
* Implement simple feature request/reply support so we can get morerzalamena2016-10-131-8/+71
| | | | | | | | information about the target switch and its datapath id. Also I commented out some requests that are not currently being used, like table properties, flow dump and description. ok reyk@
* Start reworking the "device" support in switchd: Once connected, areyk2016-10-128-167/+278
| | | | | | | | | | | | | | | | | 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@
* Teach switchd(8) how to send set_config to the switch so we can be ablerzalamena2016-10-121-2/+54
| | | | | | to get packet payloads from switch(4). ok reyk@
* copy updated log.c from vmd: for correctness, save errno when doingreyk2016-10-121-8/+11
| | | | additional actions before printing it. OK rzalamena@
* Sync proc.c file vmd(8) and switchd(8).rzalamena2016-10-111-78/+90
| | | | | | | | | New changes: * Fix msgbuf_write() usage idiom; * Add context (function name) that fatal()ed; * Use less fds on startup; ok mlarkin@, reyk@
* Move some shared code into a new file.reyk2016-10-074-894/+938
| | | | Discussed with rzalamena@
* Add support for multipart replies and implement a simple ofp 1.3.5 errorrzalamena2016-10-073-11/+143
| | | | | | message sending function. ok reyk@
* Switch switchd to the _switchd user.reyk2016-10-061-2/+2
|
* Sync with httpd(8) proc file. Check for dup2() usage to avoid oldd == newdrzalamena2016-10-051-2/+8
| | | | | | and remove the CLOEXEC with fcntl() if necessary. ok reyk@
* Call setsid() to create a new session for the executed processes.reyk2016-10-051-1/+5
| | | | | From deraadt@ OK rzalamena@
* sync proc.c with vmd: add p_pw to specify a non-standard user for a process.reyk2016-10-052-5/+11
| | | | OK rzalamena@
* Remove ofp_validate_header() herereyk2016-10-051-35/+1
|
* Move ofp_validate_header() to ofp10.c until we have a better placereyk2016-10-051-1/+35
|
* 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
|
* Remove local copy of ofp.h and use net/ofp.h insteadreyk2016-09-308-881/+20
|
* Disable write events if there is nothing to write.reyk2016-09-303-10/+25
|
* Open next available tap(4) device instead of just tap0reyk2016-09-302-8/+15
|
* Implement socket server code that properly handles async I/O, partialreyk2016-09-3012-233/+698
| | | | | | | | | | | 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@
* Add print_hex() for debugging of received packets (from iked)reyk2016-09-292-2/+24
|
* Rename ofp_send to ofp_outputreyk2016-09-294-15/+15
|
* Teach switchd(8) how to request flow entries and how to validate therzalamena2016-09-291-16/+322
| | | | | request/reply. With this we get the OXM type/value printing for all directions.
* handle AF_UNIX sockaddrsreyk2016-09-291-2/+7
|
* Replace memset in ibuf_zero with explicit_bzero as done in iked.reyk2016-09-291-4/+6
|
* Use the macro OFP_ALIGN() to find alignment instead of rolling my own way.rzalamena2016-09-291-7/+2
| | | | ok reyk@
* Teach switchd(8) how to ask for and debug equipment descriptionrzalamena2016-09-291-1/+43
| | | | requests / replies.
* Teach switchd(8) some multipart table properties request/parse code torzalamena2016-09-293-38/+436
| | | | handle basic display.