Commit Graph

5807 Commits

Author SHA1 Message Date
Guy Harris 88e6717f51 Don't check for a short frame until we care whether the frame is short;
that lets us get rid of a variable.

svn path=/trunk/; revision=5689
2002-06-17 01:12:13 +00:00
Guy Harris 5cb1f7c75c Add support for reassembly of fragmented connectionless PDUs.
Don't try to add a fragment to a reassembly operation if we don't have
all of the stub data (because the frame is short, or because it's part
of a packet fragmented at a layer below RPC and not reassembled).

Put an entry into the protocol tree for the fragment data of the last
fragment.

svn path=/trunk/; revision=5688
2002-06-17 01:11:00 +00:00
Guy Harris 879107efe1 Add #defines for the bits in the flag fields, and a macro to test
whether a connection-oriented PDU is fragmented or not.

Clean up the handling of fragmented connection-oriented PDUs (the code
to handle fragmented PDUs can assume that it is not the case that both
PFC_FIRST_FRAG and PFC_LAST_FRAG are set, as that's an unfragmented
PDU).  Put an entry into the protocol tree for the fragment data in
fragmented PDUs.

For fragmented connectionless PDUs, don't hand the payload of any
fragment other than the first fragment to the subdissector.

svn path=/trunk/; revision=5687
2002-06-17 00:04:49 +00:00
Gerald Combs 0641e38087 Return an error for an invalid class instead of dumping core.
svn path=/trunk/; revision=5686
2002-06-16 17:08:43 +00:00
Ronnie Sahlberg 0087a8a56e Forgot again to remove test changes. Must update my testscripts so I dont need this change anymore.
svn path=/trunk/; revision=5685
2002-06-16 14:43:17 +00:00
Ronnie Sahlberg b410479691 Added dissectors for the requests for functions NetrCharDevGetInfo, NetrCharDevControl, NetrCharDevQEnum.
svn path=/trunk/; revision=5684
2002-06-16 14:29:15 +00:00
Ronnie Sahlberg caad19760a ALIGN_TO_4_BYTES cleanup
svn path=/trunk/; revision=5683
2002-06-16 13:50:51 +00:00
Ronnie Sahlberg 7acca5183a We must make sure that the ALIGN_TO_4_BYTES macro does not change the offset
when we do the conformance run.

svn path=/trunk/; revision=5682
2002-06-16 13:47:39 +00:00
Ronnie Sahlberg 5bece57634 Forgot to remove one change only used for local testing from last checkin
svn path=/trunk/; revision=5681
2002-06-16 11:55:46 +00:00
Ronnie Sahlberg 78299a48a5 Added dissection of the request for NetrCharDevEnum function.
svn path=/trunk/; revision=5680
2002-06-16 11:46:18 +00:00
Ronnie Sahlberg 231973f571 Changed one function name that was a duplicate.
svn path=/trunk/; revision=5679
2002-06-16 01:52:26 +00:00
Guy Harris 3baa49d71d Handle the "bool" members the same way we handled the members for
enumerated values - "boolp" for pointers, "boolval" for values.

svn path=/trunk/; revision=5678
2002-06-16 00:58:38 +00:00
Guy Harris 3a407d9567 From Chris Waters: don't use "bool" as a variable name or structure
member, as it's a C++ keyword.

svn path=/trunk/; revision=5677
2002-06-16 00:53:20 +00:00
Guy Harris 561aaa66e0 Fix "display_unicode_string()" to get the length of the Unicode string,
allocate a buffer big enough to hold the ASCIIfied version of that
string, and then ASCIIfy the Unicode string into that buffer, rather
than ASCIIfying into a fixed-length buffer.

svn path=/trunk/; revision=5676
2002-06-16 00:39:30 +00:00
Guy Harris 8dec71bc69 The enumerated types given in the WTLS spec have values given in
decimal, not hex; use decimal in the value_string tables for them, and
display them in decimal, not hex.

Clean up the names of the certificate types.

Add a routine to add text identifiers, use that routine rather than
doing similar things in several places in the code, and don't have that
routine extract the string contents into a buffer and add it with
"proto_tree_add_string()" - we can just use "proto_tree_add_item()",
which is simpler *and* removes worries about buffer overflows.

Use #defines rather than raw numerical values for identifier types in
switch-statement case clauses.

Fix a typo ("Unknow" -> "Unknown").

FT_NONE and FT_STRING fields can't have a base, so make them BASE_NONE.

svn path=/trunk/; revision=5675
2002-06-15 23:27:15 +00:00
Guy Harris 1204dfc523 Character set values are in hex in the WSP spec; always display them in
hex.

svn path=/trunk/; revision=5674
2002-06-15 23:23:31 +00:00
Ronnie Sahlberg 4c7dd2df0b Fixed bug in MAPI
If we had unreassebled DCERPC PDUs but had
decryption of MAPI enabled we would try to read too much data from the
tvbuff and ethereal would later dump core.

svn path=/trunk/; revision=5673
2002-06-15 22:24:31 +00:00
Guy Harris dc062c348b Put bounds checking into the code in "get_dns_name()" to handle RFC 2673
extended labels.

