Commit Graph

38 Commits

Author SHA1 Message Date
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Pascal Quantin 765c81a932 Revert r44441: pinfo may be NULL only when pi is not NULL
svn path=/trunk/; revision=44445
2012-08-11 17:57:18 +00:00
Jörg Mayer f0486d582a After commit r44435: pinfo -> NULL
svn path=/trunk/; revision=44441
2012-08-11 07:10:40 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Chris Maynard 0a9fb81be6 Tighten up conversation port matching once the 2nd port is known. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5727
svn path=/trunk/; revision=40245
2011-12-19 17:59:34 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 4c46725c2c Fix vi "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39074
2011-09-21 16:28:53 +00:00
Jörg Mayer 18735eaba5 Replace TRUE/FALSE with the new ENCAP stuff where appropriate
svn path=/trunk/; revision=38746
2011-08-26 17:02:33 +00:00
Chris Maynard e59bb0ad72 Fix Coverity CID 1062: Pointer "ti" returned by proto_tree_add_item() is never used.
svn path=/trunk/; revision=38416
2011-08-08 19:27:14 +00:00
Stephen Fisher 250aa8810f Fix Coverity 1062: UNUSED_VALUE
svn path=/trunk/; revision=36486
2011-04-06 00:07:52 +00:00
Jaap Keuter 60ca36fea7 Clean up dissector code. Pass data block to data dissector.
svn path=/trunk/; revision=35733
2011-01-31 21:23:49 +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
Stephen Fisher dc27b7da2d Don't show \000 at the end of null terminated strings in the info column of the tftp dissector:
tvb_format_text() -> tvb_format_stringzpad()

svn path=/trunk/; revision=34756
2010-11-02 20:36:36 +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
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Jeff Morriss 1daf990897 From Stephane Bryant via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2815
but (since the patch no longer applied cleanly) essentially manually
re-implemented by me:

Rename "stun" to "classic stun" and "stun2" to "stun", to follow the usage
defined in draft-ietf-behave-rfc3489bis-18 section 2.

svn path=/trunk/; revision=29884
2009-09-13 23:03:38 +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
Kovarththanan Rajaratnam e971354a54 Don't guard col_set_str (COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29340
2009-08-09 06:26:46 +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
Stig Bjørlykke 5fc6f20298 Added a preference to define more udp ports to use for TFTP.
svn path=/trunk/; revision=28619
2009-06-03 09:57:22 +00:00
Stephen Fisher 956c2e2dc6 Add request/response like tracking to the TFTP dissector. In this case, it
is used to show the source or destination filename being trasnferred on
every packet of that transfer as a generated item.


svn path=/trunk/; revision=27870
2009-03-27 19:45:46 +00:00
Anders Broman 47aca4c30f From stéphane bryant:
STUN, STUN2 and TURN dissection enhancements.

svn path=/trunk/; revision=25895
2008-08-01 15:11:06 +00:00
Jeff Morriss 1944665283 tvb_format_text() returns a pointer chars, not guint8s
svn path=/trunk/; revision=25714
2008-07-11 20:15:52 +00:00
Sake Blok 058c5d0401 From David Moreau (bug 2621):
add support for MSDP protocol based on TFTP



svn path=/trunk/; revision=25500
2008-06-21 10:04:27 +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
Gerald Combs ba7aec84a8 Format our text before displaying it. This keeps Wireshark from crashing on
Ubuntu 7.10 and possibly other platforms.

svn path=/trunk/; revision=24341
2008-02-16 01:33:48 +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
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00
Jörg Mayer 7280702537 If there is just a tftp response without a prior request,
dissection would fail with dissector assert.

svn path=/trunk/; revision=20562
2007-01-26 08:09:20 +00:00
Jörg Mayer 370a162e87 - Make options filterable
- Display options in info column
- Only remember blksize from OACK packets
- Add some rfc numbers
- Move tftp_dissect_options in front of dissect_tftp
  (I forgot to fix the forward decl once too often ;)
- Warning fixes
- Add expert error in case of tftp-error pdu


svn path=/trunk/; revision=19162
2006-09-06 08:24:36 +00:00
Jörg Mayer adc56b8e95 option name "blksize" is case in-sensitive
svn path=/trunk/; revision=19158
2006-09-05 16:09:49 +00:00
Jörg Mayer 56e1dd7780 Fix for http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1092
Actually, this was a feature request:

Store the value of the blksize option in the conversation data
and use that information to compare whether we have reached the
last packet.

Includes the cleanup ideas from Ronnie.

svn path=/trunk/; revision=19155
2006-09-05 15:58:11 +00:00
Ronnie Sahlberg feab79e328 change a whole bunch of ethereal into wireshark
svn path=/trunk/; revision=18196
2006-05-21 04:49:01 +00:00
Ronnie Sahlberg fcab322ada Some applications do very naughty things like reusing a port for a different protocol during different stages of an application cycle.
This is very naughty and will cause problems when we have assigned a dissector to a dynamic port using conversation_set_dissector().


To make ethereal handle this case I have changed the try_conversation_dissector() to allow it to fail and return 0,   meaning   yes there is indeed a protocol registered for this conversation but that protocol rejected this packet.
(which only happens for "new" style dissectors, "old" style dissectors will never reject a packet that way)

When this happens  the decode_udp_port() helper will still allow other dissectors to be tried, in the hope that the conversation is now used for some other protocol and thus someone else might be able to decode the packet.


Update SNMP and TFTP dissectors to  check that even if there already is a conversation but that conversation does NOT have snmp/tftp registered as the dissector for it, then create a new conversation anyway and attach the proper dissector.

Since ethereal keeps track of which frame number a conversation started in, this actually works really well.



svn path=/trunk/; revision=14345
2005-05-11 10:40:53 +00:00
Tomas Kukosa 3bb0b3a56b TFTP dissector registering
svn path=/trunk/; revision=14198
2005-04-27 06:50:04 +00:00
Anders Broman 851ecd2ac4 From Jon Ringle:
1) Added a setup_frame parameter to conversation_t
2) Used the conversation_t next to maintain a list of conversations with the 
same src/dest tuple but different setup_frame number.
3) Changed the signature of find_conversation() and conversation_new() to pass 
in the frame number.
4) Adjusted packet-sdp to select RTP conversation if both m=audio and m=image 
are present, and T.38 conversation if only m=image is present. I expect that 
RTP/T.38 dissecting to be better, but I don't have a way to generate T.38 
packets.

svn path=/trunk/; revision=13243
2005-02-02 20:07:03 +00:00
Gilbert Ramirez 669db206cb Move dissectors to epan/dissectors directory.
Also move ncp222.py, x11-fields, process-x11-fields.pl,
make-reg-dotc, and make-reg-dotc.py.

Adjust #include lines in files that include packet-*.h
files.

svn path=/trunk/; revision=11410
2004-07-18 18:06:47 +00:00