| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Get the full log via: git log --follow netdissect-stdinc.h
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Fix compilation warning:
```
print-icmp.c(559): warning C4456: declaration of 'vec' hides previous local declaration
print-icmp.c(344): note: see declaration of 'vec'
```
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The function body should have its opening brace on the next line.
|
|
|
|
|
|
| |
Check for the ICMP types that *do* include an IP packet, rather than
checking for a set that doesn't. This does a better job of handling
unknown ICMP types.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Eliminate a number of fputs(), putchar() and fflush() uses. Justify
preprocessor directives. Don't typecast ND_PRINT() to void and fix some
indentation.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
revision 1.81.2.6
date: 2007-09-13 17:40:18 +0000; author: guy; state: Exp; lines: +1 -6
Completely remove that unused "structure".
----------------------------
revision 1.81.2.5
date: 2007-09-13 17:34:20 +0000; author: gianluca; state: Exp; lines: +3 -1
Commented out a 0-length structure that is not used.
|
| |
|
|
|
|
|
|
|
| |
not all implementations correctly set the length field in the
ICMP header as per draft-bonica-internet-icmp-08.
if the length field is not set then simply check the checksum.
|
|
|
|
|
|
|
| |
- preserve the snapend pointer as it may get overwritten by calling the IP printer
- protect against infinite loops inside the MPLS extension printer.
- detect present of an MPLS extension header by introducing a length field to the ICMP header
as per draft-bonica-internet-icmp-08.
|
| |
|
| |
|
|
|
|
| |
more easily call the inner parts.
|
| |
|
| |
|
|
|
|
| |
messages, do some extra header sanity checking
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
appropriately, and that GNUmakefile and the MSVC++ project file define
it apppriately, as we do with libpcap, rather than defining it in
"interface.h".
Undo the rcsid-shuffling and addition of extra #includes, as we no
longer need to arrange that "interface.h" be included before using _U_
in an RCS ID or copyright.
|
|
|
|
|
|
|
|
|
|
|
| |
use "_U_" in the definitions of "rcsid[]", to eliminate
complaints about those variables being unused;
move the definitions after the include of "interface.h", or add
an include of "interface.h", so that "_U_" is defined.
Include "config.h" before including "tcpdump-stdinc.h" in
"missing/datalinks.c".
|
|
|
|
|
|
|
| |
values. Use that rather than private definitions in various files.
Add "gmpls.h" to the list of files in FILES, and add it and "ipfc.h" to
the list of files in INSTALL.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compile with Sun C, as "interface.h" isn't being included before the
structures are being declared.
Furthermore, in the files that Sun C *can* compile, it doesn't cause Sun
C to generate code that's safe with unaligned accesses, as
"__attribute__" is defined as a do-nothing macro with compilers that
don't support it.
Therefore, we get rid of that tag on the structures to which it was
added, and instead use "EXTRACT_16BIT()" and "EXTRACT_32BIT()" to fetch
16-bit and 32-bit big-endian quantities from packets. We also fix some
other references to multi-byte quantities to get rid of code that tries
to do unaligned loads on platforms that don't support them.
We also throw in a hack that makes those macros use
"__attribute__((packed))" on structures containing only one 16-bit or
32-bit integer to get the compiler to generate unaligned-safe code
rather than doing it by hand. (GCC on SPARC produces the same code that
doing it by hand does; I don't know if GCC on any other big-endian
strict-alignment processor generates better code for that case. On
little-endian processors, as "ntohs()" and "ntohl()" might be functions,
that might actually produce worse code.)
Fix some places to use "%u" rather than "%d" to print unsigned
quantities.
|
|
|
|
| |
forth while i'm here
|
| |
|
| |
|
|
|
|
| |
should have been.
|
| |
|
| |
|
|
|
|
|
| |
rtentry", and unneded includes of <sys/uio.h>, <sys/file.h>, and
<sys/ioctl.h>.
|
|
|
|
| |
sequence number in ICMP echo requests and replies.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Finish converting over to having the caller print the IP address
(except for UDP, TCP and SCTP). This consists mostly of removing
places where the IP address is printed, both in the big "case"
in ip_print() and in the individual printers.
Also fix a couple of spacing bugs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On some platforms (e.g., Solaris 2.5.1 and 2.6, at least), you have to
include <netdb.h> to get MAXHOSTNAMELEN defined, including <sys/param.h>
doesn't do it (on others, <netdb.h> doesn't help, and you have to
include <sys/param.h>.
Include <netdb.h> in some files, but, for "timed.h", just use 256 rather
than MAXHOSTNAMELEN - the Berkeley time daemon protocol spec (in the
timed source directory in various BSDs) says the packet includes "A
zero-terminated string of up to 256 ASCII characters with the name of
the machine sending the message."
|
|
|
|
| |
pedant.
|