Commit Graph

14 Commits

Author SHA1 Message Date
Francois-Xavier Le Bail
b38f324af9 Add a summary comment in all other printers
Moreover:
Remove some redundant comments
Update some summary comments
Update the specification URL for ATA over Ethernet (AoE) protocol
2016-08-15 22:42:38 +02:00
Francois-Xavier Le Bail
436ced3bd8 Change istr[] (for invalid string) to be global 2016-01-28 14:24:19 +01:00
Francois-Xavier Le Bail
99c91c3aec Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'
Get the full log via: git log --follow netdissect-stdinc.h
2015-09-10 08:50:40 +02:00
Francois-Xavier Le Bail
3fb4560e1e Rename cstr[] to istr[] like invalid string
Moreover:
Hamonise the output for error messages
Add istr[] in print-babel.c
2015-09-06 20:47:42 +02:00
Francois-Xavier Le Bail
7ea344d76a Use the word 'invalid' for 'malformed' or 'corrupted' packets
An invalid packet could be:
1) built malformed originally by the sender or a fuzz tester,
2) became corrupted in transit.
2015-09-06 13:44:54 +02:00
Francois-Xavier Le Bail
c1c3c77463 Printers must include 'netdissect.h', not 'interface.h' 2015-09-05 23:35:58 +02:00
Denis Ovsienko
38700c7f24 dismiss NETDISSECT_REWORKED macro
The purpose of this macro was to enable the file-by-file switch to NDO,
after which only tcpdump.c had a use of it and the definitions guarded
by it. Update tcpdump.c not to require them any more and dismiss the
unused definitions.
2015-03-22 10:06:15 +00:00
Denis Ovsienko
60a835d80f clean K&R style up in function declarations a bit
The function body should have its opening brace on the next line.
2015-03-05 10:35:03 +00:00
Denis Ovsienko
94b4c01e1d OpenFlow: add vendor name printing
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
2014-12-13 18:06:04 +00:00
Denis Ovsienko
5663cdab5e NDOize OpenFlow, IEEE slow and telnet decoders 2014-03-17 19:18:47 +04:00
Denis Ovsienko
d8acd8f5d0 make consistent use of the "tstr" idiom
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).
2013-12-26 18:19:50 +04:00
Guy Harris
a6c16ed8ab Fix build issues with the OpenFlow printer on some systems.
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.
2013-06-23 14:03:38 -07:00
Denis Ovsienko
fd35562d7e add OpenFlow 1.0 decoder (no SSL)
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.
2013-05-29 13:03:23 +04:00
Denis Ovsienko
ceeea95918 add minimal OpenFlow decoding framework
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.
2013-05-29 13:03:23 +04:00