Commit Graph

557 Commits

Author SHA1 Message Date
guy
cc97f2bc98 The filter expression "ether proto ipx" now checks for all four count
'em four different types of IPX frames on Ethernet.
2001-01-15 00:36:51 +00:00
guy
e8b1f5e760 LLC frames with a DSAP and LSAP of 0xe0 are IPX frames, and so are Linux
cooked frames with a type value of LINUX_SLL_P_802_3; dissect them as
such.
2001-01-15 00:33:59 +00:00
guy
9043a59512 I lied - we *do* dissect IPX frames, it turns out.
Update the description of "ether proto" to explain all the stuff we do
to check for IPX frames.
2001-01-14 21:04:45 +00:00
guy
6953cdcf51 Document the new "ipx" argument to "ether proto". 2001-01-14 08:13:09 +00:00
guy
f669fdec18 Document the new "stp" protocol type in filter expressions.
Make the explanation of the "ether <proto>" expression more completely
explain the various cases.
2001-01-14 05:03:42 +00:00
itojun
277c15d74a print truncated message in a more friendly manner. from jinmei@kame.net 2001-01-12 15:06:06 +00:00
guy
45aef49d89 "#if 0" out stuff for "asprintf()", "asnprintf()", "vasprintf()", and
"vasnprintf()", as we're not using any of them, and we're not declaring
them in "interface.h" (keep them around for now in case we decide we
need them; they may be useful if we ever want to "sprintf" a string and
want the string to grow dynamically to hold what we're putting into it).
2001-01-12 10:14:40 +00:00
mcr
990656e629 adde $Header$ to tcpdump/CHANGES to match libpcap 2001-01-10 20:13:58 +00:00
fenner
74f315405c Fix a minor buffer bounds problem: if the length of an ACL is greater
than AFSOPAQUEMAX, a NUL could be written out of bounds of the
 storage for the ACL.  This is almost definitely unexploitable,
 since no network-supplied data is written (only a NUL).
2001-01-10 08:12:01 +00:00
guy
d50b5308c1 Fix some typos, and adjust the text to fit within 80 columns. 2001-01-10 05:30:07 +00:00
guy
8ec4b5b7d5 Fix a typo.
Remove the entry with the older version of Alfredo Andres' e-mail
address, and with Love Hörnquist-Åstrand's first name but not last name.

Put in Sebastian Krahmer's e-mail address.
2001-01-10 05:16:06 +00:00
mcr
cdc362ea30 update CHANGES and CREDITS 2001-01-10 00:14:30 +00:00
fenner
958d989808 Don't print the IP src and dst again; print-ip.c already did it. 2001-01-09 08:01:18 +00:00
fenner
aee1aa6195 Add NDS tags 62 and 63 from RFC 2242. 2001-01-09 07:39:13 +00:00
fenner
712dbb6a75 Regenerate. 2001-01-09 07:26:09 +00:00
fenner
7812585f2f Add -L to beginning of LDFLAGS, not end of LIBS. 2001-01-09 07:21:53 +00:00
guy
add5c7c61a We already added DLT_LINUX_COOKED, except it's called DLT_LINUX_SLL, and
the code for Linux kernel filtering hands the kernel a modified copy of
the filter that refers to the link-layer headers, for DLT_LINUX_SLL,
with the negative offsets in question.
2001-01-03 19:37:18 +00:00
mcr
c34f321a4d adjusted date field 2001-01-03 17:35:34 +00:00
mcr
2296d0017b added to todo list 2001-01-03 17:35:14 +00:00
guy
0947e63cde Remove some uninitialized variable complaints. 2001-01-02 23:24:51 +00:00
guy
35e44ee8d7 When printing VRRP packets, show the source and destination IP addresses
if "-v" was specified.  From OpenBSD.
2001-01-02 23:00:00 +00:00
guy
2b0c9995e4 Patch from Pekka Savola <pekkas@netcore.fi> to keep from dragging in our
version of "snprintf()" unless the platform on which we're running lacks
"snprintf()" or "vsnprintf()" - if it lacks one of the "asprintf" family
of routines, we don't drag it in, as we don't use those routines.
2001-01-02 22:47:04 +00:00
guy
5c46e9a6cc Patch from Pekka Savola <pekkas@netcore.fi> to keep from dragging in our
version of "snprintf()" unless the platform on which we're running lacks
"snprintf()" or "vsnprintf()" - if it lacks one of the "asprintf" family
of routines, we don't drag it in, as we don't use those routines.
2001-01-02 22:36:50 +00:00
guy
3d6bd825ee As GCC "2.96" notes, "short int' is promoted to int' when passed
through `...'", and therefore "...you should pass `int' not `short int'
to `va_arg'".

GCC "2.96" apparently fails to compile code that passes "short int" to
"va_arg()", and Red Hat Linux 7.0 uses GCC "2.96", so we fix this, as
per Pekka Savola's note.
2001-01-02 22:33:04 +00:00
guy
5494ba2282 Fix indentation. 2001-01-02 22:18:27 +00:00
itojun
16ce7b4be2 avoid segfault (NULL pointer deref) 2001-01-01 04:22:56 +00:00
itojun
5d5b5e03ac fix bit string label decoding again. from jinmei@kame.net 2000-12-31 07:12:18 +00:00
itojun
f4bc38ab26 correct bit string label decoding. jinmei@kame.net 2000-12-30 15:47:58 +00:00
itojun
79ce1730d7 spacing 2000-12-30 09:07:40 +00:00
itojun
8ad280b397 parse EDNS0. 2000-12-30 09:06:21 +00:00
itojun
041e99f6c0 support DNAME and bit string label. more pedantic snapend validation.
{jinmei,itojun}@kame.net
2000-12-28 20:30:41 +00:00
itojun
6eeb04bfe0 fix A6 decoding. jinmei@kame.net 2000-12-27 12:23:27 +00:00
itojun
16fb5d1fef handle PPP_IPV6 2000-12-27 11:09:08 +00:00
guy
a329c9ae7c When adding the last byte of an odd number of bytes to a TCP or UDP
checksum, fetch it by casting the pointer to "const u_int8_t *" rather
than "const char *" - casting it to "const char *" causes it to be
sign-extended, perhaps causing 16 1 bits to be added in at the top and,
at least on big-endian platforms (where "htons()" does nothing, meaning
it won't trim off the extra 16 bits) with signed "char"s (e.g., SPARC),
causing the checksum to be computed incorrectly and causing it to
incorrectly be reported as bad.
2000-12-23 20:55:22 +00:00
guy
e98a140573 Have the Linux cooked dissector set "packetp" to point to the fake
Ethernet header it constructs.
2000-12-23 20:49:34 +00:00
guy
8d35bf0e1c Fix some comments to reflect current reality. 2000-12-23 20:48:13 +00:00
guy
16011e473a It's a bit more convenient for Ethereal if the "sll_protocol" field is
at the end of the link-layer header; put it there.

Put in a comment indicating that the layout of the link-layer header
shouldn't be changed; if a new header is necessary, a new DLL_ type
should be introduced for it.
2000-12-23 07:52:11 +00:00
guy
737c58073a Put the LINUX_SLL_P_ definitions back, and check for at least some of
them in "print-sll.c" - as a cooked-mode capture may be reading from
non-Ethernet, non-802.x devices, it may well see some
ETH_P_/LINUX_SLL_P_ types that don't mean "this is an 802.2 LLC frame".

We currently assume that the ETH_P_ values won't change in the kernel,
so we don't have to explicitly map them.

In various link-layer packet printers, if we don't handle the next layer
up of packet type, and are printing the link-layer header, use the
correct pointer to that header (i.e., if we've stepped "p" past the
link-layer header, don't use "p", use a pointer to the beginning of the
packet), and use the correct length (i.e., if we've subtracted the
length of the link-layer header, add it back in, so that we always print
the full packet length).
2000-12-22 22:45:09 +00:00
guy
4154b2a823 Update a comment. 2000-12-22 12:18:32 +00:00
guy
71eb51233f Add support for a new link layer type DLT_LINUX_SLL, for use when doing
live captures with a "cooked" (SOCK_DGRAM) rather than a "raw"
(SOCK_RAW) PF_PACKET socket; it includes a bunch of the fields from the
"struct sockaddr_ll" you get in a "recvfrom()", including the Ethernet
protocol field.
2000-12-21 10:43:19 +00:00
itojun
ce3c0b3c62 fix A6 decoding. 2000-12-20 05:09:56 +00:00
guy
7c298117dd Update Alfredo Andres's e-mail address, as per his request. 2000-12-18 08:16:58 +00:00
guy
d7254f081d Pass only I frames and UI frames to the NetBEUI printer; thanks and a
tip of the Hatlo hat to Pascal Hennequin <pascal.hennequin@int-evry.fr>
for catching this one.

Also, the control field in an S or I frame is little-endian; treat it as
such, fixing various #defines in "llc.h" to match.
2000-12-18 07:55:36 +00:00
guy
7c4458eb6a Making "extracted_ethertype" static to "print-ether.c" broke other
dissectors that expected calls to "llc_print()" to set it.  (Thanks and
a tip of the hat to Olaf Kirch <okir@caldera.de> for noticing this.)

Make "ether_encap_print()" and "llc_print()" take a pointer to an
extracted-Ethertype variable as an argument, have "llc_print()" pass it
to "ether_encap_print()", and have "ether_encap_print()" set what it
points to rather than setting a static "extracted_ethertype" variable.

Get rid of said static "extracted_ethertype" variable in favor of one
local to "ether_if_print()", just as other link-layer dissectors have
local "extracted_ethertype" variables.
2000-12-18 05:41:58 +00:00
guy
93b36b0a34 Give a bunch of files RCS and SCCS IDs. 2000-12-17 23:13:32 +00:00
guy
4881292df0 Give a bunch of files RCS and SCCS IDs. 2000-12-17 23:07:48 +00:00
guy
364f621bdf Add in one missing CHANGES entry. 2000-12-17 19:37:57 +00:00
fenner
cd19693679 Update config.guess and config.sub to revision 2000-12-15
from ftp://ftp.gnu.org/gnu/config/
2000-12-17 15:16:51 +00:00
guy
aa22569a90 Handle DLT_NULL correctly - the AF_ value is in host byte order, which
may not be *our* byte order if we're reading a capture file from another
machine; we currently handle that by checking whether it looks like an
integer < 65536 or not and, if it's not, byte-swap it.

This also lets us handle OpenBSD DLT_LOOP as well - it's like DLT_NULL
except that the AF_ value is in *network* byte order.

(Old-style Linux loopback captures were also DLT_NULL, but the header
had an Ethernet type in it; there have also been captures where the
header was a PPP header.  For now, we just continue to assume that all
DLT_NULL packets are IP, and check the IP version field to decide
whether it's IPv4, IPv6, or something else.

We may want to consider adopting Ethereal's heuristics, which would at
least mean we wouldn't be reporting bogus packet types for old-style
Linux loopback captures and those weird PPP - ISDN4BSD? - captures,
although the version of libpcap that goes with this version of tcpdump
doesn't produce bogus DLT_NULL captures for Linux loopback devices.)
2000-12-16 22:00:50 +00:00
guy
86eb0bec35 Clean up promiscuous mode, when using SOCK_PACKET, as best we can;
remember which pcap_t's were opened (with SOCK_PACKET) in promiscuous
mode on interfaces not already in promiscuous mode, turn promiscuous
mode off when closing such a pcap_t, and arrange that, when the program
exits, all pcap_t's of that sort not already closed have their
interfaces taken out of promiscuous mode.  (It's not sufficient to do
this on exit - applications may close a pcap_t without exiting, e.g.
Ethereal.)

This won't always work right (if somebody else requests promiscuous mode
after it's opened by libpcap, we'll turn promiscuous mode off when we
close the pcap_t, and if the program doesn't exit cleanly, it won't
clean up the interfaces), but neither of those problems are fixable -
the only way to get things to work correctly is to use PF_PACKET
sockets, which requires a 2.2 or later kernel.

On a 2.0[.x] kernel, when doing a "recvfrom()" on a SOCK_PACKET socket
to read a captured packet, don't pass a byte count value based on the
snapshot length - "recvfrom()" won't return the actual packet length if
you do that.  (2.2 and later kernels will return the actual packet
length if MSG_TRUNC is passed in.)

Update the documentation to reflect improved Appletalk support.
2000-12-16 10:57:26 +00:00