Commit Graph

6767 Commits

Author SHA1 Message Date
Ronnie Sahlberg 56e511657d calculate delta and rel time earlier and unconditionally of whether the packet passed the displayfilter or not.
there may be tap listeners that want to examine this field.

svn path=/trunk/; revision=6702
2002-11-29 11:02:13 +00:00
Guy Harris 85fd3afd2f Before dissecting the payload of a Protocol-Reject LCP packet, save the
current "this is an error packet" flag and set that flag, so the payload
is dissected as the payload of an error packet rather than as a "real"
packet.

svn path=/trunk/; revision=6701
2002-11-28 22:18:53 +00:00
Guy Harris b16fb8f257 Fix "addr_ip6_to_str" to reflect the fact that "ip6_to_str()" now takes
a const pointer as its argument.

svn path=/trunk/; revision=6700
2002-11-28 22:13:52 +00:00
Guy Harris 0e050b1107 Get rid of the "pdata" argument to "dissect_dcerpc_uint16s()" and
"dissect_ndr_uint16s()"; "dissect_ndr_uint16s()" is always passed a null
pointer, "dissect_dcerpc_uint16s()" is only called by
"dissect_ndr_uint16s()", and the pointer returned through "pdata" is
*NOT* guaranteed to be aligned on a 16-bit boundary so we don't want to
tempt people to blithely dereference that pointer.

svn path=/trunk/; revision=6699
2002-11-28 21:03:36 +00:00
Guy Harris ca642e12ba From Pasi Eronen: dissect the packet inside an LCP Protocol Reject message.
svn path=/trunk/; revision=6698
2002-11-28 20:48:14 +00:00
Guy Harris 191be83c54 From Marco Molteni: fix a typo and a function name, and give it an RCS
ID.

svn path=/trunk/; revision=6697
2002-11-28 20:29:46 +00:00
Guy Harris b964b41f06 From Marco Molteni: fix a comment to reflect reality.
svn path=/trunk/; revision=6696
2002-11-28 20:28:30 +00:00
Guy Harris 432d89ab36 We have to keep the first frame - circuits aren't necessarily created as
soon as we see a packet for that circuit (we don't do that in X.25, for
example), so there's no guarantee that the first circuit starts at the
first circuit of the capture.

svn path=/trunk/; revision=6695
2002-11-28 08:25:59 +00:00
Guy Harris 436a7d9857 Don't keep the first frame around for circuits; we assume that a given
circuit begins either at the beginning of the capture or right after the
previous circuit ends.

svn path=/trunk/; revision=6694
2002-11-28 08:12:07 +00:00
Guy Harris a32fd64663 Don't dissect SASL stuff as GSS_Wrapped unless we're actually using
GSS-SPNEGO.

svn path=/trunk/; revision=6693
2002-11-28 07:01:30 +00:00
Guy Harris 35eefef60a Handle GSS_Wrap header information as well as context-level tokens. A
call to "gssapi_init_oid()" supplies both dissectors for context-level
tokens and GSS_Wrap header information; the latter dissector should
return the number of bytes of header information, so that if the header
information and the message for the protocol that's using GSSAPI are
treated as a single blob of data (as is the case with LDAP, but not with
DCE RPC, for example), the dissector for the protocol using GSSAPI knows
where to start dissecting.

We associate a pointer to the entire data structure for the OID, not the
handle for context-level token dissector for the OID, with conversations
and frames.

Make the dissector for NTLMSSP verifiers be the handler for GSS_Wrap
stuff for NTLMSSP, and add support for GSS_Wrap stuff for Kerberos.

Support SASL GSS-SPNEGO wrapping of LDAP messages.  (XXX - this should
really check for GSS-SPNEGO.)

svn path=/trunk/; revision=6692
2002-11-28 06:48:42 +00:00
Guy Harris 094345b492 Assign the results of calls to "tvb_get_ptr()" to const pointer
variables, not non-const pointer variables.

