Commit Graph

2549 Commits

Author SHA1 Message Date
Michael Richardson
1d1c9ba86a tell the user what package they might find uudecode in 2010-03-05 12:37:17 -05:00
Michael Richardson
717ea6359c Merge branch 'master' of git+ssh://kingsmere.gatineau.credil.org/home/mcr/src/tcpdump 2010-03-05 12:35:45 -05:00
Michael Richardson
ea7f14bc59 fail all tests on machines without uudecode installed 2010-03-05 12:35:00 -05:00
Michael Richardson
4239b5a727 changed output of -vvv and -vvvv flags for forces 2010-03-05 11:41:39 -05:00
Guy Harris
d8d8985791 Merge branch 'cleanup' of git://github.com/krajaratnam/tcpdump 2010-02-23 18:07:34 -08:00
Guy Harris
ea5736c8c6 Process VLAN frames and Alteon jumbo frames in the Ethernet printer.
Instead of having the Ethernet-type handler process the VLAN and Alteon
jumbo frame Ethernet type values, process them in the Ethernet (and
Linux cooked-mode) dissectors.  This makes it easier for the right MAC
addresses to be printed for those packets.

As part of that, rename ether_encap_print() to ethertype_print() - it
doesn't print encapsulated Ethernet frames, it prints payloads whose
packet type is indicated by an Ethernet type field value - and remove
the no-longer-needed "extracted Ethernet type" argument.  That also lets
us eliminate it from the SNAP print routine.

Make ether_print() take a function, and an argument to pass to that
function, as parameters, so that, for example, the ATM LANE printer can
use it and put the LEC ID into the link-layer headeer printout.
2010-02-21 12:44:53 -08:00
Guy Harris
f99863c5be Add some bounds checks for the source routing information. 2010-02-21 11:29:46 -08:00
Guy Harris
623e4271b0 Don't directly fetch multi-byte integers from packets.
Use the EXTRACT_ macros to extract multi-byte integral values from
packets, rather than just dereferencing pointers into the packet; there
is no guarantee that the packet data will be aligned on the right
boundary, and there is no guarantee that, if they're not, a direct
access will work correctly.
2010-02-21 11:27:41 -08:00
Guy Harris
e8b5237589 Don't directly fetch multi-byte integers from packets.
Use the EXTRACT_ macros to extract multi-byte integral values from
packets, rather than just dereferencing pointers into the packet; there
is no guarantee that the packet data will be aligned on the right
boundary, and there is no guarantee that, if they're not, a direct
access will work correctly.
2010-02-21 00:27:00 -08:00
Guy Harris
b00042a8ae Add additional checks to make sure we don't go past the end of the packet. 2010-02-20 22:43:19 -08:00
Kovarththanan Rajaratnam
4c0eeb5986 mark autogenerated version as const 2010-02-20 09:19:55 +01:00
Kovarththanan Rajaratnam
bc60860d5e tcpdump.c: mark several variables as static 2010-02-20 09:02:30 +01:00
Kovarththanan Rajaratnam
5951ca70d2 strcasecmp.c: mark array as const 2010-02-20 08:56:59 +01:00
Kovarththanan Rajaratnam
01bfbb1819 smbutil.c: mark several structs as const 2010-02-20 08:55:19 +01:00
Kovarththanan Rajaratnam
15d5675086 signature.h/c: mark several structs as const 2010-02-20 08:53:15 +01:00
Kovarththanan Rajaratnam
e544ab094e oui.h/c: mark several structs as const 2010-02-20 08:50:09 +01:00
Kovarththanan Rajaratnam
adea5ee91c nlpid.h/c: mark several structs as const 2010-02-20 08:48:23 +01:00
Kovarththanan Rajaratnam
9c7cef6277 l2vpn.h/c: mark several structs as const 2010-02-20 08:47:15 +01:00
Kovarththanan Rajaratnam
08696c5fab ipproto.h/c: mark several structs as const 2010-02-20 08:45:56 +01:00
Kovarththanan Rajaratnam
16c6af16de gmpls.h/c: mark several structs as const 2010-02-20 08:44:31 +01:00
Kovarththanan Rajaratnam
e6c39e6db4 Precompute CRC-10 table.
We now precompute the CRC-10 table allowing us to mark it as const. The table was precomputed using a Python snippet (included as comment)
2010-02-20 08:40:44 +01:00
Kovarththanan Rajaratnam
2086d80fa0 af.h/c: make several structs const 2010-02-20 07:45:39 +01:00
Kovarththanan Rajaratnam
6457f82aaa addrtoname.c: make several structs static 2010-02-20 07:45:21 +01:00
Kovarththanan Rajaratnam
ec7a5640cf addrtoname.c: constify several structs 2010-02-20 07:32:39 +01:00
Guy Harris
599c6c53d1 Recognize -PRE-GIT as well as alpha/beta; clean up regexps a bit. 2010-02-08 16:28:42 -08:00
Guy Harris
7db583986e Get rid of extra blank line. 2010-02-08 02:42:48 -08:00
Guy Harris
b213bf62d9 We're using Git, not CVS, now. 2010-02-08 02:35:30 -08:00
Guy Harris
d50d7fd82e Recognize -b as a flag. 2010-02-08 02:33:12 -08:00
Guy Harris
06d0d52170 Mention the b flag in the usage message. 2010-02-08 02:24:10 -08:00
Guy Harris
ce2facf6bb Document the -b flag. 2010-02-08 02:22:10 -08:00
Guy Harris
72de6e8bc3 Use rlen rather than tll as the name of "remaining length" variables. 2010-02-07 18:02:41 -08:00
Guy Harris
606a29c55c Check the containing item length in some loops.
In some loops, don't loop just until we get an error, stop when we run
out of data to parse.

