Commit Graph

18 Commits

Author SHA1 Message Date
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
Francois-Xavier Le Bail
e8cd6c12e3 SFLOW: Fix bounds checking 2015-05-07 17:54:32 +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
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
Guy Harris
ed85e20e4d u_intN_t is dead, long live uintN_t.
And, as we require at least autoconf 2.61, and as autoconf 2.61 and
later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to
define the uintN_t and intN_t macros if the system doesn't define them
for us.

This lets us get rid of bitypes.h as well.
2014-04-23 00:20:40 -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
59690cf6b7 NDOize BOOTP, DHCPv6, DNS, PIM and sFlow decoders
Also add/remove tabs in a few involved functions to justify indentation.
2014-03-25 23:27:23 +04:00
Denis Ovsienko
fe3253b9b8 remove tcpdump's own CVS keywords
Remove lots of $Header's and a few $Id's that all belong to the former
CVS repository of tcpdump itself. These keywords have been frozen since
the migration to git in late 2008.
2014-01-03 00:59:08 +04:00
Michael Richardson
ac910c086e ndo-ize print-ascii: hex_print_with_offset() 2014-01-01 21:31:18 -05:00
Michael Richardson
a97fb2f3ae whitespace changes 2014-01-01 21:31:18 -05:00
Ruben Kerkhof
f9e99345dd print-sflow.c: print agent_id instead of samples 2013-03-18 19:10:35 +01:00
Rick Jones
96c2a764eb The ifSpeed field of a generic interface counter in sFlow is 64 bits.
The "overlay" definition in print-sflow.c is correct, but the actual
extract for printing is using EXTRACT_32BITS rather than EXTRACT_64BITS,
which leads to an incorrect report for speed.

Reviewed-By: Guy Harris <guy@alum.mit.edu>
2011-06-02 10:56:08 -07:00
Rick Jones
5779709949 Handle the enterprise field of the sflow flow and counter record format.
Thanks to some traces sent my way by Gavin McCullagh, and a comparison
against the output of inMon's sflowtool, I can confidently say "Yes
Virginia, there is an enterprise other than zero."  Which means lest we
start trying to decode something as what it is not, we best actually
look at the enterprise field and make sure it is one we recognize.
2011-04-15 10:01:02 -07:00
Rick Jones
e6358eaba7 To enable printing of non-expanded samples I've shuffled a bunch of code
around and created a bunch of smaller routines to more easily support
printing of both expanded and non-expanded counter and flow samples.
I've done simple testing of non-expanded counter and flow, and expanded
counter, but I don't have expanded flow at present with which to test.
So, that part of the change is only compile/eyeball tested.

Reviewed-and-tweaked-by: Guy Harris <guy@alum.mit.edu>
2011-04-14 11:32:08 -07:00
Guy Harris
a9876473a2 Check the sample, flow, and counter lengths.
When dissecting a sample, or a flow or counter within the sample, make
sure we don't run past the length in the sample/flow/counter header.

This also means we count the sample length down as we process the
contents of the sample, so we only add what, if anything, remains of the
sample to the pointer into the packet, and subtract that from the
remaining data length in the packet, which means we properly handle
packets with multiple samples.
2011-04-04 19:03:56 -07:00
hannes
e7dc0250ec from Carles Kishimoto <carles.kishimoto@gmail.com>: add support for the SFLOW protocol 2007-08-08 17:20:58 +00:00