summaryrefslogtreecommitdiff
path: root/print-openflow-1.0.c
Commit message (Collapse)AuthorAgeFilesLines
* clean K&R style up in function declarations a bitDenis Ovsienko2015-03-051-31/+62
| | | | The function body should have its opening brace on the next line.
* OpenFlow 1.0: address a Coverity warningDenis Ovsienko2015-02-211-2/+1
|
* OpenFlow 1.0: improve BSN extensions supportDenis Ovsienko2015-02-181-5/+198
| | | | | | | | | | | | | | | | | Improve decoding of BSN vendor commands: update printing of commands that set/get mirror port reporting flag, add decoding of shell exec commands. Introduce decoding of vendor-specific actions with BSN as the first such vendor and "mirror" as the first such BSN action. Add a new test case based on a packet capture produced using Trema controller and an Arista 7050SX-64 switch in Arista Networks' test lab. Besides the structures above the capture contains the following items: * OFPT_QUEUE_GET_CONFIG_REPLY with 0 queues (a valid edge case) * OFPT_FEATURES_REPLY with ports 21 and 23 having bogus "config" field (a violation of the protocol, which required temporary patching of the controller to avoid the session shutdown) * a set of IP mask manipulation BSN-specific commands
* OpenFlow 1.0: add missing items to bsn_subtype_strDenis Ovsienko2015-01-301-0/+3
|
* add a comment to print-openflow-1.0.cDenis Ovsienko2015-01-011-0/+10
|
* OpenFlow: handle 5 more BSN subtypesDenis Ovsienko2014-12-151-0/+22
|
* OpenFlow: improve vendor message decodingDenis Ovsienko2014-12-131-1/+222
| | | | | | | Introduce a new function that tries to dispatch an OFPT_VENDOR message to a vendor-specific printer function. Add such a function for Big Switch Networks vendor with about as little decoding as necessary to cover the existing 7050Q OF1.0 capture.
* OpenFlow: add vendor name printingDenis Ovsienko2014-12-131-1/+4
| | | | | | | | The new function goes into print-openflow.c as vendor name decoding is the same in all versions of OpenFlow (although in 1.0 it is "vendor" and in subsequent versions it is "experimenter"). The mapping is from: https://rs.opennetworking.org/wiki/display/PUBLIC/ONF+Registry
* NDOize the rest of util.cDenis Ovsienko2014-04-141-7/+7
|
* Netdissectify the to-name resolution routines.Guy Harris2014-04-041-8/+8
| | | | | | | | Have them take a netdissect_options * argument, and get the "no name resolution" flag from it. Move the declaration of dnaddr_string to addrtoname.h, along with the other XXX-to-string routines.
* NDOize OpenFlow, IEEE slow and telnet decodersDenis Ovsienko2014-03-171-464/+490
|
* NDOize print-ascii.c furtherDenis Ovsienko2014-03-131-1/+1
| | | | | Introduce netdissect_options into hex_and_ascii_print_with_offset(), hex_and_ascii_print() and related functions.
* make consistent use of the "tstr" idiomDenis Ovsienko2013-12-261-38/+41
| | | | | | | | For each decoder that has more than one instance of truncation signaling and prints the same string in each instance make sure that the string is declared as "static const char tstr[]" right after the initial includes block. Where necessary, replace fputs(s, stdout) with equivalent printf("%s", s).
* remove two needless macrosDenis Ovsienko2013-11-261-11/+11
| | | | | ETH_ALEN in print-rrcp.c was unused. OFP_ETH_ALEN in print-openflow-1.0.c was a reinvention of ETHER_ADDR_LEN.
* OpenFlow 1.0: enable decoding of nested framesDenis Ovsienko2013-09-091-2/+29
| | | | | | | | The packet that may be contained in an OFPT_PACKET_IN or OFPT_PACKET_OUT OpenFlow message is a plain Ethernet frame. Make it possible to have ether_print() process that frame, with a controlled verbosity level (see a comment in print-openflow-1.0.c for details). Update an existing test case to employ the new feature.
* OpenFlow 1.0: rewrite without openflow-1.0.hDenis Ovsienko2013-06-261-1/+210
| | | | | | | | | | | | | The first revision of the header file was copied from the original distribution tarball intact to use sizeof() instead of adding new constants on one hand and provide structure definitions for a reference on the other. But as soon as the structures had a portability issue and were removed in commit a6c16ed, the remaining fragments of the header don't justify for a file of its own. This commit maps all relevant bits of the remaining contents of openflow-1.0.h to constants in print-openflow-1.0.c (all being specific to version 1.0 of OpenFlow) and removes the file.
* Fix build issues with the OpenFlow printer on some systems.Guy Harris2013-06-231-60/+61
| | | | | | | | | | | | | | | | | | | | | | | Don't assume we have <stdint.h>. Instead, use the AC_TYPE_ macros to ensure we have the C99 intN_t and uintN_t types; we already include <inttypes.h> in tcpdump-stdinc.h iff we have it. Get rid of the structure declarations in openflow-1.0.h, as they have zero-length arrays (not supported by all the compilers people might be using) and as 1) they're only used in sizeof() and 2) after each one there's an assertion to check that sizeof() returns a specific numerical value so, instead, just #define various _LEN items to those numerical values and use them. Add an openflow.h header with a #define for the length of the basic header, and move the declaration of of10_header_body_print() there.
* OpenFlow 1.0: adjust OFPST_TABLE indentationDenis Ovsienko2013-06-131-2/+2
|
* OpenFlow 1.0: fix OFPST_QUEUE decoding bugDenis Ovsienko2013-06-121-1/+1
| | | | | | | The while loop in of10_queue_stats_reply_print() decremented the remaining length by 104 instead of 32. As soon as that happened the decoding didn't proceed/stop in a normal way and was likely to hit snapend. Fixed.
* add OpenFlow 1.0 decoder (no SSL)Denis Ovsienko2013-05-291-0/+1812
The new file openflow-1.0.h is a verbatim copy of the file openflow.h from the openflow-1.0.0.tar.gz distribution. The new file print-openflow-1.0.c contains a set of functions for OpenFlow 1.0 (wire protocol 0x01) decoding. Of these functions only of10_header_body_print() is exported and used by the minimal OpenFlow decoder. It is intended that future (1.1, 1.2, 1.3.0) OpenFlow version decoders are implemented the same way (in modules of their own), since different versions of OpenFlow specification reuse the same symbols for different numeric values. This way, print-openflow-1.1.c would include openflow-1.1.h and so on. The new test case "of10_p3295-vv" was produced using a Pica8 P-3295 switch and Trema controller running a purpose-built sample application.