guy [Thu, 27 Nov 2003 02:31:15 +0000 (02:31 +0000)]
Print the subtype of management frames *before* parsing the body, so
that if there's an error parsing the body, we at least see the type (and
so that the code to print the subtype isn't duplicated in every
body-printing routine).
guy [Mon, 24 Nov 2003 20:31:22 +0000 (20:31 +0000)]
135 appears to be the current IP protocol number for mobility headers;
support it, as well as 62 (which presumably was one that was used
before, even though it was already assigned to some protocol named
CFTP).
guy [Wed, 19 Nov 2003 09:43:47 +0000 (09:43 +0000)]
Don't check for the OSPF opaque traffic engineering TLV type before
processing the TLV - there might not be any TLVs. Instead, check before
fetching the type.
guy [Wed, 19 Nov 2003 09:41:28 +0000 (09:41 +0000)]
Add missing bounds checking to the DVMRP and PIM print routines.
Instead of checking that there are 8 bytes available at the beginning of
an IGMP packet - which there might not be, e.g. with some DVMRP packets
- do the checks as necessary before fetching values.
guy [Wed, 19 Nov 2003 01:28:18 +0000 (01:28 +0000)]
"icmp6_rrenum_print()" doesn't use its "icmp6len" argument (and, as that
just reflects the payload length, the snapshot length has been trimmed
to correspond to it, so it doesn't need to check it merely to avoid
running past the end of the IPv6 payload); get rid of it.
Pass "icmp6_print()" the IPv6 payload length (i.e., the length of the
ICMPv6 packet), rather than having it compre the length itself.
Make the length argument to "icmp6_cksum()" unsigned, to match the value
passed to it.
Fix the lengths passed to "sctp_print()", "tcp_print()", and
"udp_print()" (we update "len" in the header-processing loop to
correspond to the remaining payload, so we just pass it to those
routines).
guy [Wed, 19 Nov 2003 01:09:12 +0000 (01:09 +0000)]
Put in a long comment explaining what's confusing about this routine,
and explaining that we leave the "unused argument" warning in place as a
reminder that we need to fix this routine someday, when we actually have
a capture against which to test it.
guy [Wed, 19 Nov 2003 00:17:01 +0000 (00:17 +0000)]
Cut off "snapend" at the length of the IPv4 or IPv6 payload, so we don't
run past the end of that payload.
Check that the IPv4 total length isn't less than the header length.
Use "%u", not "%d", to print unsigned values.
Properly update "len" in the header-processing loop for IPv6.
Doing so means we can trust the length passed to the TCP and UDP
dissectors when constructing the IPv6 pseudo-header; do so (but fix the
length we pass to the UDP-over-IPv6 checksum routine).
That length is unsigned; make the corresponding arguments to the TCP and
UDP checksum routines unsigned.
guy [Tue, 18 Nov 2003 23:17:27 +0000 (23:17 +0000)]
Print both the name and the description of a link-layer type (the name
isn't always very suggestive - for example, somebody might think
"EN10MB" is always 10 MB/s, and might not know that "IEEE802" is Token
Ring), using "pcap_datalink_val_to_description()". Supply our own
"pcap_datalink_val_to_description()" if libpcap doesn't have it (even if
it has "pcap_datalink_name_to_val()").
guy [Tue, 18 Nov 2003 23:12:10 +0000 (23:12 +0000)]
Print both the name and the description of a link-layer type (the name
isn't always very suggestive - for example, somebody might think
"EN10MB" is always 10 MB/s, and might not know that "IEEE802" is Token
Ring), using "pcap_datalink_val_to_description()". Supply our own
"pcap_datalink_val_to_description()" if libpcap doesn't have it (even if
it has "pcap_datalink_name_to_val()").
guy [Sun, 16 Nov 2003 08:59:07 +0000 (08:59 +0000)]
Have the configure script arrange that the Makefile define _U_
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.
guy [Sun, 16 Nov 2003 08:51:01 +0000 (08:51 +0000)]
Have the configure script arrange that the Makefile define _U_
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.
guy [Tue, 4 Nov 2003 07:29:15 +0000 (07:29 +0000)]
Check whether we have "pcap_breakloop()", and use it if we do - it's a
safer way to terminate "pcap_loop()" in a signal handler (it just sets a
flag, it doesn't muck with data structures that might have been in the
middle of being updated).
Have "setsignal()" not request SA_RESTART, so that if we call
"pcap_breakloop()" in a signal handler and then return, we don't restart
a call that was waiting for captured packets, we just make that call
EINTR out.
guy [Tue, 4 Nov 2003 01:43:20 +0000 (01:43 +0000)]
Put in the entry for Scott Rose:
The test for DNS message dnssec bit flags in the query and
response are backwards. The CD bit has meaning in a query, and
the AD bit has meaning in a response.
hannes [Mon, 27 Oct 2003 08:04:52 +0000 (08:04 +0000)]
- support for the route target information SAFI #132 defined in draft-marques-ppvpn-rt-constrain-01.txt
- support for 32-bit AS number route-target (type 2) format
hannes [Wed, 22 Oct 2003 15:47:44 +0000 (15:47 +0000)]
- port LS_TYPE_OPAQUE printing from ospf_print_lsa() to ospf_print_lshdr()
-that fixes the LSA-ACK printing of Opaque LSAs
bugreport courtesy Carles Kishimoto Bisbe ckishimo [AT] ac [DOT] upc [DOT] es
- make use of ospf_print_lshdr() inside ospf_print_lsa()
- shared link risk group decoder from Carles Kishimoto Bisbe ckishimo [AT] ac [DOT] upc [DOT] es
- print IP adresses for LINK_IDs
hannes [Mon, 20 Oct 2003 16:11:45 +0000 (16:11 +0000)]
bug report [plus partial patch] from Carles Kishimoto Bisbe ckishimo [AT] ac [DOT] upc [DOT] es
-parse TE-TLVs until the ls_length field is zero
-print router-ID TLV
hannes [Mon, 20 Oct 2003 10:50:09 +0000 (10:50 +0000)]
do a hexdump for the RSVP_HOP object for the C_Types which
do contain TLVs as we do not yet have a TLV decoder here;
print the codepoint for GMPLS LSP encodings
1. Unused things (mbuf, rtentry) have been removed.
2. I've dropped FR_CR_BIT etc. definitions as they have only meaning in
specific location in Q.922 address. FR_EA_BIT is still there as it's
used by all Q.922 bytes.
3. a new parse_q922_addr() parses the whole Q.922 address structure
and produces DLCI, Q.922 byte count and flags in ASCII. While I can't
test 3- and 4-byte Q.922 addresses (using only default 2-byte ones),
they are supported.
4. I've trimmed comments regarding HDLC flags and CRC/FCS bytes in FR
packet. They are wire-only things and as such are never seen by
libpcap/tcpdump.
5. Changed NLPID_LMI into NLPID_CISCO_LMI and NLPID_Q933 into NLPID_LMI
(the latter is used by both ANSI (T1.617 annex D) and CCITT (Q.933
annex A) LMI).
6. fr_hdrlen() now correctly returns FR header length (4 - 6 bytes,
7 bytes with 4-byte Q.922 and incorrectly used pad byte).
7. I've changed output text formatting: "xxx-value-yyy-value" into
"xxx value, yyy value", to be consistent with Ethernet.
Not sure if it's correct.
8. added IPv6 support
9. q933_print() now reads lmi_print()
10. CCITT (Q.933 annex A) LMI is now supported, and both CCITT and ANSI
fields are now correctly displayed
10. lmi_print() no longer prints constant fields (such as always zeroed
Q.922 C/R bit or LMI Call Reference byte) unless they are set
incorrectly.
11. I've added ANSI_ and CCITT_ prefixes to appropriate #defines.
12. a new parse_dlci_el() should handle all (10, 16 and 23-bit)
DLCIs correctly (corresponding to 2, 3 and 4-byte Q.922 addresses,
respectively).
hannes [Sat, 4 Oct 2003 14:29:52 +0000 (14:29 +0000)]
- squelch some compiler warnings
courtesy Neil Spring nspring [AT] cs [DOT] washington [DOT] edu
- add support for the Traffic Engineering TLV plus all known subTLVs
- add support for draft-ietf-ccamp-ospf-gmpls-extensions defined subTLVs
The test for DNS message dnssec bit flags in the query and
response are backwards. The CD bit has meaning in a query, and
the AD bit has meaning in a response.
guy [Tue, 16 Sep 2003 21:02:51 +0000 (21:02 +0000)]
Add to the packet counts a count of packets that tcpdump has seen and
processed - people often get confused by the "received by filter" count,
as they might not realize that, in some systems, it counts packets that
were handed to the filter mechanism regardless of whether they pass or,
if they pass, they have yet been read by the application and, on some
other systems, it counts packets that passed the filter but still counts
them in the kernel before they're read by the application.
They're probably mostly interested in the count of packets processed by
tcpdump; the "received by filter" count is probably of interest only if
you want to know how effective your filter is (and even then it's of
interest only if it counts packets handed to the filter rather than
packets that passed the filter).
Give more details on why the "received by filter" count doesn't
necessarily mean what you think it means.
guy [Fri, 12 Sep 2003 22:05:56 +0000 (22:05 +0000)]
Updates from Bruce Simpson:
Fix numerous bugs in my AODV submission, red faces all round,
mainly due to misunderstanding of EXTRACT_STRING() macro
arguments (because these are macros, type checking didn't
happen).
AODV HELLO extensions are now correctly printed.
The code is closer to FreeBSD's style guidelines.
Don't use "u_char" and "u_long", use "u_int8_t" and "u_int32_t".
"u_long" is definitely wrong as it's 64 bits on some platforms; "u_char"
is safe, but the official tcpdump style uses "u_int8_t".
At least according to the (long-since-expired) draft-perkins-aodv6-01,
the V6 AODV messages have different message type values from the V4 ones
in draft-ietf-manet-aodv-13. However, draft-ietf-manet-aodv-13 says
that the only differences are in the addresses; we support both.
Clean up the way we tell the AODV6 dissector that we're running atop
IPv6 a bit.
Use "udpipaddr_print()" if we're printing AODV packets as a result of
saying "anything that matches this filter is AODV", rather than doing it
ourselves under the assumption that it's running over IPv4.
risso [Fri, 8 Aug 2003 09:47:45 +0000 (09:47 +0000)]
Cleanup of the Windows portion. The result of the GetVersion() function, that obtains the Windows OS version, was never used: avoid to call it.
Removed the call to PrinCapBegins in w32_fzs.c.