Commit Graph

90 Commits

Author SHA1 Message Date
Guy Harris 49af7e1586 From Olivier Biot:
correct (and document) the offset computation in the parameter()
	and parameter_value_q() functions.

From Lo�c Minier:

	- a copy-paste with a missing replacement;
	- content-disposition uses parameters not q-values;
	- missing "+" for the calculation of parameter-offsets;
	- white-space cleanup;
	- comment fixes.

svn path=/trunk/; revision=9038
2003-11-19 21:24:19 +00:00
Guy Harris 3fe5ef9396 From Olivier Biot: get rid of no-longer-used routines.
svn path=/trunk/; revision=9035
2003-11-19 09:43:29 +00:00
Guy Harris de402f57a6 From Olivier Biot:
Implement quoted-string parsing by appending the closing quote
	to the string value.  If the quoted-string value does not start
	with a quote, dissection resumes but a warning is displayed.
	Textual headers are assumed to be 0x00 terminated (otherwise we
	have a malformed packet or a short frame).

	The Trailer header is also dissected now, and the charset
	parameter dissection has been rewritten.

	The Content-ID header dissector was registered at the place of
	the Trailer dissector; this has also been fixed.

svn path=/trunk/; revision=9024
2003-11-19 01:45:26 +00:00
Guy Harris 5c33ae3c36 From Olivier Biot: fix the offset for the Encoding-Version header in the
general form.

svn path=/trunk/; revision=8976
2003-11-15 23:58:53 +00:00
Guy Harris a6d31930ab From Olivier Biot: use "g_strdup_printf()" to generate
dynamically-allocated sprintf output.

svn path=/trunk/; revision=8960
2003-11-13 23:44:05 +00:00
Gerald Combs 87332bc8fe We can't pass NULLs to proto_tree_add_text(). Replace a bunch of occurrences
of match_strval() with val_to_str() so that we don't throw an assertion.

These changes fix a problem with a file from Martin Dubovsky; otherwise
they haven't been heavily tested.

svn path=/trunk/; revision=8954
2003-11-13 05:08:58 +00:00
Guy Harris a5a8bba3dd From Olivier Biot:
implement the TE header decoding;

	fix the exported add_content_type function;

	reimplement the header parameter dissection so the parameters
	also show up in the related header.

svn path=/trunk/; revision=8952
2003-11-12 22:44:16 +00:00
Guy Harris a3793b2ade From Olivier Biot: implement the Range, Content-Range and
Content-Disposition headers.

svn path=/trunk/; revision=8909
2003-11-07 20:23:55 +00:00
Guy Harris 67569e5a76 From Olivier Biot: add dissection for the Content-Base headeer.
svn path=/trunk/; revision=8908
2003-11-07 20:07:01 +00:00
Guy Harris 8df7feb67d From Olivier Biot:
* Extra headers: Encoding-Version, WWW-Authenticate,
	  Proxy-Authenticate

	* Fix memory allocate/free in header parsing functions & macros

	* Add missing "ok = TRUE" for some header parsing functions

	* Header subfields all share the same subtree identifier (more
	  intuitive)

	* Get rid of unused header fields and subtrees

	* Some whitespace changes

svn path=/trunk/; revision=8879
2003-11-04 19:47:29 +00:00
Guy Harris 12e8688326 From Olivier Biot:
* Use function reference arrays for header parse function lookup
	  (avoids switch())

	* Use macros for the common parts of the header parse functions

	* Use macros for identical header dissection functions

	* Implement many missing header parse functions

	* Automatic header parse error notification

	* Some minor edits

	* Add HTTP equivalents to WSP status codes

svn path=/trunk/; revision=8865
2003-11-03 10:16:00 +00:00
Guy Harris 836f12e207 From Lo�c Minier: get rid of the second of a pair of identical checks.
As per a note by Olivier Biot, make the "multipart/XXX" items all lower
case.