svn path=/trunk/; revision=5672
2002-06-15 20:38:34 +00:00
Ronnie Sahlberg 96c27779ba Added all missing function names.
Changed all existing function names to match MS naming of these functions.

svn path=/trunk/; revision=5671
2002-06-15 10:24:25 +00:00
Guy Harris afa5eefe49 From Graeme Hewson: fix capture-from-pipe not to block when reading from
the pipe, and clean up various other things.

svn path=/trunk/; revision=5670
2002-06-13 21:23:02 +00:00
Guy Harris 8637240895 Fix some compiler warnings.
svn path=/trunk/; revision=5669
2002-06-13 21:20:24 +00:00
Guy Harris 5e42823dc0 Move the entries to map between platform-dependent libpcap link-layer
types and Wiretap encapsulations after the entries to map between
platform-independent libpcap link-layer types and those Wiretap
encapsulations, so that, when writing a libpcap-format file, we choose
the platform-independent link-layer types.

svn path=/trunk/; revision=5668
2002-06-13 11:03:23 +00:00
Guy Harris 63ae5638e1 Add /I$(PCAP_DIR)/include to the list of directories in which to look
for header files, so that we find "pcap.h".

svn path=/trunk/; revision=5667
2002-06-13 10:39:29 +00:00
Guy Harris 3f81102560 From Bill Fumerola: recognize "Option negotiated failed" error in TFTP.
svn path=/trunk/; revision=5666
2002-06-13 08:48:44 +00:00
Guy Harris b412b99609 From Peter Hawkins: make the maximum length argument to
"tvb_get_nstringz0()" no larger than the space in "str" (not counting
the space for the trailing '\0').

Make "str" big enough to hold a maximum-length serial number string (the
length is 1 byte, hence the maximum length is 256 bytes plus 1 byte of
terminating '\0').

svn path=/trunk/; revision=5665
2002-06-13 07:36:52 +00:00
Guy Harris be4fc3120a From Peter Hawkins: fix the maximum length argument to "tvb_memcpy()".
svn path=/trunk/; revision=5664
2002-06-13 07:32:34 +00:00
Guy Harris 1fdab024c0 From Steve Housley: support for the IEEE 802.3ad Link Aggregation
Control Protocol.

svn path=/trunk/; revision=5663
2002-06-13 07:18:49 +00:00
Guy Harris 5c93900204 Export the new wtap_process_pcap_packet routine.
svn path=/trunk/; revision=5662
2002-06-13 06:50:41 +00:00
Guy Harris 7f22bc6e1a From Loic Tortay: fix a crash when dissecting AFS authentication
requests - the data part of the AFS authentication request
(hf_afs_kauth_data) is displayed as a string whilst declared as a binary
array in "packet-afs-register-info.h".

svn path=/trunk/; revision=5661
2002-06-13 06:43:46 +00:00
Gilbert Ramirez 87e011637c Add #define HAVE_PCAP_H 1 to config.h.win32.
In libpcap.c, move wtap_pcap_encap_to_wtap_encap before libpcap_open
so that if HAVE_PCAP_H is not true, the file will still compile.

svn path=/trunk/; revision=5660
2002-06-10 15:45:30 +00:00
Guy Harris 4754a67c12 Make various text buffers all the same size, so that, for example, we
don't overflow the token buffer if presented with a maximum-sized
command.

svn path=/trunk/; revision=5659
2002-06-09 21:25:47 +00:00
Guy Harris b406d462b7 Add in names for NDS verbs, from a list found by a Web search that found
the source to an "ipxdump" utility from the Linux ncpfs package.

The NetworkAddress field in a 23/26 GetInternetAddress reply appears
to be big-endian; we assume it's big-endian in all messages.

The NetworkSocket field in that reply also appears to be big-endian;
it was already set up to be big-endian in other messages.

Put in comments noting other things seen in captures.

svn path=/trunk/; revision=5658
2002-06-09 01:36:43 +00:00
Gerald Combs c5f400ed77 From John Wells: Fix the default offset adjustment in dissect_mip_extentions.
svn path=/trunk/; revision=5657
2002-06-09 01:03:19 +00:00
Guy Harris 2be8f3e875 When looking for dissectors for the source and destination port numbers
in TCP, UDP, and SCTP, try the lower port number first, and then the
higher port number; this means that, for packets where a dissector is
registered for *both* port numbers:

	1) we pick the same dissector for traffic going in both directions;

	2) we prefer the port number that's more likely to be the right
	   one (as that prefers well-known ports to reserved ports);

although there is, of course, no guarantee that any such strategy will
always pick the right port number.

Ignore port numbers of 0, as some dissectors use a port number of 0 to
disable the port, and as RFC 768 says that the source port in UDP
datagrams is optional and is 0 if not used.

svn path=/trunk/; revision=5656
2002-06-08 21:54:52 +00:00
Guy Harris 9920d2c257 Tweak some of the "levels" arguments to properly decorate the protocol
tree with share names.

