Commit Graph

118 Commits

Author SHA1 Message Date
Gerald Combs 1b4d847a90 Add 2869 to the list of HTTP ports: http://support.microsoft.com/kb/886257
svn path=/trunk/; revision=35461
2011-01-10 20:23:21 +00:00
Jaap Keuter 302d4c14df From Julien Kerihuel:
I've just finished to write a ncacn_http dissector for Wireshark which
provides the ability to dissect Outlook anywhere packets properly (as
specified by [MS-RPCH].pdf documentation.

svn path=/trunk/; revision=35259
2010-12-23 23:50:14 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00
Anders Broman 738813862b From Robert Bullen:
Improve the HTTP dissection of the Response Status Line.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5338

svn path=/trunk/; revision=34712
2010-10-30 14:29:20 +00:00
Guy Harris 17d4d51b7d Make the third argument to a UAT copy callback a size_t (not that any of
the callbacks we have use that argument - is it really needed?).

svn path=/trunk/; revision=34694
2010-10-29 21:11:33 +00:00
Jaap Keuter 3db66ff53e Try to decode the unknown multipart subtype anyway.
svn path=/trunk/; revision=34658
2010-10-27 06:49:18 +00:00
Jeff Morriss 36390c306f From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5336 :
Attached patch:
1. Adds port 5985 as a HTTP traffic port (used by MS Powershell remoting over
HTTP)
2. Adds dissection of Kerberos authentication to HTTP.


svn path=/trunk/; revision=34641
2010-10-25 02:17:41 +00:00
Jeff Morriss 46ef82837f Add a cast
svn path=/trunk/; revision=34164
2010-09-21 03:06:54 +00:00
Jeff Morriss 79e39c7ecb Use size_t to keep the Windows compiler happy
svn path=/trunk/; revision=34163
2010-09-21 02:41:29 +00:00
Jeff Morriss f2d070f19e From Jakub Zawadzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3336 :
We parse host & request page from headers, so we easily can construct full http
uri.

I was thinking about making it as field, so we could filter, print in column
info, or do other fancy stuff, but for now this is imho enough.


From me: add it as a (filterable) item.  Clean up spacing and indentation in a
few places.

svn path=/trunk/; revision=34162
2010-09-21 02:12:21 +00:00
Stig Bjørlykke 42d0e5b2a8 Request-Line can contain an empty Request-URI.
I don't want to change get_token_len() to not skip multiple spaces,
because I don't know if other protocols depends on this behaviour.
We should maybe check this...

This fixes bug 5181.

svn path=/trunk/; revision=34063
2010-09-05 12:16:14 +00:00
Jeff Morriss 729de1a635 As suggested in http://www.wireshark.org/lists/wireshark-dev/200809/msg00075.html
(as referenced in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2907 ) and
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3411 :

Write a new convenience routine for finding a conversation and, if it is not
found, create it.  The frame number and addresses are taken from pinfo (as is
the common case).

Use this function in a bunch of dissectors.

svn path=/trunk/; revision=32790
2010-05-13 18:28:34 +00:00
Jeff Morriss c8cecb9133 From Dirk via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4758 :
The HTTP dissector uses strtoll() to convert the Content-Length string into a
64bit variable. But that string can contain a number larger (or less) than
64bit, which lets the strtoll() return INT_MAX (or INT_MIN). strtoll() then
indicates this with errno==ERANGE.

The attachted patch checks if errno is set this way and then treats that HTTP
Content-Length as unspecified, since we don't know the real size.

I haven't checked other occurences of strtoll() in the HTTP dissector if they
could benefit from the errno check, or if other dissectors could use it.

svn path=/trunk/; revision=32772
2010-05-12 13:24:42 +00:00
Guy Harris 17865148a1 Squelch compiler warnings. (We know that header.content_length is less
than a value that fits into an int, so we know its value will fit into
an int.)

svn path=/trunk/; revision=32434
2010-04-09 02:00:07 +00:00
Jeff Morriss 873a93c7b1 Use a 64-bit number to store the content length. This fixes:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1958

Of course this doesn't mean we can reassemble that much data.

svn path=/trunk/; revision=32433
2010-04-09 01:42:12 +00:00
Stig Bjørlykke 2f8830b4d0 From LEGO via bug 3459:
Add a callback to UAT to be called after the table has being updated,
use it to renew the snmp_ue_cache.

svn path=/trunk/; revision=32112
2010-03-04 12:50:18 +00:00
Stig Bjørlykke c198fc6546 From Didier Gautheron via bug 4419:
se_alloc and ep_alloc never return NULL and se_alloc0 already initialized
data with 0.

svn path=/trunk/; revision=31654
2010-01-25 11:47:39 +00:00
Kovarththanan Rajaratnam 00810ff199 * Prefer col_append_str instead of col_append_fstr for constant strings
* Remove check_col guards

svn path=/trunk/; revision=30127
2009-09-24 20:21:23 +00:00
Jeff Morriss 5acb182178 Revert 29889 to stop the fuzz failures.
svn path=/trunk/; revision=29902
2009-09-14 17:36:15 +00:00
Anders Broman 120b410ac4 From Didier Gautheron:
optimizations patch http://wiki.wireshark.org/Development/Optimization
'patch.29854.diff.gz"

Use "g_realloc".

svn path=/trunk/; revision=29889
2009-09-14 06:00:53 +00:00
Kovarththanan Rajaratnam 8c48c6835f Rename address_to_str() to ep_address_to_str() because:
1) This indicates that the string has ephemeral lifetime
2) More consistent with its existing seasonal counterpart, se_address_to_str().

