Commit Graph

114 Commits

Author SHA1 Message Date
Guy Harris 32b0480d71 For unknown key IDs, show the algorithm symbolically if possible.
svn path=/trunk/; revision=9317
2003-12-17 08:59:15 +00:00
Guy Harris 1ec0e734c0 Update a comment.
svn path=/trunk/; revision=9316
2003-12-17 08:51:36 +00:00
Guy Harris 6b42b76140 Give the key and other lengths and data names that match the names in
RFC 2930.

svn path=/trunk/; revision=9315
2003-12-17 08:40:56 +00:00
Guy Harris 7e7d9b51fa Put the key and other lengths into the protocol tree for TKEY RRs.
svn path=/trunk/; revision=9314
2003-12-17 08:34:07 +00:00
Guy Harris c91bf1cb22 Add some checks to make sure we're not running past the end of the RR
we're dissecting.  (Some RR's still don't do that check, as they don't
maintain an "rr_len" variable, and as "get_dns_name()" doesn't do any
length checking.)

That obviates the need for having "compute_key_id()" check the length,
as we won't even get to calling it if the RR is too short.  Have it
still do a check for sanity, but just abort if the check fails, and have
it return -1 if the algorithm is unsupported.

Don't bother processing T_CERT RRs if we're not building a protocol
tree, don't fetch data from a T_CERT RR until we put it into the tree,
and fix the bug that change found, namely that we were using the wrong
variable in the "val_to_str()" call for the certificate type.

svn path=/trunk/; revision=9250
2003-12-12 23:23:57 +00:00
Guy Harris 95ea01a41a Have "compute_key_id()" return different values for different errors,
and have its caller put an entry into the tree for "we don't support the
algorithm" (the "RR too short" error is a "can't happen").

svn path=/trunk/; revision=9243
2003-12-11 18:38:57 +00:00
Ulf Lamping 92943b815c replaced type u_int32_t by glib's guint32 (to satisfy MSVC)
svn path=/trunk/; revision=9241
2003-12-11 08:54:19 +00:00
Guy Harris 33f732b776 From David Fort: compute and display the key ID in a DNS KEY RR, if
possible.

svn path=/trunk/; revision=9232
2003-12-10 19:35:03 +00:00
Guy Harris b2c0b30ff9 From David Fort: fix to previous patch.
svn path=/trunk/; revision=9101
2003-11-27 21:02:34 +00:00
Guy Harris ff5569c895 From David Fort: DNS DSS RR support.
svn path=/trunk/; revision=9096
2003-11-26 23:23:37 +00:00
Jörg Mayer a4e0c4855a Fix warning about strict-aliasing
svn path=/trunk/; revision=8613
2003-10-05 21:57:36 +00:00
Gerald Combs 1a99e50d55 Convert the WKS bitnames variable to a GString, on the (way, way)
off chance that someone has amazingly long service names defined on
their system.  Discovered by Timo Sirainen.

svn path=/trunk/; revision=7734
2003-05-24 21:05:36 +00:00
Gerald Combs 356ddbd284 Fix instances where the return value of snprintf() was being checked for -1,
but not for <buf_size> or greater.  Discovered by Timo Sirainen.

svn path=/trunk/; revision=7731
2003-05-24 17:45:10 +00:00
Guy Harris f4119ebe85 From Yaniv Kaul: show MBZ flags as either OK if 0 or incorrect if not 0.
svn path=/trunk/; revision=7645
2003-05-07 03:00:32 +00:00
Guy Harris b22ecdab25 From Yaniv Kaul: handle DNSSEC DO/OK bit in OPT pseudo-RR.
svn path=/trunk/; revision=7643
2003-05-05 08:14:31 +00:00
Guy Harris 9afa31fea7 Update a comment.
svn path=/trunk/; revision=7065
2003-01-31 08:29:09 +00:00
Guy Harris 73e78bee35 Fix up some field lengths.
Put in a note about one capture I've seen.

svn path=/trunk/; revision=7059
2003-01-31 06:58:31 +00:00
Tim Potter 46ab244cca Call the GSSAPI dissector when disecting GSSAPI transaction keys. The TKEY
request works quite nicely but I'm not sure what to call for the response.
Currently it just displays "Unknown header: (cls=2, cons=1, tag=1) which
looks like it's some more ASN.1 data.

svn path=/trunk/; revision=7002
2003-01-26 01:00:05 +00:00
Guy Harris d0a55f13d9 "ip6_to_str()" takes a const pointer as an argument, so you don't have
to cast away the constness of pointers passed to it.

svn path=/trunk/; revision=6718
2002-12-02 20:03:10 +00:00
Guy Harris 0d103e3852 From Brad Hards:
Support for mDNS/LLMNR "cache flush" bit
	Label mDNS and DNS differently in the Protocol column
	Clean up summary line for PTR records

