| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The function body should have its opening brace on the next line.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Introduce netdissect_options into hex_and_ascii_print_with_offset(),
hex_and_ascii_print() and related functions.
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
ETH_ALEN in print-rrcp.c was unused. OFP_ETH_ALEN in
print-openflow-1.0.c was a reinvention of ETHER_ADDR_LEN.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
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.
|