svn path=/trunk/; revision=29747
2009-09-06 14:25:47 +00:00
Bill Meier 94f28dd8f9 (FWIW) One step towards including stdio.h & stdlib.h only when req'd.
svn path=/trunk/; revision=29568
2009-08-26 19:27:49 +00:00
Bill Meier 1ab1e3889c Don't do dissector_add twice on TCP port 3689;
packet-daap requests registration on that port via http_dissector_add
 and thus packet-http does not need to do a default registration on that port.
Also: fix a typo in a comment.

svn path=/trunk/; revision=29265
2009-08-02 19:09:36 +00:00
Stig Bjørlykke b228488bc0 From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
    for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
    FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero

svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
Jörg Mayer c321f29518 Trivial warning fixes:
- Might be used uninitialized
- not a prototype
- comma at end of enum


svn path=/trunk/; revision=28730
2009-06-15 02:34:53 +00:00
Guy Harris cf91fdf16b Have tap listeners specify whether the "packet" routine requires
a protocol tree;

	the column values.

This includes stats-tree listeners.

Have the routines to build the packet list, and to retap packets, honor
those requirements.  This means that cf_retap_packets() no longer needs
an argument to specify whether to construct the column values or not, so
get rid of that argument.

This also means that there's no need for a tap to have a fake filter
to ensure that the protocol tree will be built, so don't set up a fake
"frame" filter.

While we're at it, clean up some cases where "no filter" was represented
as a null string rather than a null pointer.

Have a routine to return an indication of the number of tap listeners
with filters; use that rather than the global num_tap_filters.

Clean up some indentation and some gboolean vs. gint items.

svn path=/trunk/; revision=28645
2009-06-05 22:42:47 +00:00
Stig Bjørlykke fc3f1b5283 From Artem Tamazov (bug 3472):
Save/Restore pinfo->private_data when used.

svn path=/trunk/; revision=28412
2009-05-19 17:16:14 +00:00
Gerald Combs d797045341 From Abhik Sarkar via bug 3242:
Add a UAT for custom HTTP header fields.
  
From me:

  Use se_alloc0 to initialize a struct. Use g_strdup(...) instead of
  g_strdup_printf("%s"...). Add a missing UAT_END_FIELDS.

svn path=/trunk/; revision=28406
2009-05-19 00:17:23 +00:00
Anders Broman c91a384702 Apply some of the patches from:
http://wiki.wireshark.org/Development/Optimization

