| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Thanks, Apple, for making us do this (and for making tcpdump unable to
do some decryption without either installing OpenSSL or working on
trying to do the decryption with Apple's frameworks).
|
|
|
|
|
| |
It will be always usable with the upcoming libpcap versions sanity checks.
(old version: 12336.12336, new version: 2.4)
|
|
|
|
|
| |
Moreover:
Add and use tstr[] string.
|
|
|
|
|
| |
Moreover:
Avoid two consecutive truncation messages.
|
|
|
|
|
|
|
|
| |
Moreover:
Add/fix a lot of bounds and length checks.
Add and use tstr[] string.
Fix some typos.
Update the output of a test according to these changes.
|
|
|
|
|
|
|
|
|
|
|
| |
The warnings were:
./print-isoclns.c: In function 'osi_print_cksum':
./print-isoclns.c:3107:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
|| length > ndo->ndo_snaplen
^
./print-isoclns.c:3108:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
|| checksum_offset > ndo->ndo_snaplen
^
|
| |
|
|
|
|
|
|
|
|
|
| |
Adjust the TLV infinite loop check to require the right amount of bytes
for T and L; do it after printing the TLV header so it is easier to
understand what was wrong. Check if the TLV V is within the capture. Use
the new "invalid" exit label to indicate a packet anomaly and add more
checks for the length value into the type-specific case blocks. Print
the domain string with fn_printzp().
|
|
|
|
|
|
|
| |
Add IS_NOT_NEGATIVE macro.
Avoid these warnings:
- comparison of unsigned expression >= 0 is always true [-Wtype-limits],
- comparison is always true due to limited range of data type [-Wtype-limits].
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's _WIN32, with a leading underscore, not WIN32. See, for example:
https://sourceforge.net/p/predef/wiki/OperatingSystems/
and
https://msdn.microsoft.com/en-us/library/b0084kay.aspx
*Some* environments may also define WIN32, but we shouldn't depend on
that.
|
|
|
|
| |
Reverse order puts the default DLT last, which is a bit weird.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't speak of "Ethernet" and "wire", as you might not be sniffing an
Ethernet or, indeed, any form of wired network.
Note that not only could there be a delay between the point at which the
interface is finished receiving the packet and when an interrupt is
delivered (whether due to bus delays, polling rather than immediate
interrupts being used, or delays in the CPU responding to the interrupt,
or more than one of those) but also a delay between the point at which
the kernel responds to the interrupt and the point at which it actually
applies a time stamp to the packet.
|
|
|
|
|
|
|
| |
Use UNALIGNED_MEMCPY() to extract the XID from it; otherwise, this might
crash on machines that require strict alignment (e.g., SPARC machines).
Fixes GitHub issue #478.
|
|
|
|
|
|
|
|
| |
- Fix display of some nanoseconds timestamps
For example, bad print 00:-16:-2.000851566 is now 00:00:00.037851566
- Fix display of timestamp of a packet when it is lower than previous one
For example, bad print 00:00:-1.000999790 is now -00:00:00.000000210
|
|
|
|
| |
Add 'ts_unix_format' function.
|
|
|
|
|
|
|
|
| |
Delete the 'static char buf' array in ts_format().
buf is now a parameter of ts_format().
Moreover:
Decrease a too long string.
Fix a space in a comment.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
I'm *guessing* that the item being fetched is big-endian; the "vt"
protocol might be old enough that they developed it on (non-Sun386i) Sun
workstations, assuming they didn't just say "this is an Internet
protocol, hence fields are big-endian").
That also prevents problems on platforms that don't support unaligned
accesses.
|
|
|
|
|
|
| |
*Don't* fetch it with a pointer cast and dereference! That will fail on
little-endian machines and may fail on machines that don't handle
unaligned references.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
This prevents the compiler issue mentioned in GitHub issue #451, and
also cleans up some other signed vs. unsigned stuff.
While we're at it, clean up bittok2str_internal() (just pass it the
separator string, not a Boolean value that's tested to choose the
separator string), and print unknown arguments to the bittok2str
routines in hex, not decimal.
|
|
|
|
| |
Use "#if 0" instead to comment out code.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Get rid of the now-unused buf array while we're at it.
|
|
|
|
| |
That filters out non-printable characters.
|
|
|
|
|
|
| |
-Fix/add ND_TCHECK2 tests,
-Fix a buffer overflow,
-Remove a debug printf
|
|
|
|
| |
This is a follow-up to commit 3a3ec26.
|
|
|
|
|
|
|
|
| |
Rename set_dump_fd_capsicum_rights() to set_dumper_capsicum_rights() and
have it take a pcap_dumper_t * as an argument and extract the file
descriptor itself, rather than having the caller do so.
This fixes a syntax error in one of the calls.
|
| |
|
|\ |
|
| | |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
guard against case where ops->print is nil
|
| | |
|