Commit Graph

28 Commits

Author SHA1 Message Date
Francois-Xavier Le Bail
944e93fa4c Remove function specifier 'inline' in printers
It was mostly used with large functions.

Moreover:
Put some function definition names at the beginning of line.
Fix a space.
2018-01-26 20:59:32 +01:00
Guy Harris
fb2479d733 Always include <config.h> rather than "config.h".
This can prevent bizarre failures if, for example, you've done a
configuration in the top-level source directory, leaving behind one
config.h file, and then do an out-of-tree build in another directory,
with different configuration options.  This way, we always pick up the
same config.h, in the build directory.
2018-01-21 12:27:28 -08:00
Francois-Xavier Le Bail
513f782ae1 Use quoted include netdissect-stdinc.h instead of angle-bracketed one 2018-01-21 10:28:15 +01:00
Guy Harris
64677b0d78 Clean up signed vs. unsigned. 2018-01-11 11:52:30 -08:00
Francois-Xavier Le Bail
e2982e7f6f Update ND_PRINT() as a variadic macro 2018-01-07 13:36:41 +01:00
Francois-Xavier Le Bail
d526e47658 Use ND_TTEST_SIZE()/ND_TCHECK_SIZE() macros (1/n) 2018-01-03 21:32:07 +01:00
Francois-Xavier Le Bail
f9da547426 IPNET: Use nd_ types, add EXTRACT_ calls, tstr[] and bounds checks 2018-01-02 21:11:16 +01:00
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
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
c1c3c77463 Printers must include 'netdissect.h', not 'interface.h' 2015-09-05 23:35:58 +02:00
Guy Harris
69cb46af91 Fix a bunch of de-constifications. 2015-04-26 17:24:42 -07: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
Guy Harris
a6f81d534d Leave it up to ip6_print() to handle non-IPv6-capable systems.
Always define and declare ip6_print(), always compile print-ip6.c, and
always call it if we recognize a payload as IPv6.  If INET6 isn't
defined, ip6_print() will just print the length and note that printing
isn't supported.

That way, we don't do weird dissection of IPv6 packets on systems
without IPv6 support, due to, for example, ethertype_print() returning 0
("not dissected") for IPv6 packets on those systems (IPv6-over-Frame
Relay was dissected weirdly due to this).
2014-10-01 15:32:11 -07:00
Guy Harris
1cde6435df Netdissectify the to-name resolution routines.
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.
2014-04-04 00:43:46 -07:00
Denis Ovsienko
979fc38d03 make use of ND_DEFAULTPRINT() 2014-03-26 18:52:40 +04:00
Denis Ovsienko
1fe6e66ece make use of NETDISSECT_REWORKED
Update the already converted decoders to define the macro and to include
interface.h instead of netdissect.h. Fix incurred compile errors.
2014-03-15 14:19:49 +04:00
Denis Ovsienko
83bec9d56c refine some past NDO conversions
Don't include unneeded headers and replace a few remaining printf's.
2014-03-12 18:11:23 +04:00
Denis Ovsienko
88e479b75e don't include pcap.h needlessly
Both interface.h and netdissect.h include <pcap.h>, thus most files
should not include it regardless if these need it or not. The only
exceptions so far remain:
* addrtoname.c
* missing/datalinks.c
* missing/dlnames.c
* tcpdump.c
2014-02-28 18:11:09 +04:00
Denis Ovsienko
69f6f4392a don't include addrtoname.h needlessly 2014-02-25 17:53:08 +04:00
Guy Harris
27d428c0a1 Pull a bunch of headers into the only source file that includes them.
For headers included in only one source file, put the header contents in
the source file in question, and get rid of a bunch of stuff from the
header not used in the source file.
2013-12-30 22:52:15 -08:00
Denis Ovsienko
7de355927b justify declarations of struct tok arrays
Make sure all of them are declared const and most of them -- static.
Proper declaration of token arrays is a common review point for new code
that is based on existing decoders. Thus fix the issue at its root.
2013-09-24 20:54:03 +04:00
Guy Harris
a91d20cc84 Convert the IPv6 printer to use netdissect. 2010-11-07 12:50:16 -08:00
Michael Richardson
b45fabd132 This commit makes ipnet_if_print the first NDO aware top-level
printer.
Merge commit 'origin/master'

Conflicts:
	netdissect.h
2010-01-10 14:36:07 -05:00
Guy Harris
878889bc21 ether_encap_print() is a utility for use by printers for protocols that
use Ethernet types, to call the appropriate printer routine for the
encapsulated type.  IPNET is the only protocol using IPNET types, so
ipnet_encap_print() isn't needed.
2010-01-10 14:32:12 -05:00
Guy Harris
5f947ac9b4 XXX_if_print() routines are not passed a "struct netdissect_options *",
so ipnet_if_print() can't expect one.

ipnet_print() isn't called from outside print-ipnet.c, so make it static.
2009-11-26 14:57:38 -08:00
Guy Harris
0c3032509b ether_encap_print() is a utility for use by printers for protocols that
use Ethernet types, to call the appropriate printer routine for the
encapsulated type.  IPNET is the only protocol using IPNET types, so
ipnet_encap_print() isn't needed.
2009-11-25 13:26:52 -08:00
Michael Richardson
052094d865 updated print-ipnet.c to use netdissect options structure 2009-11-24 21:31:04 -05:00
Darren Reed
b116cd9ac4 The patches attached to this email are required to get a fully working tcpdump
on OpenSolaris, or Solaris Express Community Edition, build 125 and later.

The attached patch introduces support for printing out the IPNET headers used
for packet capture inside of zones that share their networking with the global
zone and for packets "transmitted" between zones.

tcpdump 4.0.0 will ship with builds 129 and later of OpenSolaris/SXCE and
when run as root with the '-L' option, should behave as below to indicate that
the system is fully functional:

Data link types (use option -y to set):
 DOCSIS (DOCSIS) (printing not supported)
 IPNET (Solaris IPNET)
 EN10MB (Ethernet)

Cheers,
Darren
2009-11-24 21:20:25 -05:00