svn path=/trunk/; revision=28356
2009-05-13 19:46:11 +00:00
Gerald Combs ef0e74e533 More size_t casts.
svn path=/trunk/; revision=27897
2009-03-30 18:40:33 +00:00
Bill Meier c0e92cbc04 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27065
2008-12-20 00:09:02 +00:00
Gerald Combs 4948a597c4 Partial support for RFC 2324.
svn path=/trunk/; revision=26931
2008-12-08 18:01:13 +00:00
Jaap Keuter d6556ed5a2 Add the Content-Length header as a header string, while maintaining the content-length filter option.
svn path=/trunk/; revision=26522
2008-10-23 06:57:31 +00:00
Bill Meier ffa7320de2 Minor cleanup related to proto_register & proto_reg_handoff
svn path=/trunk/; revision=26280
2008-09-26 20:06:40 +00:00
Anders Broman 2b9d63a4b5 Move common code to base64.c
svn path=/trunk/; revision=25908
2008-08-03 14:27:22 +00:00
Jeff Morriss c50b4aec09 More (mostly stats tree) unsigned->signed char cleanup
svn path=/trunk/; revision=25717
2008-07-12 01:48:24 +00:00
Jeff Morriss 71c1e4faf0 Change the stats tree API to use signed chars instead of guint8s for all its
strings; this should fix a number of signed/unsigned char warnings.
Reindent a bunch, too.

svn path=/trunk/; revision=25716
2008-07-11 21:13:39 +00:00
Bill Meier 65bcd0d67f Display "Decompression failed" when appropriate (& Fix some src spacing)
svn path=/trunk/; revision=25681
2008-07-08 22:36:35 +00:00
Guy Harris d1275537c0 Get rid of #defines that are no longer being used (we now have a port
range list preference for HTTP, which we initialize to the default list).

svn path=/trunk/; revision=25667
2008-07-03 19:50:15 +00:00
Bill Meier 33af75a599 Fix some warnings reported by gcc -Wshadow ...
svn path=/trunk/; revision=25628
2008-06-28 21:09:57 +00:00
Bill Meier 9ca142b160 Fix some of the Errors/warnings detected by checkapi.
svn path=/trunk/; revision=25282
2008-05-13 01:23:37 +00:00
Anders Broman 63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
  g_strsplit code for the no longer supported GLIB1 builds


svn path=/trunk/; revision=24829
2008-04-07 05:22:54 +00:00
Jeff Morriss 0bb7de356a Fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=383 : show multiple (pipelined) HTTP packets in the Info column.
svn path=/trunk/; revision=24586
2008-03-08 21:17:43 +00:00
Jeff Morriss bb323055b2 match_strval() may return NULL so don't blindly pass its return value into col_add_*() or proto_add_*(); use val_to_str() (returning "Unknown (%d)" if no match is found) instead.
svn path=/trunk/; revision=24557
2008-03-04 21:05:21 +00:00
Sake Blok 9ad27ce239 Fix for bug 1586: When proxying a tcp connection (mostly used with ssl over an
http proxy), let the proxied protocol take care of reassembly itself.


svn path=/trunk/; revision=23949
2007-12-26 18:28:31 +00:00
Anders Broman 95d8c7e2da Apply yet another of the optimization patches:
- Only call functions if they are needed or once.

svn path=/trunk/; revision=23628
2007-11-27 21:24:39 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Gerald Combs 8e45bbf506 Don't call tvb_set_child_real_data_tvbuff() + add_new_data_source() twice
for the same tvb.  This keeps us from freeing the same memory twice and
crashing on some systems.

This might be the same bug Brian Vandenberg was looking for in
http://www.wireshark.org/lists/wireshark-dev/200705/msg00406.html .

svn path=/trunk/; revision=23415
2007-11-09 20:04:40 +00:00
Jeff Morriss 3dec62b85c - s/ntohs/g_ntohs
- s/ntohl/g_ntohl
- s/free/g_free
- Change some tvb_get_string()+g_free()'s into tvb_get_ephemeral_string()
- Change some tvb_fake_unicode()+g_free()'s into tvb_get_ephemeral_faked_unicode()
- Change some tvb_get_string() calls that were clearly memory leaks (like
  atoi(tvb_get_string(...))) into tvb_get_ephemeral_string()

svn path=/trunk/; revision=22515
2007-08-15 22:27:52 +00:00