svn path=/trunk/; revision=6691
2002-11-28 04:57:43 +00:00
Guy Harris f1d905c917 Make the pointer passed by reference as the last argument of
"dissect_ndr_uint8s()" a const pointer, as that's what
"dissect_ndr_uint8s()" expects.

svn path=/trunk/; revision=6690
2002-11-28 04:56:43 +00:00
Guy Harris 4056129fef Add a "--with-extra-gcc-checks" option, which causes "-Wcast-qual
-Wcast-align" to be added to CFLAGS (except in Wiretap, where we already
do "-Wcast-qual").  We don't do them by default, as they produce some
warnings that aren't easy to eliminate; if we figure out how to
eliminate them on all platforms (or at least, on the platforms where you
*can't* eliminate them, reduce them to a low level), we can make those
options the default.

svn path=/trunk/; revision=6689
2002-11-28 04:21:31 +00:00
Guy Harris a56c79201d Arguments to hash routines are gconstpointer's; assign them to const
pointers.

The first argument to "sscanf()" is a "const char *"; don't cast const
pointers to "char *" when passing them to "sscanf()".

Assign the result of "tvb_get_ptr()" to const pointers, not non-const
pointers.

Make the "pdata" argument to various DCE routines a const pointer.

svn path=/trunk/; revision=6688
2002-11-28 03:57:50 +00:00
Guy Harris 0abda39c90 Make "ip6_to_str()" take a const pointer as an argument.
svn path=/trunk/; revision=6687
2002-11-28 03:54:50 +00:00
Guy Harris 0051e3c2e8 That was the wrong cast, d00d....
svn path=/trunk/; revision=6686
2002-11-28 02:04:23 +00:00
Guy Harris 5dbad1dcdc Constify some pointers to avoid converting const pointers to non-const
pointers.

svn path=/trunk/; revision=6685
2002-11-28 01:58:27 +00:00
Guy Harris 7b743f7d7d Make the "strings" pointer in a "header_field_info" structure a const
pointer, and put "const" into the casts in "VALS()" and "TFS()" macros,
so we don't un-constify pointers to "value_string" arrays and
"true_false_string" structures.

Make some things "const" to keep the compiler happy with the previous
change.

svn path=/trunk/; revision=6684
2002-11-28 01:46:14 +00:00
Guy Harris acaf3c90b3 Cast various "const gpointer" arguments to const pointers rather than
non-const pointers.

svn path=/trunk/; revision=6683
2002-11-27 22:44:41 +00:00
Guy Harris f97b0d7949 "ether_to_str()" takes a "const guint8 *" as an argument; there's no
need to cast a "const guint8 *" to a "guint8 *" when passing it to
"ether_to_str()".

svn path=/trunk/; revision=6682
2002-11-27 22:42:40 +00:00
Guy Harris 572dc4d5e4 The arguments to the "pntoh" and "pletoh" macros could be const
pointers, so cast them to "const guint8 *".

svn path=/trunk/; revision=6681
2002-11-27 22:41:00 +00:00
Guy Harris 08044b0409 Add "-Wcast-qual" to the list of "-W" flags, so we catch code that could
attempt to store through a const pointer.

svn path=/trunk/; revision=6680
2002-11-27 22:24:27 +00:00
Guy Harris a40e352b26 The "pd" argument to "wtap_process_pcap_packet()" is a const pointer;
when extracting the ATM pseudo-header from the data it points to, cast
it to a "const struct sunatm_hdr *".

svn path=/trunk/; revision=6679
2002-11-27 22:23:34 +00:00
Guy Harris 50256af1c8 The arguments to the "pntoh" and "pletoh" macros could be const
pointers, so cast them to "const guint8 *".

svn path=/trunk/; revision=6678
2002-11-27 22:21:41 +00:00
Guy Harris 320017c8df From Andreas Trauer:
In a Router-LSA in an OSPF LS Update packet it was difficult for
	the untrained to associate the informations in the link list to
	the single links.  This patch adds a subtree for each link with
	a short summary in the tree "title".

svn path=/trunk/; revision=6677
2002-11-27 19:10:51 +00:00
Guy Harris bf261bb4e6 Try to handle LDAP messages encapsulated inside a SASL security layer.
Reorganize the desegmentation to match a bit more closely the
desegmentation code in "tcp_dissect_pdus()" (eventually, we should see
if we can just use that code).

svn path=/trunk/; revision=6676
2002-11-27 04:59:56 +00:00
Guy Harris 5620a882ec Check whether we got an overflow for the PDU length *before* we check
whether we have that much data.

svn path=/trunk/; revision=6675
2002-11-27 04:55:23 +00:00
Guy Harris 6a4cecd753 Update to match what a Sniffer document says about TDS.
svn path=/trunk/; revision=6674
2002-11-26 21:45:28 +00:00
Jörg Mayer f6d6da9d31 The command says 0x20-0x2F: Adjust mask accordingly
svn path=/trunk/; revision=6673
2002-11-26 10:31:24 +00:00
Guy Harris a1c648718a From Jason Greene:
This patch fixes decoding of the newSuperior attribute of an
	LDAPv3 modrdn request.  The current implementation attempts to
	decode the attribute as an LDAPDN (Octext String, 0x4), when its
	definition is actually Context 0 (0x80).

svn path=/trunk/; revision=6672
2002-11-25 19:20:44 +00:00
Guy Harris 751eaa43d9 Update Tomas Kukosa's e-mail address.
svn path=/trunk/; revision=6671
2002-11-25 19:07:53 +00:00
Guy Harris 94b5a36fe1 Make "dissect_spoolss_uint16uni()" take an extra argument giving the
name of the field being dissected, and, if it's not null, use it instead
of "UINT16UNI".  Pass the appropriate argument in some calls.

In "SpoolssOpenPrinterEx_q()", put in some #if 0'ed out code to note
what should be done with the printer name when we can get it.

svn path=/trunk/; revision=6670
2002-11-23 08:57:15 +00:00
Guy Harris 4b41d87d39 Clean up the comments a bit, to match the way I read the protocol
information at

	http://www.freetds.org/tds.html

and the way the packets seem to work (the description of TDS "PDUs"
actually appears to be a description of items in a TDS server reply PDU,
and I rather strongly suspect that you do *not* have multiple TDS PDUs
in a NETLIB packet), as well as to note that Microsoft Network Monitor
2.x appears to dissect some additional stuff.

Note that if I'm correct we can do desegmentation of NETLIB packets and
reassembly of TDS PDUs rather than the current somewhat clumsy handling
of packets split across segment boundaries.

Put the hf_netlib_xxx variables in the order in which they appear in the
NETLIB header, give hf_netlib_type the "packet_type_names" value_string
table as its value_string table, and actually use it when putting the
NETLIB type field into the protocol tree.

Clear out "nl_data" at the beginning of "dissect_netlib()", as there are
code paths where it does not get set.  (That's a bit of a hack to try to
clean up a crashing bug - but I can't reproduce the crash on my home
FreeBSD PC, so I don't know whether it fixed the problem or not.  If I'm
correct about the way the packets seem to work, the problem can probably
be fixed quite cleanly by tossing out the current split-packet handling
in favor of the reassembly described above.)

svn path=/trunk/; revision=6669
2002-11-23 07:29:10 +00:00
Guy Harris 86fab5b855 Note that the verifiers are GSS_Wrap tokens (apparently).
svn path=/trunk/; revision=6668
2002-11-23 06:02:42 +00:00
Guy Harris 46255d29ea From Mike Frisch: fix the display of the nickname in an ONC RPC AUTH_DH
header.

svn path=/trunk/; revision=6667
2002-11-23 03:38:00 +00:00
Guy Harris 93dcf69ba5 Update Mike Hall's e-mail address.
svn path=/trunk/; revision=6666
2002-11-23 03:25:06 +00:00
Guy Harris 96ba49f6ce From Tomas Kukosa: adjust the pointer into the line buffer if the line
buffer gets reallocated.

svn path=/trunk/; revision=6665
2002-11-23 03:19:39 +00:00
Tim Potter 394560ab9b Patch from Jim McDonough to fix lsa-ds DSROLE_BASIC_INFO dissection.
svn path=/trunk/; revision=6664
2002-11-21 03:45:23 +00:00
Jörg Mayer 2eac764526 Created with revised make-manuf
svn path=/trunk/; revision=6663
2002-11-19 09:55:08 +00:00
Jörg Mayer 8465963df9 Reduce label length to 10
svn path=/trunk/; revision=6662
2002-11-19 09:47:37 +00:00
Ronnie Sahlberg 8eb275cdb3 put nice io-stat title on the io-stat window
svn path=/trunk/; revision=6661
2002-11-19 08:10:13 +00:00
Tim Potter 73b034105b Fixed typo in dsrole basic domain info tree.
svn path=/trunk/; revision=6660
2002-11-19 05:28:16 +00:00
Tim Potter 2ca021395a Some more spoolss ndr conversions. OpenPrinterEx now decodes it's
arguments correctly.  There's a string datatype, a devicemode
container with a possibly null devicemode, and a "user level"
structure, whatever that is.

svn path=/trunk/; revision=6659
2002-11-19 05:25:04 +00:00
Tim Potter bf87f85692 Fix dissection of printer info levels 0-3 which has been broken for a
while.  Also convert to dissect_ndr_* functions instead of old-style
prs_* functions.

Converted devicemode dissection to ndr functions as well.  There are
still a bunch of value_strings that can be written to decode some of
the constants here.

svn path=/trunk/; revision=6658
2002-11-19 03:01:18 +00:00
Uwe Girlich 7ce73d7ca8 add Martin Regner as author
svn path=/trunk/; revision=6657
2002-11-18 15:49:07 +00:00
Uwe Girlich b0aa273e17 Martin Regner added
svn path=/trunk/; revision=6656
2002-11-18 15:42:47 +00:00
Uwe Girlich c84b7e9620 Since packet-rpc.c 1.56 (ethereal 0.8.18), we store in
dissect_rpc_opaque_data() the actual bytes into the dissector data tree
(improves searching). But if we only give the string "<DATA>" to the
proto_tree_add_* functions and tell it at the same time, that we have indeed
string_length_copy bytes, this leads to problems.

Correction: give the pointer into the real data and not the pointer to the
print string to the proto_tree_add_string_format() and
proto_tree_add_bytes_format() functions.

The correction was found by Martin Regner.

svn path=/trunk/; revision=6655
2002-11-18 09:35:29 +00:00
Jörg Mayer 4bd37c8dde Do some pretty-printing on the manufacturer names returned by the IEEE
and CaveBear OUI lists:
- Remove punctuation
- Remove fill words (including the, inc, plc, ...)
- Capitalize each word at the beginning (and only there)
- Replace SPACE by _
- Restrict length to 20 characters

svn path=/trunk/; revision=6654
2002-11-18 02:49:36 +00:00
Gerald Combs b823ff306a Clean up the TDS dissector a bit. Change a lot of signed ints to
unsigned, and set their size to match the protocol data assigned to
them.  Make sure the number of columns read doesn't exceed MAX_COLUMNS.
Explicitly check for integer values > 0.  Switch from using memcpy with
tvb_get_ptr to tvb_memcpy.  Make indentation consistent.

Add TDS support to randpkt.  Most of the generated packets won't pass
the heuristic checks, but enough should make it through to adequately
test the dissector.

svn path=/trunk/; revision=6653
2002-11-17 21:47:41 +00:00