Commit Graph

38 Commits

Author SHA1 Message Date
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier 34a0aba9d3 Don't do fcn calls in arg of g_?to??(); Macro may very well eval args multiple times.
svn path=/trunk/; revision=40444
2012-01-12 20:40:23 +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 67ee5049d4 Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
  the encoding parameter for proto_tree_add_item() calls which directly reference
  an item in hf[] which has a type of:
     FT_BOOLEAN
     FT_IPv4
     FT_EUI64
     FT_GUID
     FT_UINT_STRING

Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260)

svn path=/trunk/; revision=39328
2011-10-10 00:39:31 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Anders Broman 14fbabcb26 Get rid of check_col() and use ENC.
svn path=/trunk/; revision=39153
2011-09-26 17:50:54 +00:00
Bill Meier 4a91af2383 Cleanup & simplify some code;
Rework code so it should work better with captured_length < reported_length;
Remove unused #defines.

svn path=/trunk/; revision=38952
2011-09-09 20:19:05 +00:00
Anders Broman b37aba3675 From Ken Cox:
The change causes dissect_stun_message() to pass control to subdissectors when 'tree' is NULL.
Part of the patch from
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6322

svn path=/trunk/; revision=38949
2011-09-09 05:16:39 +00:00
Jeff Morriss c204df4719 Use val_to_str() instead of blindly passing the return value from match_strval()
into a format routine (to ensure a non-NULL string pointer).

svn path=/trunk/; revision=37203
2011-05-17 18:53:35 +00:00
Chris Maynard dece07c8f3 Eliminate deadcode. Fixes Coverity CID 415.
svn path=/trunk/; revision=37127
2011-05-13 17:05:05 +00:00
Jeff Morriss c037bba949 Don't (blindly) pass the result of match_strval() into proto_tree_add_*():
some OS (like Solaris) don't like NULL pointers to strings in (s)printf
formats; use val_to_str() instead.

svn path=/trunk/; revision=35542
2011-01-15 18:58:42 +00:00
Chris Maynard bb6a0a0604 Update list of relevant protocol specs. Some drafts are now RFC's.
svn path=/trunk/; revision=35301
2010-12-29 20:58: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
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
Anders Broman 4d2e653901 From Didier Gautheron:
Dissectors using call_dissector() function inside a 'if (tree) {}' block.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4107

svn path=/trunk/; revision=30415
2009-10-09 07:24:33 +00:00
Bill Meier ce75ae1292 Upon 2nd thought: revert changes I made to remove 'if(checkcol(...)' around col_add_fstr(...)
svn path=/trunk/; revision=30134
2009-09-25 01:22:08 +00:00
Kovarththanan Rajaratnam c28bafe341 Use col_set_str instead of col_add_fstr when adding constant strings to COL_INFO
svn path=/trunk/; revision=30082
2009-09-22 21:18:11 +00:00
Bill Meier 121563dc20 Remove unneeded #includes (stdio.h & etc);
Remove a bunch calls to of check_cols();
Use tfs_set_notset from tfs.c instead of a locally defined tfs struct;
Use consistent indentation;
Adjust spacing on some lines and reformat a few long lines.

svn path=/trunk/; revision=29895
2009-09-14 14:03:32 +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
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
Bill Meier 3a61b43a42 packet-stun2 registers for TCP & UDP port 3478 so packet-stun need not register for same.
svn path=/trunk/; revision=29267
2009-08-02 19:20:20 +00:00
Stig Bjørlykke 0437f102c3 From Kovarththanan Rajaratnam:
More FT_XXX cleanup.

svn path=/trunk/; revision=28971
2009-07-07 09:02:59 +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
Bill Meier 5817e6002b dissect_rtp_heur: prevent a 'false positive' when trying stun dissection.
Specifically: when dissect_rtp_heur calls the stun dissector:
- Don't do a 'data' dissection if stun dissection fails;
  (ie: use call_dissector_only instead of call_dissector).
- return the stun dissector success/fail status to the caller of dissect_rtp_heur;
  (Done by registering and calling the heuristic version of the stun dissector).
Also: use call_dissector_only for each of the dissectors called by dissect_rtp_heur
 (altho it really makes no difference at this point except for the call to the
  stun dissector).

svn path=/trunk/; revision=27443
2009-02-12 17:30:15 +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
Anders Broman 6226035893 Apply yet another set of the optimization patches:
When offset parameter is 0 replace tvb_bytes_exist() with the faster tvb_length().

