]> The Tcpdump Group git mirrors - tcpdump/log
tcpdump
24 years agoUpdated patch from Jim Vaughan (especially fixing my stupid TCHECK() bugs)
fenner [Mon, 4 Dec 2000 05:27:49 +0000 (05:27 +0000)] 
Updated patch from Jim Vaughan (especially fixing my stupid TCHECK() bugs)

24 years agoAdd some truncation checks.
fenner [Mon, 4 Dec 2000 00:43:39 +0000 (00:43 +0000)] 
Add some truncation checks.
#include <netdb.h> for MAXHOSTNAMELEN on Solaris
Use EXTRACT_16BITS to extract 16-bit quantities
Print withdrawn routes if we think we can
Print must-be-zero attribute flags if they're not zero

Partly from: Jim Vaughn, http://www.tcpdump.org/lists/patches/107

24 years agoAdd a bunch of checks to make sure we don't go past the end of the
guy [Mon, 4 Dec 2000 00:35:44 +0000 (00:35 +0000)] 
Add a bunch of checks to make sure we don't go past the end of the
packet.

24 years agoUse EXTRACT_* instead of memcpy() to extract numeric values to handle
fenner [Mon, 4 Dec 2000 00:00:08 +0000 (00:00 +0000)] 
Use EXTRACT_* instead of memcpy() to extract numeric values to handle
 byte orders properly.

24 years agoUndo spamming of rev 1.50
fenner [Sun, 3 Dec 2000 23:45:37 +0000 (23:45 +0000)] 
Undo spamming of rev 1.50

24 years agoUpdate for new RFC's and IANA assignments. Many special-format options
fenner [Sun, 3 Dec 2000 23:42:23 +0000 (23:42 +0000)] 
Update for new RFC's and IANA assignments.  Many special-format options
 are printed as binary strings.  Any of these that are in common use
 can get their own printers.

24 years agoDon't print the value of a RADIUS attribute if the length is less than
guy [Sun, 3 Dec 2000 20:31:26 +0000 (20:31 +0000)] 
Don't print the value of a RADIUS attribute if the length is less than
or equal to 2 (the length includes the two bytes of type and length).

Don't print the values of RADIUS attributes that are supposed to be of a
particular length if they have a different length.

Don't use the result of "ctime()", unmodified, when printing an
attribute value; the string "ctime()" supplies includes a newline, which
we need to remove.

The "PRINT_HEX()" macro expands into code that modifies its first
argument; always set the variable in question to the appropriate value
before calling the macro.

24 years agodo not try to compute tcp/udp checksum for fragmented datagram.
itojun [Fri, 17 Nov 2000 19:08:14 +0000 (19:08 +0000)] 
do not try to compute tcp/udp checksum for fragmented datagram.
from: [email protected]

24 years agosimplify case statement
itojun [Sun, 12 Nov 2000 15:16:16 +0000 (15:16 +0000)] 
simplify case statement

24 years agoResize 2 statically allocated hostname buffers.
fenner [Fri, 10 Nov 2000 17:52:02 +0000 (17:52 +0000)] 
Resize 2 statically allocated hostname buffers.

This was in http://www.tcpdump.org/lists/patches/89 , and also
ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-00%3A61/tcpdump-4.x.patch.v1.1

24 years agoSome verbose format diffs from Juergen Schoenwaelder
fenner [Fri, 10 Nov 2000 17:34:10 +0000 (17:34 +0000)] 
Some verbose format diffs from Juergen Schoenwaelder

24 years agorepair IPv6 ESP decoder
itojun [Thu, 9 Nov 2000 07:43:50 +0000 (07:43 +0000)] 
repair IPv6 ESP decoder

24 years agoalways print router renumber sequence number, even without -v.
itojun [Wed, 8 Nov 2000 13:03:12 +0000 (13:03 +0000)] 
always print router renumber sequence number, even without -v.