svn path=/trunk/; revision=6709
2002-12-01 20:50:52 +00:00
Jörg Mayer 47d7946c2e Print RR number as unsigned.
svn path=/trunk/; revision=6145
2002-08-30 15:17:12 +00:00
Richard Sharpe e5a07cde2c More fixes from Albert Chin
svn path=/trunk/; revision=6135
2002-08-30 02:11:16 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jun-ichiro itojun Hagino ae47e6ed2e dissect LLMNR (formerly known as mDNS) on tcp/udp port 5353.
svn path=/trunk/; revision=6022
2002-08-19 16:02:45 +00:00
Jörg Mayer 173fe5aef4 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the toplevel directory. The removal of winsock2.h will
hopefully not cause any problems under MSVC++, as those files using
struct timeval still include wtap.h, which still includes winsock2.h.

svn path=/trunk/; revision=5932
2002-08-02 23:36:07 +00:00
Guy Harris ff49944dcd From Joerg Mayer: add #includes of "snprintf.h" in modules that used
"snprintf()" but weren't including "snprintf.h".

svn path=/trunk/; revision=5887
2002-07-16 22:50:48 +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
Guy Harris fdd2eda238 Use registered fields for the subfields of the Flags field in DNS and
NBNS.

svn path=/trunk/; revision=5475
2002-05-15 07:24:20 +00:00
Guy Harris 60e2475556 From Graeme Hewson: add some sanity checks to DNS dissector to avoid
loops.

svn path=/trunk/; revision=5443
2002-05-11 18:46:38 +00:00
Guy Harris eb70c97a9b Make a "tcp_dissect_pdus()" with the standard loop for a TCP segment,
extracting PDUs from it and possibly doing reassembly.  Make the COPS,
DNS, DSI, Gryphon, and SCCP dissectors use it.

Add "set_actual_length()", "tcp_dissect_pdus()",
"decode_boolean_bitfield()", "decode_numeric_bitfield()", and
"decode_enumerated_bitfield()" to the list of routines available to
dissectors on platforms where routines in the main program aren't
available to dynamically-loaded code.

Declare routines in "to_str.h" as "extern"; as I remember, that's
necessary to allow the "decode_XXX_bitfield()" routines declared therein
to be made available to plugins as per the above.

Note that new exported routines should be added to the end of the table
if that's the only change being made to the table.

Create a new "plugin_api_decls.h" header file, used to declare both the
"p_" variables and the "p_" structure members in the routine-exporting
mechanism; this reduces the number of places you have to change to
change the list of exported routines.

svn path=/trunk/; revision=5394
2002-05-05 00:16:38 +00:00
Guy Harris 43ad415d55 Fix some comments.
svn path=/trunk/; revision=4979
2002-03-19 09:18:42 +00:00
Guy Harris 3eb8f4ecdd Add some necessary "volatile" declarations.
svn path=/trunk/; revision=4788
2002-02-22 21:52:09 +00:00
Guy Harris 06977d189c Catch the ReportedBoundsError exception in the DNS and TPKT dissectors
when dissecting messages over TCP, so that an error in one message
doesn't stop us from dissecting the next message in the segment, if any.

Put an XXX comment before the code that constructs the tvbuff for each
message inside a TCP segment, noting that we really want tvbuffs to have
three lengths and to have a new type of exception thrown if you go past
the second length but not past the reported length.

svn path=/trunk/; revision=4782
2002-02-22 11:28:03 +00:00
Guy Harris 7b176b7096 Redo the DNS-over-TCP code to handle the DNS-over-TCP header being split
across segment boundaries and to, for each DNS-over-TCP PDU, create a
tvbuff containing the header and the body of the PDU, handing that to
the DNS PDU dissector.

svn path=/trunk/; revision=4776
2002-02-22 08:45:02 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00
Guy Harris 92915713d3 Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOL
items to the protocol tree; it's interpreted as "the rest of the data in
the tvbuff".  This can be used if

	1) the item covers the entire packet or the remaining payload in
	   the packet

or

	2) the item's length won't be known until it's dissected, and
	   will be then set with "proto_item_set_len()" - if an
	   exception is thrown in the dissection, it means the item ran
	   *past* the end of the tvbuff, so saying it runs to the end of
	   the tvbuff is reasonable.