On the other hand 
	if (tvb_bytes_exist(tvb, 0, 20)
is more readable than
	if (tvb_length(tvb) >= 20

so only do it in heuristic function

svn path=/trunk/; revision=23412
2007-11-09 06:01:18 +00:00
Stephen Fisher 8501d62d2b From Zach Chadwick:
TR-111, from the DSL-Forum adds two options to STUN (RFC 3489) to help
with TR-069 enabled devices traverse firewalls. TR-111 can be read here:
http://www.dslforum.org/techwork/tr/*TR-111*.pdf

This patch adds support for decoding the two optional STUN attributes
used by TR-111.  One is simply a zero-length attribute, and the other a
string attribute.

Me: Changed stun.att.connection.request.binding to
stun.att.connection_request_binding


svn path=/trunk/; revision=22019
2007-05-31 23:53:39 +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
Anders Broman 222851585d From Martin Mathiesson:
This patch shows (as extra, generated fields) what the address and port will be after XORing again with the transaction ID. I've done IPv4, but don't have any IPv6 captures to test with...

svn path=/trunk/; revision=17126
2006-01-30 05:45:39 +00:00
Anders Broman be6277f8c8 From Marc Petit-Huguenin:
This patch for the STUN dissector fixes a bug (wrong value for DATA_INDICATION attribute) and adds the decoding of IPv6 address in attributes.


svn path=/trunk/; revision=17078
2006-01-23 06:14:31 +00:00
Anders Broman 61c177ea6d From Marc Petit-Huguenin
This is a patch that add support for the latest drafts[1] in the STUN dissectors. I choose to add TURN directly in the STUN dissector instead of creating a new dissector because of the decision at the latest IETF meeting[2] to redefine TURN as an use case of STUN.


[1] ftp://ftp.rfc-editor.org/in-notes/internet-drafts/draft-ietf-behave-rfc3489bis-02.txt
ftp://ftp.rfc-editor.org/in-notes/internet-drafts/draft-rosenberg-midcom-turn-08.txt
ftp://ftp.rfc-editor.org/in-notes/internet-drafts/draft-camarillo-midcom-turn-ipv6-00.txt
[2] http://www3.ietf.org/proceedings/05nov/minutes/behave.txt

svn path=/trunk/; revision=16797
2005-12-14 20:43:39 +00:00
Anders Broman 25fe588f9f From Martin Mathieson:
stun -  add support for 3 extra Message Attributes as described in draft-ietf-behave-rfc3489bis-00

ymsg 
 - avoid looking beyond the tvb while looking for content item delimiters (causing most frames to be shown as malformed packet)
- makes content items (and their keys and values) filterable  (includes fix to bug 415)


svn path=/trunk/; revision=16005
2005-09-26 05:43:25 +00:00
Ulf Lamping 0dc9fb3d4a various code cleanup:
-use g_snprintf instead of sprintf and snprintf
-use g_strdup_printf where appropriate
-remove #include "snprintf.h" (as only g_snprintf should be used)
-replace some more alloc/realloc/calloc/free with their glib pendants

svn path=/trunk/; revision=15264
2005-08-08 18:50:39 +00:00
Guy Harris ab797734dd Get rid of the private "my_match_strval()" routine in many dissectors;
add a "match_strval_idx()" routine that does the same thing, and have
"match_strval()" call it.

Make those routines, and "val_to_str()", return a "const" pointer. 
Update dissectors as necessary to squelch compiler warnings produced by
that.

Use "val_to_str()" rather than using "match_strval()" and then, if the
result is null, substituting a specific string.  Clean up some other
"match_strval()"/"val_to_str()" usages.

Add a null pointer check in the NDPS dissector's "attribute_value()"
routine, as it's not clear that "global_attribute_name" won't be null at
that point.

Make some global variables in the AFS4INT dissector local.

Make some routines not used outside the module they're in static.

Make some tables "static const".

Clean up white space.

Fix Gerald's address in some files.

svn path=/trunk/; revision=14786
2005-06-26 19:56:52 +00:00
Jörg Mayer 103ced271d Jon Ringle: bug fix to the stun ERROR-CODE dissecting
svn path=/trunk/; revision=13260
2005-02-03 21:11:46 +00:00
Guy Harris d1ae7c688f From Jon Ringle:
don't dissect attributes if there aren't any;

	put each attribute into a subtree;

	register the dissector by name.

Use "match_strval()" to check whether the message type is a known STUN
message type, and to generate the message type for the Info column.

Don't use "tvb_bytes_exist()" to check when we run out of data - use the
length fields from the packet.  Check the sanity of those lengths, too.

svn path=/trunk/; revision=13063
2005-01-16 04:25:27 +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