Also, add some comments to indicate what we know about lengths at
various points, before we do something with the length that happens to
assume what we know.  Add some checks that this auditing found
necessary.
2010-02-07 17:47:31 -08:00
Guy Harris
7906cae611 Use #defines rather than sizeof.
Use ForCES_HDRL, TLV_HDRL, and ILV_HDRL instead of various sizeof's, to
make it clearer what certain tests ensure are true (as, in other cases,
the #defines are subtracted from values that should be, at that point,
ensured not to be less than the #define in question).
2010-02-07 16:05:46 -08:00
David Horn
2a7e2246c7 RFC 5006 support.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2010-02-07 14:52:07 -08:00
Guy Harris
aeae58e079 Print bit numbers in decimal, not hex - it's not the presence bit field,
its the index of a bit from that field.
2010-02-06 19:21:30 -08:00
Guy Harris
20194339f9 Constify a bunch of stuff. 2010-01-26 20:14:23 -08:00
Guy Harris
44c1734ba8 Put PRIu64 on the same line as the rest of the format string. 2010-01-26 18:50:53 -08:00
Guy Harris
c404e37740 Get rid of some no-longer-necessary casts. 2010-01-26 18:45:58 -08:00
Guy Harris
6ee5663a02 Add TCHECKs, make length variables 32 bits.
Add TCHECK/TCHECK2 calls to make sure we are within the packet boundary
before fetching data.  Make some length variables that could in theory
have values that don't fit in 16 bits 32 bits long.

Get rid of blanks before newlines.
2010-01-26 18:43:22 -08:00
Guy Harris
12604e27a3 Use EXTRACT_16BITS and EXTRACT_32BITS to extract values from a packet.
There's no guarantee that those values are aligned on the appropriate
boundary, nor is there a guarantee that accessing misaligned values will
behave as desired.
2010-01-26 18:37:41 -08:00
Guy Harris
19b5602a0c Use EXTRACT_16BITS to extract big-endian 16-bit quantities from the packet.
There's no guarantee that those quantities will be properly aligned, nor
is there any guarantee that fetching an improperly-aligned quantity will
work as desired.
2010-01-26 18:35:53 -08:00
Guy Harris
67c76d583f Use EXTRACT_16BITS() and EXTRACT_32BITS() to fetch integral values.
Use EXTRACT_16BITS() and EXTRACT_32BITS() to fetch 16-bit and 32-bit
big-endian quantities from the packet, as there's no guarantee that a
given 16-bit quantity will be aligned on a 2-byte boundary or that a
given 32-bit quantity will be aligned on a 4-byte boundary, nor is there
a guarantee that unaligned accesses will succeed (they might trap, or
they might not fetch an unaligned quantity).
2010-01-26 17:56:36 -08:00
Randy Sofia
0e5561f7c7 Add some information about the symbolic references to TCP flags.
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2010-01-26 15:46:37 -08:00
Lucas C. Villa Real
c0a91acf9b Enhance NFS access request messages.
When debugging NFS operations one may find it easier to get the actual access
flags decoded rather than having to look up the NFS access flags to find which
permissions were requested by the client.

Reviewed-by: Guy Harris <guy@alum.mit.edu>
2010-01-26 12:09:24 -08:00
Guy Harris
071cdba2b3 Handle the 48-byte and 64-byte Linux USB headers differently; for now,
the difference isn't major, but it might be more important later.
2010-01-25 15:25:33 -08:00
Guy Harris
d033ee2f3e Squelch some int-vs-long errors. 2010-01-10 18:36:45 -08:00
Guy Harris
095439d48a Remove more non-C89 features.
No array initialization with [index] =, no // comments; some compilers
that might be used to compile tcpdump don't support them.
2010-01-10 18:23:11 -08:00
Guy Harris
6003dc5285 Get rid of BIG_ENDIAN and LITTLE_ENDIAN definitions.
The configure script doesn't define BYTE_ORDER, so they can't validly be
compared against BYTE_ORDER; don't leave them around for people to think
they can.
2010-01-10 18:00:08 -08:00
Guy Harris
64d92662c3 Don't use bitfields in on-the-wire structures.
C doesn't guarantee that bit fields will be in any particular order.
2010-01-10 17:56:49 -08:00
Guy Harris
66a566eded Put forces.h into the release tarball. 2010-01-10 14:44:35 -08:00