24 years agoprint sequence number in router renumber message.
itojun [Wed, 8 Nov 2000 13:01:37 +0000 (13:01 +0000)] 
print sequence number in router renumber message.

24 years agorrenum minor tweaks (endian conversion for reserved field printing)
itojun [Wed, 8 Nov 2000 10:10:59 +0000 (10:10 +0000)] 
rrenum minor tweaks (endian conversion for reserved field printing)

24 years agounbroken BSDI build (should be revisited). from [email protected]
itojun [Wed, 8 Nov 2000 09:41:39 +0000 (09:41 +0000)] 
unbroken BSDI build (should be revisited).  from [email protected]

24 years agoRFC2894 (router renumber) decoding. more to go.
itojun [Wed, 8 Nov 2000 09:28:43 +0000 (09:28 +0000)] 
RFC2894 (router renumber) decoding.  more to go.

24 years agocorrect router renumber bits to sync with RFC2894 (not used yet)
itojun [Wed, 8 Nov 2000 07:10:58 +0000 (07:10 +0000)] 
correct router renumber bits to sync with RFC2894 (not used yet)

24 years agoremove #ifdef no longer necessary (due to inclusion of icmp6.h into tcpdump kit)
itojun [Wed, 8 Nov 2000 07:03:04 +0000 (07:03 +0000)] 
remove #ifdef no longer necessary (due to inclusion of icmp6.h into tcpdump kit)

