| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define them in netdissect.h.
Use them in ip.h, and *don't* mark the structures as UNALIGNED; that
should no longer be necessary.
Add a new nd_ipv4 type to use as an IPv4 address; it represents the 4
bytes of IPv4 address as an array of unsigned chars, so that its natural
alignment is only on a byte boundary.
Those changes found some places where we weren't using
UNALIGNED_MEMCPY() to extract IPv4 addresses from packets; use it.
|
|
|
|
| |
Get the full log via: git log --follow netdissect-stdinc.h
|
| |
|
| |
|
|
|
|
|
|
|
| |
The checksum only covers the header, not the encapsulated packet, so
only checksum that. However, if that checksum fails, try checksumming
the entire packet, as, according to RFC 4601, packets with the entire
packet checksummed should also be accepted, for interoperability.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Also, clean up the message printed when it's 6.
|
|
|
|
|
| |
While we're at it, use ND_TCHECK(), rather than a hand-rolled check, to
check whether we have the full fixed-length portion of the IPv4 header.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Also add/remove tabs in a few involved functions to justify indentation.
|
| |
|
|
|
|
|
| |
This change converts DVMRP, DLT_ENC, EGP, GeoNet, NetFlow, SLIP and TFTP
decoders.
|
|
|
|
|
| |
This change converts IGMP, IPv6 mobility options, LDP, Lightweight
Access Point, PGM, PPTP and RIP decoders.
|
| |
|
| |
|
|
|
|
|
| |
This change converts decoders for: DLT_RAW, IPv6 routing header, USB,
Symantec firewall and cHDLC.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also remove some unneeded includes while at it.
|
|
|
|
| |
Also remove some unnecessary passages.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
That might also convince the compiler that it can "helpfully" optimize
the copy into something that assumes 4-byte alignment, which we don't
want it to do on platforms where the optimized code will trap if the IP
header *isn't* aligned on a 4-byte boundary, given that there's no
guarantee that it *is* aligned on a 4-byte boundary.
|
|
|
|
| |
If the processor does unaligned accesses, it's not necessary.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
Unfortunately, the DLT_PFSYNC support depends on header files included
from the pfctl command's source tree, and trying to arrange to find that
would be too much trouble.
|
|
|
|
|
|
| |
From FreeBSD PR bin/124825: tcpdump(8) does not support pfsync(4) data,
which in turn was ported over from OpenBSD. We already have CARP
support, so we did not port that part over.
|
| |
|
|
|
|
|
|
|
| |
CARP and VRRP both use IP protocol number 112, so there needs to be a -T
flag to specify that protocol 112 be dissected as CARP rather than VRRP.
Also update the man page.
|
|
|
|
| |
Clean up some other stuff while we're at it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Wireshark routine is based on the BSD in-kernel portable checksum
routine (thus BSD-licensed); it takes a vector of pointers and lengths
and checksums the concatenation of the buffers in question (just as the
BSD in-kernel routine checksums a chain of mbufs).
This simplifies the "with a pseudo-header" checksums; hopefully it'll
fix up the problems being seen on some big-endian platforms, which might
be due to hand-calculating some or all of the checksum and doing so
incorrectly. It also gets rid of some code that might be dereferencing
unaligned pointers.
|
| |
|
| |
|
|
|
|
| |
change tcp6 and pim6 to use it.
|
| |
|
| |
|