Convert a number of "proto_tree_add_XXX()" calls using
"tvb_length_remaining()", values derived from the result of
"tvb_length()", or 0 (in the case of items whose length is unknown) to
use -1 instead (using 0 means that if an exception is thrown, selecting
the item highlights nothing; using -1 means it highlights all the data
for that item that's available).

In some places where "tvb_length()" or "tvb_length_remaining()" was used
to determine how large a packet is, use "tvb_reported_length()" or
"tvb_reported_length_remaining()", instead - the first two calls
indicate how much captured data was in the packet, the latter two calls
indicate how large the packet actually was (and the fact that using the
latter could cause BoundsError exceptions to be thrown is a feature - if
such an exception is thrown, the frame really *was* short, and it should
be tagged as such).

Replace some "proto_tree_add_XXX()" calls with equivalent
"proto_tree_add_item()" calls.

Fix some indentation.

svn path=/trunk/; revision=4578
2002-01-20 22:12:39 +00:00
Guy Harris b6c6ff4106 We no longer do explicit checks in low-level routines for running past
the end of the data in the packet, so we don't need to do those checks
in the callers of those routines - and thus don't need to do those
checks in the callers of *those* routines.

svn path=/trunk/; revision=4574
2002-01-19 23:59:03 +00:00
Guy Harris 23319ff023 Move the pointer to the "column_info" structure in the "frame_data"
structure to the "packet_info" structure; only stuff that's permanently
stored with each frame should be in the "frame_data" structure, and the
"column_info" structure is not guaranteed to hold the column values for
that frame at all times - it was only in the "frame_data" structure so
that it could be passed to dissectors, and, as all dissectors are now
passed a pointer to a "packet_info" structure, it could just as well be
put in the "packet_info" structure.

That saves memory, by shrinking the "frame_data" structure (there's one
of those per frame), and also lets us clean up the code a bit.

svn path=/trunk/; revision=4370
2001-12-10 00:26:21 +00:00
Guy Harris bced8711f6 Make "dissector_add()", "dissector_delete()", and "dissector_change()"
take a dissector handle as an argument, rather than a pointer to a
dissector function and a protocol ID.  Associate dissector handles with
dissector table entries.

svn path=/trunk/; revision=4308
2001-12-03 04:00:26 +00:00
Guy Harris 0e10085580 Add support for desegmentation of DNS messages.
Make the default for NBSS and ONC RPC-over-TCP desegmentation "on",
rather than "off"; the default for desegmentation in general is "off",
so this won't change the default behavior, but it lets you turn
desegmentation on by flipping only one switch (and turn it off for
particular protocols if you desire).

svn path=/trunk/; revision=3943
2001-09-17 02:07:00 +00:00
Guy Harris b55b8ba57b Fix the handling of DNS-over-TCP.
Rename the "cap_len" argument to "dissect_dns_common()" to "msg_len", as
it's just the length of the DNS message being dissected.

svn path=/trunk/; revision=3941
2001-09-17 00:36:04 +00:00
Guy Harris 1d42c94b05 Make the resolution for time values be nanoseconds rather than
microseconds.

Fix some "signed vs. unsigned" comparison warnings.

svn path=/trunk/; revision=3934
2001-09-14 07:10:13 +00:00
Guy Harris fbe8da33f5 Add a "proto_item_append_text()" routine, which is like
"proto_item_set_text()" except that it appends the result of the
formatting to the item's current text, rather than replacing the item's
current text.  Use it in the DNS dissector.

svn path=/trunk/; revision=3880
2001-08-29 00:51:10 +00:00
Guy Harris aa4cd01b9b Get rid of "proto_tree_add_notext()" - if you create a subtree using it,
but, before you set the text, you throw an exception while putting stuff
under the subtree, you end up with an absolutely blank protocol tree
item, which is really gross.  Instead of calling
"proto_tree_add_notext()", call "proto_tree_add_text()" with at least a
minimal label - yes, it does mean you do some work that will probably be
unnecessary, but, absent a scheme to arrange to do that work if it *is*
necessary (e.g., catching exceptions), the alternative is an ugly
protocol tree display.

svn path=/trunk/; revision=3879
2001-08-28 08:28:19 +00:00
Guy Harris 0395944bf6 For DNS-over-TCP, put the length indicator into the tree for the DNS
request/response.

svn path=/trunk/; revision=3633
2001-07-02 07:29:03 +00:00
Guy Harris db5e1b8c85 Tvbuffify the DNS, NBNS, NBDS, and NBSS dissectors.
Add a "tvb_memeql()" routine, for doing "memcmp()"-style equality
comparisons.

svn path=/trunk/; revision=3631
2001-07-02 07:11:40 +00:00
Guy Harris 8412393197 From Joerg Mayer: explicitly fill in all members of a
"header_field_info" structure, including the ones that are later set by
the routines to register fields.

svn path=/trunk/; revision=3561
2001-06-18 02:18:27 +00:00
Guy Harris b9222c0011 Various signed vs. unsigned fixes, from Joerg Mayer.
svn path=/trunk/; revision=3560
2001-06-18 01:49:17 +00:00
Guy Harris 1882baed1c Get rid of unnecessary includes.
Fix up Gerald's e-mail address in some files while we're at it, and fix
up Michael T�xen's name in one file as well.

svn path=/trunk/; revision=3368
2001-04-23 18:05:19 +00:00
Guy Harris c5aaac7823 Move the declaration of "ipprotostr()" out of "epan/packet.h" into a new
"ipproto.h" header file.

svn path=/trunk/; revision=3313
2001-04-17 06:29:14 +00:00