summaryrefslogtreecommitdiff
path: root/print-openflow.c
Commit message (Collapse)AuthorAgeFilesLines
* clean K&R style up in function declarations a bitDenis Ovsienko2015-03-051-4/+8
| | | | The function body should have its opening brace on the next line.
* OpenFlow: add vendor name printingDenis Ovsienko2014-12-131-0/+19
| | | | | | | | 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 OpenFlow, IEEE slow and telnet decodersDenis Ovsienko2014-03-171-18/+19
|
* make consistent use of the "tstr" idiomDenis Ovsienko2013-12-261-2/+5
| | | | | | | | 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).
* Fix build issues with the OpenFlow printer on some systems.Guy Harris2013-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* add OpenFlow 1.0 decoder (no SSL)Denis Ovsienko2013-05-291-0/+3
| | | | | | | | | | | | | | | | | | 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.
* add minimal OpenFlow decoding frameworkDenis Ovsienko2013-05-291-0/+112
This change registers OpenFlow TCP port number and adds processing of respective packets with openflow_print(), a new function that understands the minimal OpenFlow header format and can iterate over messages within a snapshot that starts with the header.