svn path=/trunk/; revision=5655
2002-06-08 10:58:46 +00:00
Ronnie Sahlberg 50fa0c9345 Updates to netshareenumall to correctly decode reply packets
svn path=/trunk/; revision=5654
2002-06-07 23:05:12 +00:00
Guy Harris 4d3887d325 From Martin Gignac: fix the handling of From: headers to properly
interpret and show Value-Length fields bigger than a single byte.
allows the dissector to properly interpret and show
From: headers with a Value-Length field bigger than a single byte.

svn path=/trunk/; revision=5653
2002-06-07 22:50:49 +00:00
Guy Harris c2b438ddfa Add a Wiretap routine to process packets captured via libpcap, possibly
extracting a pseudo-header, for the use of SunATM captures.

Add support for SunATM capture.

svn path=/trunk/; revision=5652
2002-06-07 21:11:24 +00:00
Gilbert Ramirez ec51177792 Fix the decode of NCP 8701.
svn path=/trunk/; revision=5651
2002-06-07 15:33:37 +00:00
Guy Harris 24780c3300 Don't call "tvb_strsize(tvb, offset)" if we know there's nothing *at*
"offset".

svn path=/trunk/; revision=5650
2002-06-07 11:37:05 +00:00
Guy Harris 76834efbb2 Use "tvb_memcpy()" rather than "strncpy()" with a "tvb_get_ptr()"
argument to copy a counted string, and use "tvb_strsize()" rather tan
"strlen()" with a "tvb_get_ptr()" argument to get the length of a
null-terminated string, so that we throw an exception if we go past the
end of the tvbuff, rather than processing bytes past the end.

svn path=/trunk/; revision=5649
2002-06-07 11:27:54 +00:00
Guy Harris 1eadf370cd Just have "pcap_dispatch()" cons up a "strut pcap_pkthdr" and call
"capture_pcap_cb()", so it duplicates even less of the latter routine.

svn path=/trunk/; revision=5648
2002-06-07 11:12:43 +00:00
Guy Harris 748c6566f9 Have a common routine for doing the packet counter stuff, rather than
having two different versions, both broken in different ways.

Bump the count of total packets in the capture-from-pipe routine.

svn path=/trunk/; revision=5647
2002-06-07 10:54:03 +00:00
Guy Harris b53c02b4ef Pass the captured length, not the full length, to the "capture_"
routines.

Call the 802.11 and Cisco HDLC capture routines for those packet types.

svn path=/trunk/; revision=5646
2002-06-07 10:36:57 +00:00
Guy Harris 41846edc8b Put the stuff to add the "Illegal {fragment,segment}" item to the Info
column, and to return TRUE or FALSE, depending on whether there were any
reassembly errors, in a common routine.

svn path=/trunk/; revision=5645
2002-06-07 10:17:21 +00:00
Guy Harris 4f9508837a Add "show_fragment_seq_tree()", which is like "show_fragment_tree()",
but for stuff reassembled with "fragment_add_seq()" or
"fragment_add_seq_check()".

Add a "fragment tag" string to the "fragment_items", so that packets
with fragmentation errors can be properly flagged as having "Illegal
fragments" or "Illegal segments" depending on the term used with the
protocol in question.

Make all the dissectors that can use "show_fragment_tree()" or
"show_fragment_seq_tree()", and don't already use them, do so.

svn path=/trunk/; revision=5644
2002-06-07 10:11:41 +00:00
Guy Harris 1b72ef68e6 Add a new error for attempts to open a pipe or FIFO for random access.
Have "wtap_open_offline()", if asked to open a FIFO, return that error
if it was asked to open the file for random access.

svn path=/trunk/; revision=5643
2002-06-07 07:47:58 +00:00
Guy Harris 2aad75bb82 Graeme Hewson noted that zlib has a bug wherein "gzseek()" doesn't set
the internal z_err value for the stream if an "fseek()" call it makes
fails, so that if "gzerror()" is subsequently called, it returns Z_OK
rather than an error.

To work around this, we pass "file_seek()" an "int *err", and have the
with-zlib version of "file_seek()" check, if "gzseek()" fails, whether
the return value of "file_error()" is 0 and, if so, have it return
"errno" instead.

svn path=/trunk/; revision=5642
2002-06-07 07:27:35 +00:00
Tim Potter c15486768a Fixed another bug in RRPCN.
Some more updates for printer notification data types as I figure out
how it all hangs together.

svn path=/trunk/; revision=5641
2002-06-07 06:10:53 +00:00
Guy Harris 199aaacbb7 BSD/OS Frame Relay packets just begin with the Frame Relay header, so
they are, in fact, WTAP_ENCAP_FRELAY.  Support 11 as WTAP_ENCAP_FRELAY
if DLT_FR is defined and is equal to 11, and support 107 as
WTAP_ENCAP_FRELAY unconditionally.

Get rid of a comment indicating that 105 isn't used - it's been
supported as DLT_IEEE802_11 for a while.

svn path=/trunk/; revision=5640
2002-06-07 04:48:36 +00:00