svn path=/trunk/; revision=8802
2003-10-28 17:59:29 +00:00
Guy Harris dbd286ef2e "add_content_type()" returns either a numerical content type and a null
content type pointer or a 0 numerical content type and a non-null
content type pointer; if the content type is numerical, we cannot match
on the string content type (as we'd dereference a null pointer) and, if
the content type is a string, we should not match on the numerical
content type (as the value is bogus).

We also have to call "add_content_type()" to get the content type
regardless of whether we're building a protocol tree, as we need to call
subdissectors regardless of whether we're building a protocol tree.

We also need to set the columns regardless of whether we're building a
protocol tree.

svn path=/trunk/; revision=8675
2003-10-11 00:10:58 +00:00
Guy Harris 98b0611239 From Biot Olivier:
Rename WSP defines to avoid collisions with Windows defines.

	Rename WSP dissector table for integer-value content types.

	Add WSP dissector table for literal content types.

	Add WSP dissection registration for literal content types.

	Register literal and extra WBXML content types to WSP dissector.

	Register textual MMS content type to WSP dissector.

svn path=/trunk/; revision=8648
2003-10-09 18:54:06 +00:00
Guy Harris 7826e4db4a From Olivier Biot: decode the Push-Flag WSP header.
svn path=/trunk/; revision=8376
2003-09-04 19:12:38 +00:00
Guy Harris 75ae0e30c7 From Jean-Michel Fayard: BOOTP/DHCP, HTTP, and WSP statistics taps.
svn path=/trunk/; revision=8345
2003-09-02 22:47:59 +00:00
Guy Harris f9ded39a63 From Lo�c Minier: if the field name for "x-wap.tod" is shown as a text
string, decode the value as a text string, as per 1.0, section 8.4.1.2
("Field Values"):

	If the field name is encoded in text format, textual values MUST
	be used.

svn path=/trunk/; revision=8130
2003-08-04 23:36:13 +00:00
Guy Harris cf51d8d4c6 As suggested by Georg von Zezschwitz, check whether all the bytes of the
URI are present before processing it, to catch bogus length values.

svn path=/trunk/; revision=8099
2003-07-29 21:30:32 +00:00
Gilbert Ramirez c91b8e713f Fix signed/unsigned comparison warnings.
svn path=/trunk/; revision=8084
2003-07-25 04:11:51 +00:00
Guy Harris 259609e677 Don't define "vals_wsp_reason_codes[]" in "packet-wsp.h", define it in
"packet-wsp.c", and just *declare* it in "packet-wsp.h" - no need to
have everybody who includes "packet-wsp.h" get their own copy
(especially as they might not use it).

svn path=/trunk/; revision=7993
2003-07-08 18:10:39 +00:00
Guy Harris 299f79c4f7 From Olivier Biot:
UDH dissection in SMPP message
	WTP and WSP dissection over SMPP (no reassembly)
	WSP status code rendering in Info column

svn path=/trunk/; revision=7954
2003-06-30 23:24:39 +00:00
Guy Harris 181be03665 The last byte of "foo[N]" is "foo[N-1]", not "foo[N]".
svn path=/trunk/; revision=7740
2003-05-25 19:37: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 580e0f8e7b From Olivier Biot:
* Add decoding of Basic authentication scheme for the Authorization
  and Proxy-Authorization headers, and create a summary line
  with proto_item_append_text().
* Update Warning header decoding: warn code mapping to warn text,
  and create a summary line with proto_item_append_text().

svn path=/trunk/; revision=7651
2003-05-08 08:36:25 +00:00
Guy Harris b9ed0197a5 From Olivier Biot:
* Fix the Extended Method PDU mapping (move code some lines down)
* Decode more WSP Parameter entries (now WAP Provisioning Push OK)
* First check whether the PDU content for Post, Reply and Push PDUs
  can be dissected (dissector_try_X function calls), if not then
  display the PDU data as "Data" in the WSP protocol tree.
* Replaced "Unsupported header" by "Undecoded header" for clarity

svn path=/trunk/; revision=7376
2003-03-27 19:15:28 +00:00
Guy Harris 7a5e0860a2 From Olivier Biot: add WSP protocol dissection for extended method PDUs,
and let the Protocol Options header code page and extended methods calls
refer to hexadecimal representation as used everywhere else in the WSP
dissection code.

svn path=/trunk/; revision=7372
2003-03-26 19:45:21 +00:00
Guy Harris d48ec06a6a From Olivier Biot: WBXML/WMLC support.
svn path=/trunk/; revision=7084
2003-02-06 01:23:32 +00:00
Jörg Mayer 4de3370e14 Replace Transmission ID by Transaction ID (spotted by Olivier Biot)
svn path=/trunk/; revision=6330
2002-09-25 00:01:18 +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
Guy Harris 48dbb301c8 From Tom Uijldert: modify MMSE dissector to also accept content that is
not multipart.

Replace my fix to create subtrees for POST data with Tom's.

svn path=/trunk/; revision=5968
2002-08-07 08:34:55 +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 9c900f33ea Call "proto_item_add_subtree()" to create a subtree for POST data, don't
just use the return value of a "proto_tree_add" routine as if it could
be used as a protocol tree.

svn path=/trunk/; revision=5915
2002-07-30 07:36:22 +00:00
Guy Harris 77fa06b899 From Joerg Mayer:
dftest.c:
	     Remove #if-0-ed includes

	packet-ieee80211.c, packet-wtls.c, packet-afp.c, packet-wsp.c,
        packet-wtp.c, ethereal_gen.py:
	     Remove redundant include varargs (already in snprintf.h,
	     and required only for snprintf.h)

	Remove unused include of snprintf.h from files not using
	"snprintf()".

svn path=/trunk/; revision=5889
2002-07-17 00:43:03 +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
Guy Harris 32567ff10f Use "proto_tree_add_item()" to add the URI string to the protocol tree,
rather than extracting a string and adding that explicitly (which runs
the risk of leaking memory if the "tvb_get_ptr()" throws an exception).

Use "tvb_format_text()" when adding the string to the Info column, so
that non-printable characters are displayed as escapes.

svn path=/trunk/; revision=5283
2002-04-29 00:33:30 +00:00
Guy Harris 9971cb529e From Tom Uijldert: comment out an unused function.
svn path=/trunk/; revision=5088
2002-04-02 20:16:19 +00:00
Guy Harris cbda24e612 From Dermot Bradley:
support for Openwave-specific WSP headers;

	support for Openwave-specific field names;

	support for additional content types from Openwave;

	support for additional language values.

svn path=/trunk/; revision=4775
2002-02-22 07:23:25 +00:00
Guy Harris 645170a701 Use -1 rather than "tvb_length_remaining(tvb, offset)" in some items for
the remaining data in a packet (and rather than "tvb_reported_length()",
which is wrong as it doesn't take the starting offset into account).

svn path=/trunk/; revision=4661
2002-02-01 07:12:09 +00:00
Guy Harris eb2d6593dc Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls in
arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls
that add FT_NONE or FT_PROTO items to the protocol tree, with -1.

Replace some calls to "tvb_length()" or "tvb_length_remaining()" with
calls to "tvb_reported_length()" and "tvb_reported_length_remaining()",
as those give the actual length of the data in the packet, not just the
data that happened to be captured.

svn path=/trunk/; revision=4605
2002-01-24 09:20:54 +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 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 75cc056222 Attach a descriptive name field type and base to dissector tables; that
specifies how the selector values used as keys in those tables are to be
displayed, and the title to use when displaying the table.

Use that information in the code to display the initial and current
entries of various dissector tables.

Have the dissector for BACnet APDUs register itself by name, and have
the BACnet NPDU dissector call it iff the BAC_CONTROL_NET bit isn't set,
rather than doing it with a dissector table.

svn path=/trunk/; revision=4358
2001-12-08 06:41:48 +00:00
Guy Harris 6bb3e341d1 From Tom Uijldert: WSP/MMSE changes to handle multipart-content:
packet-wsp.[ch]:
	- Proper parameter-dissection
	- Now handles multipart content
	- Exports content-type & multipart-dissection
	- Attach a sub-dissector based on content-type

	packet-mmse.c:
	- Dissecting message-content added
	- Registers with WSP based on content-type.

svn path=/trunk/; revision=4353
2001-12-07 11:10:53 +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 852e3fffe5 As you set a conversation dissector by supplying a dissector handle
rather than a function pointer, "dissect_wtp_fromudp()" no longer needs
to be global; make it static, register it by name, and have the WSP
dissector get the handle by calling "find_dissector()" rather than by
constructing its own handle for it.

Fix up some attributions.

svn path=/trunk/; revision=4306
2001-12-03 02:10:31 +00:00
Guy Harris 07b2709f8a Change "conversation_set_dissector()" to take a dissector handle, rather
than a pointer to a dissector function, as an argument.

This means that the conversation dissector is called through
"call_dissector()", so the dissector itself doesn't have to worry about
checking whether the protocol is enabled or setting
"pinfo->current_proto", so get rid of the code that does that in
conversation dissectors.  Also, make the conversation dissectors static.

Get rid of some direct calls to dissectors; replace them with calls
through handles, and, again, get rid of code to check whether a protocol
is enabled and set "pinfo->current_proto" where that code isn't needed.
Make those dissectors static if they aren't already static.

Add a routine "create_dissector_handle()" to create a dissector handle
without registering it by name, if the dissector isn't used outside the
module in which it's defined.

svn path=/trunk/; revision=4281
2001-11-27 07:13:32 +00:00
Guy Harris 10da28737f Get rid of some unused variables.
svn path=/trunk/; revision=4240
2001-11-21 01:21:08 +00:00
Guy Harris e4a7740da3 Handle the 1.3 and 1.4 Content-Type values in WSP, from Tom Uijldert.
svn path=/trunk/; revision=4089
2001-10-26 19:14:51 +00:00
Guy Harris 3a97414ba5 From Georg von Zezschwitz: fix an uninitialized variable, dissect the
S-max-age value in Cache-Control headers, and handle the 1.1, 1.3, and
1.4 encoding of Cache-Control headers.

svn path=/trunk/; revision=4058
2001-10-22 20:37:51 +00:00
Guy Harris b1559953ca From Georg von Zezschwitz:
Fix a bug with WSP Connect requests with headers > 256 bytes
	Implement attributes of WSP Suspend/Resume

svn path=/trunk/; revision=4037
2001-10-18 08:23:24 +00:00