24 years agoUpdate for libsmi v0.2.x . Attempt to retain libsmi v0.1.x compatibility
fenner [Sat, 4 Nov 2000 22:50:23 +0000 (22:50 +0000)] 
Update for libsmi v0.2.x .  Attempt to retain libsmi v0.1.x compatibility
(but didn't test it).

24 years agoInclude the new "print-igmp.c" file.
guy [Sat, 4 Nov 2000 08:35:02 +0000 (08:35 +0000)] 
Include the new "print-igmp.c" file.

24 years agoEliminate unused #includes
fenner [Thu, 2 Nov 2000 18:02:52 +0000 (18:02 +0000)] 
Eliminate unused #includes

24 years agoAdd Wilbert de Graaf for IGMPv3 patches
fenner [Thu, 2 Nov 2000 02:19:57 +0000 (02:19 +0000)] 
Add Wilbert de Graaf for IGMPv3 patches

24 years agoMove IGMP to its own file.
fenner [Thu, 2 Nov 2000 02:18:28 +0000 (02:18 +0000)] 
Move IGMP to its own file.
Add IGMPv3 support.

Contributed by: Wilbert de Graaf <[email protected]>

24 years agoThe packets inside IPTalk are just LLAP packets, so call the routine to
guy [Mon, 30 Oct 2000 06:22:14 +0000 (06:22 +0000)] 
The packets inside IPTalk are just LLAP packets, so call the routine to
print them "llap_print()" (as per NetBSD), not "iptalk_print()".

24 years agoPatch from Daniel Hagerty <[email protected]>, submitted with NetBSD PR
guy [Mon, 30 Oct 2000 05:41:30 +0000 (05:41 +0000)] 
Patch from Daniel Hagerty <[email protected]>, submitted with NetBSD PR
#4141, to dissect raw Appletalk-atop-Ethernet packets correctly, i.e.
not as if they were IPTalk packets.  (A very similar patch was submitted
for Debian bug #67642.)

24 years ago"iso" is *not* a qualifier that restricts address or port matches to a
guy [Sat, 28 Oct 2000 10:23:38 +0000 (10:23 +0000)] 
"iso" is *not* a qualifier that restricts address or port matches to a
particular protocol.

Document the new "clnp" ISO protocol type.

Formatting nits.

24 years agoTony Li's changes, from FreeBSD, to support filtering for OSI packets
guy [Sat, 28 Oct 2000 10:10:54 +0000 (10:10 +0000)] 
Tony Li's changes, from FreeBSD, to support filtering for OSI packets
and for ESIS and ISIS packets.

Don't describe "atalk", "aarp", "lat", "sca", "moprc", or "mopdl" as
qualifiers that restrict address or port matches to a particular
protocol, as they aren't.

"iso", however, is a qualifier that applies to "proto", at least, and
can take a number or "esis" or "isis" as arguments; "esis" and "isis"
are short for "iso proto esis" and "iso proto isis".

Update the enumeration of the protocols that can be the target of "ip
proto" to reflect current reality.

Enumerate all the protocols that can be the target of "ether proto",
including the new "iso".

24 years agoDocument the "atalk" protocol type in filter expressions that's been
guy [Sat, 28 Oct 2000 08:22:01 +0000 (08:22 +0000)] 
Document the "atalk" protocol type in filter expressions that's been
available for a while, and document the new "aarp" protocol type as
well.

24 years agoPatch sent to Debian by Roderick Schertler <[email protected]> to print
guy [Fri, 27 Oct 2000 23:26:30 +0000 (23:26 +0000)] 
Patch sent to Debian by Roderick Schertler <[email protected]> to print
the time zone offset as a signed 32-bit integer (as RFC 1533 says it is)
rather than as an unsigned 32-bit integer.

24 years agoDocument the deficiencies of tcpdump (of libpcap in general, actually)
guy [Wed, 25 Oct 2000 07:49:28 +0000 (07:49 +0000)] 
Document the deficiencies of tcpdump (of libpcap in general, actually)
with the Linux 2.0[.x] kernel, and suggest that the user upgrade to a
2.2[.x] kernel.

24 years agoEliminate __P().
fenner [Tue, 24 Oct 2000 01:07:28 +0000 (01:07 +0000)] 
Eliminate __P().

24 years agoEliminate __P().
fenner [Tue, 24 Oct 2000 00:56:48 +0000 (00:56 +0000)] 
Eliminate __P().

24 years agoImproved VLAN support, from Peter Jeremy - "vlan" filtering keyword,
guy [Sun, 22 Oct 2000 04:17:52 +0000 (04:17 +0000)] 
Improved VLAN support, from Peter Jeremy - "vlan" filtering keyword,
letting you filter based on the VLAN to which a packet belongs, and an
improvement to the printing of VLAN packets (adding an extra space to
separate the VLAN priority and flags from the next stuff printed).

24 years agoWe should no longer need to use our own versions of system header files
guy [Sat, 21 Oct 2000 05:00:18 +0000 (05:00 +0000)] 
We should no longer need to use our own versions of system header files
when compiling on Linux, as we extracted from those copies the
definitions and declarations we need in order to dissect packets, and
put them into our own header files in the regular source directory.

We should also no longer need to define __STDC__ as 2 on Digital UNIX,
as we're no longer including the native OS's <netinet/ip.h> to get the
layout of an IP packet declared, we're using our own "ip.h" header file
for that.

24 years agoWe should no longer need to use our own versions of system header files
guy [Sat, 21 Oct 2000 04:54:26 +0000 (04:54 +0000)] 
We should no longer need to use our own versions of system header files
when compiling on Linux, as we extracted from those copies the
definitions and declarations we need in order to dissect packets, and
put them into our own header files in the regular source directory.

We should also no longer need to define __STDC__ as 2 on Digital UNIX,
as we're no longer including the native OS's <netinet/ip.h> to get the
layout of an IP packet declared, we're using our own "ip.h" header file
for that.

24 years agoGet rid of the PCAP_ENCAP_ values - if an application uses them, that
guy [Thu, 12 Oct 2000 03:57:13 +0000 (03:57 +0000)] 
Get rid of the PCAP_ENCAP_ values - if an application uses them, that
application won't build with any other version of libpcap, which means
that a lot of applications won't use them.  In addition,
"pcap_linktype()" needs to return DLT_ values, so that platforms that
build libpcap as a shared library won't break binary compatibility if
they update to this version of libpcap.

Instead, we map from DLT_ values to LINKTYPE_ values when writing
savefiles, and map from LINKTYPE_ values to DLT_ values when reading
savefiles, so that savefiles don't have platform-dependent DLT_ values
in the header as the link type, they have platform-independent LINKTYPE_
values.

This means we don't need to make DLT_ATM_RFC1483, DLT_RAW, etc. have
platform-independent values starting at 100 - only the values in the
savefile header need to be like that.

24 years agoClean up some problems that Sun C found (casting a "u_char *" pointer to
guy [Wed, 11 Oct 2000 04:04:33 +0000 (04:04 +0000)] 
Clean up some problems that Sun C found (casting a "u_char *" pointer to
"char *" before assigning it to a "u_char *", assigning "const u_char *"
pointers to "u_char *" variables, putting a cast on the LHS of an
assignment).

24 years agoRemove from "lbl/os-solaris2.h" declarations of functions we don't use;
guy [Wed, 11 Oct 2000 04:02:15 +0000 (04:02 +0000)] 
Remove from "lbl/os-solaris2.h" declarations of functions we don't use;
the declaration of "utimes()" collides with the declaration that SunOS
5.5.1 and later, at least, *do* have.  (5.5.1 doesn't declare
"snprintf()", even though it has "snprintf()", so we declare it here; we
declare some others that don't cause problems.)

24 years agoPick up FreeBSD "print-isoclns.c".
guy [Tue, 10 Oct 2000 05:40:21 +0000 (05:40 +0000)] 
Pick up FreeBSD "print-isoclns.c".

24 years agoGet rid of some includes, and use "u_int8_t" and "u_int16_t" in packet
guy [Tue, 10 Oct 2000 05:14:35 +0000 (05:14 +0000)] 
Get rid of some includes, and use "u_int8_t" and "u_int16_t" in packet
layout definitions, as per Alfredo AndrĂ©s's suggestion.

Don't use expressions with side effects inside EXTRACT macros - the
arguments of those macros are used more than once, so the side-effects
(incrementing the pointer) occurs more than once, and they occur in a
sequence that may not be the same for all compilers.

When printing a UNIX time value, extract the value into a "time_t"
variable, and then pass a pointer to that variable to "ctime()", don't
cast the result of "EXTRACT_32BITS()" to a pointer.  Also, when printing
the result of "ctime()", print only the first 24 characters, so that the
newline at the end isn't printed.

Cast the first argument passed to "radius_attr_print()", and the
argument passed to the print function for an attribute, to "u_char *",
not "char *", as those routines expect a "u_char *".

24 years ago64-bit cleanup - cast the difference between two pointers to "long" and
guy [Tue, 10 Oct 2000 05:06:10 +0000 (05:06 +0000)] 
64-bit cleanup - cast the difference between two pointers to "long" and
print it with "%ld".

24 years agoRemove some includes of <sys/socket.h>, and add includes of
guy [Tue, 10 Oct 2000 05:05:07 +0000 (05:05 +0000)] 
Remove some includes of <sys/socket.h>, and add includes of
<netinet/in.h> to declare "ntoh[sl]" and "hton[sl]".

24 years agoThe infinite diversity of UNIX platforms is an eternal source of joy.
guy [Tue, 10 Oct 2000 05:03:32 +0000 (05:03 +0000)] 
The infinite diversity of UNIX platforms is an eternal source of joy.
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."

24 years agoInclude the license file as one of the files in the tarball.
guy [Tue, 10 Oct 2000 04:55:42 +0000 (04:55 +0000)] 
Include the license file as one of the files in the tarball.

24 years ago added license file
mcr [Mon, 9 Oct 2000 22:38:24 +0000 (22:38 +0000)] 
added license file

24 years agoSome compilers may pad structures to a length that's a multiple of 2 or
guy [Mon, 9 Oct 2000 03:24:24 +0000 (03:24 +0000)] 
Some compilers may pad structures to a length that's a multiple of 2 or
4 bytes, even though no member in the structure requires such an
alignment; don't use "sizeof (struct ether_arp), explicitly #define the
header length and use that #defined value.

We don't use "struct ether_addr" in any dissectors, so there's no need
to define it in "ether.h" - and, if compilers pad it to a multiple of 4
bytes, you can't use it anyway, as it'll be 8 bytes long, not 6 bytes
long.

24 years agoSome compilers may pad structures to a length that's a multiple of 2 or
guy [Mon, 9 Oct 2000 02:59:39 +0000 (02:59 +0000)] 
Some compilers may pad structures to a length that's a multiple of 2 or
4 bytes, even though no member in the structure requires such an
alignment; don't use "sizeof (struct ether_header)" or "sizeof (struct
fddi_header)", explicitly #define the header length and use that
#defined value.

24 years agoGet rid of a couple of #defines not used by tcpdump.
guy [Mon, 9 Oct 2000 02:03:44 +0000 (02:03 +0000)] 
Get rid of a couple of #defines not used by tcpdump.

Add TCP_PUSH_BIT back; it's not used by tcpdump, but it *is* a bit in
the compressed packet header, and thus part of the protocol.

24 years agoAs we no longer use the system's "slip.h" header file, there's no need
guy [Mon, 9 Oct 2000 01:58:53 +0000 (01:58 +0000)] 
As we no longer use the system's "slip.h" header file, there's no need
to check for it.

24 years agoPull the "linux-include" versions of "slip.h" and "slcompress.h" up to
guy [Mon, 9 Oct 2000 01:53:19 +0000 (01:53 +0000)] 
Pull the "linux-include" versions of "slip.h" and "slcompress.h" up to
the top-level directory, remove from them all stuff not needed by
tcpdump, include them rather than the system's header files, and get rid
of assorted unnecessary include files.

This means you don't need to check for "slip.h" when building
"print-sl.c", stubbing it out on systems that don't have "slip.h".  We
also don't need to build the stuff in "print-vjc.c" only on BSD/OS.

Use "u_int32_t" and "u_int16_t" rather than "u_int" and "u_short" for
structure members in "print-chdlc.c".

Move PPP_HDRLEN from "print-ppp.c" to "ppp.h", as per the XXX comment in
"print-ppp.c".

24 years agoGet rid of unnecessary includes, and use tcpdump's "ip.h" and "udp.h"
guy [Sun, 8 Oct 2000 08:48:48 +0000 (08:48 +0000)] 
Get rid of unnecessary includes, and use tcpdump's "ip.h" and "udp.h"
rather than the OS's <netinet/ip.h> and <netinet/udp.h>.

As per Bill Fenner's suggestion, print single-byte 2-digit hex values
with "%02X" rather than manually pulling the nibbles out of the byte and
converting them.

24 years agoregen
itojun [Sat, 7 Oct 2000 05:59:49 +0000 (05:59 +0000)] 
regen

24 years agono need to check struct defs in netinet/icmp6.h
itojun [Sat, 7 Oct 2000 05:58:06 +0000 (05:58 +0000)] 
no need to check struct defs in netinet/icmp6.h

24 years agoput stripped-down version of ip6.h and icmp6.h into tcpdump tree.
itojun [Sat, 7 Oct 2000 05:53:09 +0000 (05:53 +0000)] 
put stripped-down version of ip6.h and icmp6.h into tcpdump tree.
ip6.h is almost normal RFC2292 header.
icmp6.h has couple of extensions (not covered by RFC2292),
like MLD, ICMPv6 nodeinfo, and router renumber.

XXX how to synchronize with future kame changes?

24 years agoregen
itojun [Sat, 7 Oct 2000 05:49:00 +0000 (05:49 +0000)] 
regen

24 years agono need for ENABLE_IPV6
itojun [Sat, 7 Oct 2000 05:47:44 +0000 (05:47 +0000)] 
no need for ENABLE_IPV6

24 years agono need to define ENABLE_IPV6, we use INET6
itojun [Sat, 7 Oct 2000 05:47:31 +0000 (05:47 +0000)] 
no need to define ENABLE_IPV6, we use INET6

24 years agono need to include ip6.h
itojun [Sat, 7 Oct 2000 05:46:21 +0000 (05:46 +0000)] 
no need to include ip6.h

24 years agono need to include ip6.h
itojun [Sat, 7 Oct 2000 05:33:25 +0000 (05:33 +0000)] 
no need to include ip6.h

24 years agorepair 1-byte buffer overrun
itojun [Sat, 7 Oct 2000 05:20:24 +0000 (05:20 +0000)] 
repair 1-byte buffer overrun

24 years agoRevert rev 1.9, since Guy has a better way.
fenner [Fri, 6 Oct 2000 17:21:39 +0000 (17:21 +0000)] 
Revert rev 1.9, since Guy has a better way.

24 years agomove ah/esp struct declratiaon into separate header (ah.h and esp.h).
itojun [Fri, 6 Oct 2000 11:32:17 +0000 (11:32 +0000)] 
move ah/esp struct declratiaon into separate header (ah.h and esp.h).
they are from KAME.

use ah.h and esp.h where necessary.

24 years agoRADIUS support, from Alfredo Andres Omella ([email protected]).
guy [Fri, 6 Oct 2000 06:49:20 +0000 (06:49 +0000)] 
RADIUS support, from Alfredo Andres Omella ([email protected]).

24 years agounused variable
itojun [Fri, 6 Oct 2000 06:18:35 +0000 (06:18 +0000)] 
unused variable

24 years agoRemove erroneous semicolon from "for()" clause; patch from Michael T.
guy [Fri, 6 Oct 2000 05:54:50 +0000 (05:54 +0000)] 
Remove erroneous semicolon from "for()" clause; patch from Michael T.
Stolarchuk.

24 years ago"timed" dissector, from Ben Smithurst.
guy [Fri, 6 Oct 2000 05:35:36 +0000 (05:35 +0000)] 
"timed" dissector, from Ben Smithurst.

24 years agoSquelch a compiler warning.
guy [Fri, 6 Oct 2000 04:25:59 +0000 (04:25 +0000)] 
Squelch a compiler warning.

24 years agoGet rid of some includes of <net/route.h>, and empty declarations of
guy [Fri, 6 Oct 2000 04:23:10 +0000 (04:23 +0000)] 
Get rid of some includes of <net/route.h>, and empty declarations of
"struct mbuf" and "struct rtentry" - they shouldn't be necessary (and
weren't on the platforms on which I tested, both with GCC and the native
compiler if it isn't GCC).

24 years agoWe no longer include <netinet/ip.h>, so we don't need to work around
guy [Fri, 6 Oct 2000 04:19:21 +0000 (04:19 +0000)] 
We no longer include <netinet/ip.h>, so we don't need to work around
Digital UNIX using "ip_vhl" rather than "ip_v" and "ip_hl" bitfields if
__STDC__ is defined (we have our own "ip.h", and we don't use bitfields
in it).

Get rid of HAVE_INET_ATON, HAVE_INET_NTOP, and HAVE_INET_PTON - we don't
use them; instead, we supply our own versions of "inet_aton()",
"inet_ntop()", and "inet_pton()".  (Defining them in "configure.in"
caused complaints from "autoreconf".)

Check for the "rc5.h" header, as we *do* use HAVE_RC5_H.

24 years agosome sprintf fixes, from [email protected] ([email protected] #89)
itojun [Thu, 5 Oct 2000 04:10:00 +0000 (04:10 +0000)] 
some sprintf fixes, from [email protected] ([email protected] #89)
pedant.

24 years agofix range check for ipcomp negotiation. From: [email protected]
itojun [Wed, 4 Oct 2000 22:37:29 +0000 (22:37 +0000)] 
fix range check for ipcomp negotiation.  From: [email protected]

24 years agoRegenerate to reflect changes in revs 1.122 and 1.123 of configure.in
fenner [Wed, 4 Oct 2000 17:00:20 +0000 (17:00 +0000)] 
Regenerate to reflect changes in revs 1.122 and 1.123 of configure.in

24 years agoUnbreak autoheader
fenner [Wed, 4 Oct 2000 16:59:04 +0000 (16:59 +0000)] 
Unbreak autoheader
(was broken by rev. 1.123 of configure.in)

24 years agosync with kame header. remove unofficial number (V42bis compression for IPComp).
itojun [Wed, 4 Oct 2000 03:00:29 +0000 (03:00 +0000)] 
sync with kame header.  remove unofficial number (V42bis compression for IPComp).

24 years agoadd AES and SHA2-*
itojun [Wed, 4 Oct 2000 02:54:40 +0000 (02:54 +0000)] 
add AES and SHA2-*

24 years agoUse "u_int8_t", "u_int16_t", and "u_int32_t" rather than "u_char",
guy [Tue, 3 Oct 2000 09:30:37 +0000 (09:30 +0000)] 
Use "u_int8_t", "u_int16_t", and "u_int32_t" rather than "u_char",
"u_short", and "u_int".

24 years agoC bitfields are no longer being used to extract bit fields from the IP
guy [Tue, 3 Oct 2000 09:17:40 +0000 (09:17 +0000)] 
C bitfields are no longer being used to extract bit fields from the IP
and TCP headers, so there's no need to stuff the byte-order stuff into
these header files.

24 years agoBitfield layout in memory is not specified by the ANSI C spec; don't use
guy [Tue, 3 Oct 2000 09:13:25 +0000 (09:13 +0000)] 
Bitfield layout in memory is not specified by the ANSI C spec; don't use
C bitfields to specify the layout of a DNS request or response header,
use shifts and masks to extract the bitfields.

24 years agodon't try to chase unaligned pointer.
itojun [Tue, 3 Oct 2000 05:16:38 +0000 (05:16 +0000)] 
don't try to chase unaligned pointer.
XXX memcpy() can be optimized in wacky way.  not sure if the use of
safememcpy() is enough...

24 years agoinclude string.h for memcpy/memset.
itojun [Tue, 3 Oct 2000 04:19:07 +0000 (04:19 +0000)] 
include string.h for memcpy/memset.
on some architecutrees, sizeof(void *) > sizeof(int).   don't try to cast
pointer to int to check alignment issues.

24 years agofix mistake in bitfield conversion
itojun [Tue, 3 Oct 2000 03:14:46 +0000 (03:14 +0000)] 
fix mistake in bitfield conversion

24 years agoregen
itojun [Tue, 3 Oct 2000 03:00:08 +0000 (03:00 +0000)] 
regen

24 years agoworkaround check of inet_{ntop,pton} for bsdi4.
itojun [Tue, 3 Oct 2000 02:59:53 +0000 (02:59 +0000)] 
workaround check of inet_{ntop,pton} for bsdi4.

bsdi4 ships with BIND8 resolver, and the way it defines inet_{ntop,pton}
is rather strange; it does not ship with libc symbol "inet_ntop".
it ships with "_inet_ntop", and has a #define macro in header to rename it.
AC_CHECK_FUNCS will always fail for resolver functions.

i consider it as a bug in merger.  bsdi should have done the following:
- supply _inet_ntop for libc-internal calls
- supply weak symbol inet_ntop for external reference
- no #define in headers

from kame.

24 years agotypo. from [email protected]
itojun [Tue, 3 Oct 2000 02:55:39 +0000 (02:55 +0000)] 
typo.  from [email protected]

24 years agoalways use u_intXX_t for protocol format declaration. char/short/int may not
itojun [Tue, 3 Oct 2000 02:54:54 +0000 (02:54 +0000)] 
always use u_intXX_t for protocol format declaration.  char/short/int may not
come with exact size.  while at it, correct signedness of ip/udp header field.
nuke most of the use of bitfield.
TODO: bitfield in namser.h

24 years agodo not use integer bitfield when we care about the resulting member size.
itojun [Tue, 3 Oct 2000 02:26:53 +0000 (02:26 +0000)] 
do not use integer bitfield when we care about the resulting member size.
u_int x:4, y:4; will occupy sizeof(int) on some platforms, while it occupy
1 byte on some platforms.  use macro to decode th_off.

24 years agotypo in comment. from [email protected]
itojun [Tue, 3 Oct 2000 02:19:04 +0000 (02:19 +0000)] 
typo in comment.  from [email protected]

24 years agograb upper layer protocol by chasing extension header chain.
itojun [Tue, 3 Oct 2000 02:17:50 +0000 (02:17 +0000)] 
grab upper layer protocol by chasing extension header chain.
from [email protected]

24 years agoInclude "interface.h" so that we check the definition of "bxxp_print()"
guy [Sat, 30 Sep 2000 08:37:44 +0000 (08:37 +0000)] 
Include "interface.h" so that we check the definition of "bxxp_print()"
against its declaration in "interface.h".

24 years agoBXXP support, from Richard Sharpe <[email protected]>.
guy [Sat, 30 Sep 2000 03:35:55 +0000 (03:35 +0000)] 
BXXP support, from Richard Sharpe <[email protected]>.

24 years agomore packed attributes, to avoid confusion on alignment-picky arch
itojun [Fri, 29 Sep 2000 20:42:34 +0000 (20:42 +0000)] 
more packed attributes, to avoid confusion on alignment-picky arch
(need more tests)

24 years agoregen
itojun [Fri, 29 Sep 2000 20:38:54 +0000 (20:38 +0000)] 
regen

24 years agoremove rc5 support.
itojun [Fri, 29 Sep 2000 20:37:27 +0000 (20:37 +0000)] 
remove rc5 support.
- presense of rc5.h does not correctly identify availability of rc5 library
  (neither AC_CHECK_FUNCS),
- we don't advocate it,
- and its use is very rare.

24 years agoGet "udp.h" from the tcpdump source tree, not from a system header file.
guy [Fri, 29 Sep 2000 05:46:11 +0000 (05:46 +0000)] 
Get "udp.h" from the tcpdump source tree, not from a system header file.

24 years agoDon't use "long" in structures that represent packet layouts - "long"
guy [Fri, 29 Sep 2000 05:33:48 +0000 (05:33 +0000)] 
Don't use "long" in structures that represent packet layouts - "long"
isn't necessarily 32 bits.

Use unsigned data types for unsigned values.

24 years agoDeclare bitfields as "u_int", not "u_char"; ANSI C doesn't guarantee
guy [Fri, 29 Sep 2000 05:05:47 +0000 (05:05 +0000)] 
Declare bitfields as "u_int", not "u_char"; ANSI C doesn't guarantee
that bitfields other than "int" or "unsigned int" are allowed, some
compilers warn about them, and, given that the declaration of a bit
field says how many bits it is wide, declaring them "u_char" doesn't
have any advantage (other than making it a bit clearer, when reading the
header, that the bitfields in question are part of a single byte).

24 years agoGet rid of includes of <netinet/in_systm.h>, and replace "n_short",
guy [Fri, 29 Sep 2000 04:58:33 +0000 (04:58 +0000)] 
Get rid of includes of <netinet/in_systm.h>, and replace "n_short",
"n_long", and "n_time", defined in that file, with other types.

24 years agoneed udp.h for handling port unreach
itojun [Thu, 28 Sep 2000 11:27:35 +0000 (11:27 +0000)] 
need udp.h for handling port unreach

24 years agoGet rid of unneeded includes of <net/if.h>.
guy [Thu, 28 Sep 2000 06:42:55 +0000 (06:42 +0000)] 
Get rid of unneeded includes of <net/if.h>.