Commit Graph

5589 Commits

Author SHA1 Message Date
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
Tim Potter 7c8ae51531 A printer port name is a notification string, not a two word value.
A RFNPCNEX request contains a NOTIFY_OPTIONS_ARRAY_CTR instead of a
NOTIFY_OPTIONS_ARRAY.

svn path=/trunk/; revision=5639
2002-06-07 03:42:02 +00:00
Gerald Combs 563a25c153 Keep an invalid packet length from overflowing a data buffer.
svn path=/trunk/; revision=5638
2002-06-06 22:42:27 +00:00
Guy Harris 358df4f2f4 From Michael Tuexen: remove the old workaround for "select()"s not
working on MacOS X.

It appears that the underlying problem with the timeout was that we
weren't treating MacOS X as a BSD, and the "select()" we were doing
presumably wasn't working as it doesn't work on BPF devices on many
BSDs; the workaround no longer appears to be necessary, with Michael's
fix to treat MacOS X as BSD.

(Presumably a select timeout with "tv_usec" set to 1000*1000
microseconds was treated as an error, or otherwise treated in such a way
that it didn't block waiting for the BPF device to say it could be
read.)

svn path=/trunk/; revision=5637
2002-06-06 19:03:39 +00:00
Guy Harris 7acc6a8e1a Use "phtons()", not "htons()", just as we use "pntohs()" rather than
"ntohs()".

svn path=/trunk/; revision=5636
2002-06-06 18:58:12 +00:00
Nathan Neulinger c66c1ba70a more dissection of flags, break out into subs
svn path=/trunk/; revision=5635
2002-06-06 13:17:49 +00:00
Guy Harris cf204c9938 Properly check for unknown RSVP message types.
Note where the message types are defined.

svn path=/trunk/; revision=5634
2002-06-06 11:02:05 +00:00
Guy Harris bb778e86a7 Support the Solaris+SunATM libpcap capture file type (not yet checked
into libpcap or tcpdump, but the LINKTYPE_ number is reserved for that
purpose).

svn path=/trunk/; revision=5633
2002-06-06 09:18:28 +00:00
Tim Potter 7db4c88dcd Dissect spoolss FCPN. Not sure what it stands for.
svn path=/trunk/; revision=5632
2002-06-06 05:46:55 +00:00
Tim Potter fb78dde09e Implemented ReplyClosePrinter().
Fixed calls to dissect_nt_policy_hnd() as ReplyOpenPrinter() opens a
handle and ReplyClosePrinter() closes one.

svn path=/trunk/; revision=5631
2002-06-06 03:18:14 +00:00
Guy Harris b9ba6ca176 From Martin Gignac: make the MMS heuristic dissector recognize packets
that lack a Transaction-Id header, as some packets don't have one.

svn path=/trunk/; revision=5630
2002-06-05 23:54:10 +00:00
Guy Harris d0773ba9bf From Martin Gignac: fix some values to match the
WAP-209-MMSEncapsulation-20020105-a spec.

svn path=/trunk/; revision=5629
2002-06-05 19:03:42 +00:00
Nathan Neulinger 715ba268f9 add support for bitfield of global session options, nt proto options, and connect flags, needs verification likely
svn path=/trunk/; revision=5628
2002-06-05 17:41:59 +00:00
Ronnie Sahlberg 1e043ca82a Updated NDMP and ONC RPC services to use the new function to display
fregment trees.

svn path=/trunk/; revision=5627
2002-06-05 11:32:14 +00:00
Ronnie Sahlberg 31823cb851 Added show_fragment_tree() to reassemble. This function will do the common
task of creating a fregment tree for the fragmented packets.
Having this identical code to create this tree in every dissector that does
PDU reassembly is a huge waste and duplication of code.

Updated IP, SMB and DCERPC to use the new function.

svn path=/trunk/; revision=5626
2002-06-05 11:21:49 +00:00
Tim Potter 230ac0da7a Implemented RRPCN (RemotePrinterChangeNotification).
Use the di->levels field to pass info to notify options rather than
mucking about with the private_data fields which mysteriously doesn't
work.

Fixed some display bugs in notify data.

svn path=/trunk/; revision=5625
2002-06-05 07:15:47 +00:00
Tim Potter 134404b92a Added dissect_ndr_uint16s() utility function for dissecting a buffer
of uint16 values.

svn path=/trunk/; revision=5624
2002-06-05 04:17:47 +00:00
Tim Potter 4616797423 Converted all reply functions to use dissect_doserror() instead of
prs_werror().

Converted RFFPCNEX (FindFirstPrintChangeNotification) to Ronnie's NDR
routines.

Implemented RFNPCNEX (FindNextPrintChangeNotification).  Print
notification data is dissected in a length/buffer format instead of
dissecting as the underlying type (string secdesc, devmode etc).

svn path=/trunk/; revision=5623
2002-06-05 04:15:30 +00:00
Tim Potter 18324cb59a Added a whole lot of print notification constants.
svn path=/trunk/; revision=5622
2002-06-05 04:12:22 +00:00