hannes [Mon, 22 Jul 2002 14:09:07 +0000 (14:09 +0000)]
cleaned up bgp_attr_print{}
removed p,dat pointers and replaced through tptr,pptr where
pptr is a pointer to the start of the attribute;
tptr is a moving pointer that is incremented through the decoding cycle;
guy [Sun, 21 Jul 2002 20:56:24 +0000 (20:56 +0000)]
For packets with a bad TCP checksum, show the value from the header, and
the value it should have had, as we do for packets with a bad IP
checksum, rather than showing the non-zero computed checksum.
guy [Sun, 21 Jul 2002 20:48:26 +0000 (20:48 +0000)]
Add a "in_cksum_shouldbe()" to compute, given an Internet checksum field
in a packet header and the computed checksum for the data that the
checksum covers, what the checksum field's value should have been.
guy [Sat, 20 Jul 2002 23:31:18 +0000 (23:31 +0000)]
From Phil Wood <[email protected]>: fix the test for a community of "public"
to check the length of the community name before doing a length-limited
comparison.
guy [Tue, 16 Jul 2002 03:58:16 +0000 (03:58 +0000)]
In "safeputchar()", use the result of extracting an unsigned character
from the argument, rather than the argument itself, when testing whether
it should be printed or not (the argument might well be a sign-extended
version of an 8-bit character, in which case it's < 0x80 as it's
negative, but it can't be safely handed to "isprint()").
hannes [Sun, 14 Jul 2002 19:46:51 +0000 (19:46 +0000)]
the last commit contained a bogus commit message;
purpose of 1.105 was to print the ip header values (len, ttl, tos)
at the beginning of the line (where it belongs to) and not at the end;
it is only displayed using the -v(erbose) options;
the BGP output (where i am working now on) gets much more cleaner now;
hannes [Sun, 14 Jul 2002 14:14:50 +0000 (14:14 +0000)]
split BGP output to multiple lines;
added support for Originator_ID, Cluster List Attributes;
reworked BGP Open Message Decoder do decode optional Capabilities;
fixed the NEXTHOP decoder of MP_REACH and MP_UNREACH to honor
NH length based on AFI,SAFI
guy [Sat, 13 Jul 2002 09:36:36 +0000 (09:36 +0000)]
Make static the structure to which the test program checking what to use
for "inlines", so that we don't get tripped up by compilers complaining
that we're returning a pointer to an automatic variable.
guy [Tue, 2 Jul 2002 02:22:36 +0000 (02:22 +0000)]
Fix up AC_LBL_C_INLINE to put all of the test code into the "inlines"
section - the other section gets stuck in the middle of "main()", and,
although GCC lets you define functions inside functions, other C
compilers don't.
Pick a name more likely to be unique to use as the iterator variable in
AC_LBL_C_INLINE.
Make AC_LBL_C_INLINE print "no" rather than "not supported" if inline
isn't supported, to match what AC_C_INLINE does.
guy [Sat, 29 Jun 2002 04:24:25 +0000 (04:24 +0000)]
Put variables in quotes when testing them in "test" commands, so that
the test doesn't get a syntax error if the variable isn't set or is set
to a null string.
guy [Fri, 28 Jun 2002 10:45:40 +0000 (10:45 +0000)]
Some versions of the HP C compiler can handle inlines, but not if they
return a structure pointer. Check whether the C compiler can handle
inline functions that return a structure pointer, not whether they can
handle inline functions that return an int, as at least some versions of
autoconf's AC_C_INLINE do.
Here is a patch for draft-ietf-mobileip-ipv6-17.
- print-mobility.c: Mobility header(MIPv6 defines a new IPv6 protocol)
printing
- added Routing header type 2
- ICMPv6 Home Agent Address Discovery and Mobile Prefix Sol., Adv.
message update
guy [Sun, 2 Jun 2002 00:07:36 +0000 (00:07 +0000)]
Don't bother including <netinet/if_ether.h> if we're not using
"ether_ntohost()" - the only reason we include it is to get
"ether_ntohost()" declared.
We only include <net/if.h> to get "struct ifnet" in "struct arpcom"
defined on Solaris, so that we don't get errors when including
<netinet/if_ether.h>, so don't include that unless we're including
<netinet/if_ether.h>.
We only need incomplete definitions for "struct mbuf" and "struct
rtentry" if we're including <net/if.h>, so don't define them unless
we're including <netinet/if_ether.h>.
guy [Sat, 1 Jun 2002 23:50:30 +0000 (23:50 +0000)]
Get rid of unneeded incomplete definitions of "struct mbuf" and "struct
rtentry", and unneded includes of <sys/uio.h>, <sys/file.h>, and
<sys/ioctl.h>.
guy [Fri, 31 May 2002 09:47:23 +0000 (09:47 +0000)]
V3 FSINFO and PATHCONF requests take a file handle as an argument; parse
the request header and the file handle.
"parsestatus()" should only return NULL if the packet was truncated, so
that its callers can distinguish "packet truncated" from "NFS reply
status reports an error".
NFS-request-or-reply parsing routines that call "parsestatus()" should
not return 0 if "parsestatus()" returns a non-zero NFS reply status, so
that non-truncated packets with a non-zero NFS reply status aren't
printed as truncated NFS packets.
Fix some "TCHECK2()" calls to pass an object, not a pointer to an
object, as the first argument (the TCHECK/TTEST macros take objects, not
addresses, as the test argument).
NFS-request-or-reply parsing routines should return 0 for truncated
packets and 1 for non-truncated packets, not *vice versa*.
guy [Fri, 31 May 2002 09:29:07 +0000 (09:29 +0000)]
In TTEST2(), check to make sure the "l" argument isn't so large that
"snapend - l" underflows; this fixes a buffer overflow with malformed
NFS packets, and may fix other buffer overflows with malformed packets.
guy [Wed, 29 May 2002 10:06:24 +0000 (10:06 +0000)]
Only do "-x" printing in the top-level interface print routine; don't do
it in the routines, called by the top-level routines, to dissect
Ethernet, FDDI, or Token Ring packets, as those routines might also be
called for bridged frames over ATM, and the interface print routine for
ATM will also do "-x" printing.
guy [Fri, 17 May 2002 09:57:50 +0000 (09:57 +0000)]
Explain, in full painful detail, what you need to do in order to do
*useful* packet capture on Digital/Tru64 UNIX (and add "Tru64 UNIX" to
the list of OS names).
guy [Mon, 13 May 2002 08:30:19 +0000 (08:30 +0000)]
If we run out of data in the when processing tagged parameters, return
"success", not "failure" - there's no special "end of list" parameter.
Get rid of the check for a parameter tag of 0xff, for the same reason.
Take out an extra space between the "[" and the list of rates in a
"supported rates" tagged parameter, and don't print the "[" or the "
Mbit]", or the leading space if there are no supported rates (or there
is no "supported rates" parameter.
Use "fn_print" to print the SSID, in case there are non-printable
characters in it.
Show the channel number in decimal, not hex, as that's how it's given in
the IEEE 802.11 spec.
Show the supported rates in a probe response, if present.
Get rid of random extra trailing space in tagged parameter output.
guy [Tue, 7 May 2002 07:39:05 +0000 (07:39 +0000)]
From Juergen Schoenwaelder <[email protected]> - fix for the
following problem:
According to the ASN.1 documents, OIDs of the form 2.100.3 are
correctly encoded as 0x0603813403. tcpdump fails to properly
decode them - it displays the value 4.20.3 instead of 2.100.3.
The VLAN ID calculation was wrong (either I had a bug in the
switch I tested the original code against, or I was just stupid)
- the "-1" offset doesn't belong there.
In addition, there are some new TLV values that Cisco has
started using.
guy [Fri, 26 Apr 2002 05:12:40 +0000 (05:12 +0000)]
Add some casts to squelch compiler complaints (and remove potential
problems, although the string in question probably won't contain any
non-ASCII characters).
guy [Thu, 25 Apr 2002 04:54:02 +0000 (04:54 +0000)]
Convert some format pointers to "char *" from "u_char *", and some data
pointers from "char *" to "u_char *", to eliminate signed vs. unsigned
complaints from some compilers.
Don't use "++"s in initialization, to avoid warnings from the Sun C
compiler.
guy [Thu, 25 Apr 2002 04:37:31 +0000 (04:37 +0000)]
Make "ar_sha()", "ar_spa()", "ar_tha()", and "ar_tpa()" return "const
u_char *" rather than "const caddr_t", to avoid signed vs. unsigned
complaints from various compilers.
guy [Wed, 24 Apr 2002 06:34:18 +0000 (06:34 +0000)]
Nobody seemed to know why we preferred sigset() to sigaction(); the
latter is a POSIX standard, and you don't have to include some
additional header file to get it declared, so we'll prefer the it.