aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-stun.c
AgeCommit message (Collapse)AuthorFilesLines
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann1-13/+8
"new" style dissectors. Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that? Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one. svn path=/trunk/; revision=53198
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53189
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-1/+1
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+2
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-10-15Try to optimize heuristics slightly.Anders Broman1-478/+483
svn path=/trunk/; revision=52624
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-22emem -> wmem conversion:Pascal Quantin1-8/+8
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-15Convert proto_tree_add_uint_format to proto_tree_add_uint_format_value if ↵Michael Mann1-4/+4
hf_ field name is the first part of the formatted string. This was done with a perl script on the dissectors directory (packet-*.c), followed by manual inspection of the output. The manual inspection yielded a few cases that really should have been proto_tree_add_uint or proto_tree_add_item, so I updated them accordingly. The script didn't catch as many as I would have liked, but it's a start. The most common (ab)use of proto_tree_add_uint_format was for appending strings to CRC/checksum values to note good or bad CRC/checksum. svn path=/trunk/; revision=52045
2013-09-12mark unused parametersMartin Kaiser1-1/+1
svn path=/trunk/; revision=51986
2013-09-12Try to make the STUN heuristic sligtly more efficient.Anders Broman1-18/+17
svn path=/trunk/; revision=51985
2013-09-01More dissectors to wmem. There are no more dissectors using se_tree now, just aEvan Huus1-9/+10
few other places. svn path=/trunk/; revision=51622
2013-04-10Add "Modern" STUN to the preference.Anders Broman1-0/+3
svn path=/trunk/; revision=48806
2013-03-19From beroset:Anders Broman1-6/+6
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48430
2013-03-17Remove some whitespacesAlexis La Goutte1-2/+2
svn path=/trunk/; revision=48364
2013-01-20Replace tvb_get_ipv4 / ip_to_str ... by tvb_ip_to_strAlexis La Goutte1-9/+4
svn path=/trunk/; revision=47181
2013-01-20Fix indent (Replace tabs by space) and add Modelines infoAlexis La Goutte1-1119/+1131
svn path=/trunk/; revision=47180
2013-01-20Use proto_tree_add_item for stun_att_reserved and use FT_BYTES type.Alexis La Goutte1-10/+10
svn path=/trunk/; revision=47179
2013-01-18Replace tvb_get_ipv4 / ip_to_str ... by tvb_ip_to_strAlexis La Goutte1-14/+8
svn path=/trunk/; revision=47150
2013-01-17Register in the UDP heuristic table rather than the internal one.Anders Broman1-1/+1
svn path=/trunk/; revision=47133
2013-01-09From David Bergeron:Added unknown attributes for STUN from RFC3489 that are ↵Anders Broman1-1/+64
now deprecated but does'nt appear with classicstun. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8179 svn path=/trunk/; revision=47002
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-11Add data parameter to call_dissector_only.Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=44872
2012-09-11Add data parameter to dissector_try_heuristicJakub Zawadzki1-2/+2
svn path=/trunk/; revision=44871
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-2/+2
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-5/+5
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-08-09se_tree_lookup32_array() can destroy its key. Make sure we refresh itGerald Combs1-0/+6
before passing it to se_tree_insert32_array(). Fixes bug 7569 reported by Laurent Butti. svn path=/trunk/; revision=44366
2012-07-27Address bug 4097 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4097) ↵Michael Mann1-6/+19
by improving heuristics by limiting when the heuristics can be evaluated. TURN and STUN channel data is negotiated by STUN, so its heuristics should only be based on a STUN negotiation, not raw UDP/TCP packets. "Decode As" is still available for TURN and STUN channel data if the STUN negotiation isn't captured. svn path=/trunk/; revision=44068
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-01-12Don't do fcn calls in arg of g_?to??(); Macro may very well eval args ↵Bill Meier1-7/+7
multiple times. svn path=/trunk/; revision=40444
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-2/+2
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-15Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, ↵Bill Meier1-5/+5
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-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-1/+1
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-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-11/+11
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-09-26Get rid of check_col() and use ENC.Anders Broman1-127/+104
svn path=/trunk/; revision=39153
2011-09-09Cleanup & simplify some code;Bill Meier1-158/+117
Rework code so it should work better with captured_length < reported_length; Remove unused #defines. svn path=/trunk/; revision=38952
2011-09-09From Ken Cox:Anders Broman1-11/+13
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-05-17Use val_to_str() instead of blindly passing the return value from match_strval()Jeff Morriss1-7/+4
into a format routine (to ensure a non-NULL string pointer). svn path=/trunk/; revision=37203
2011-05-13Eliminate deadcode. Fixes Coverity CID 415.Chris Maynard1-2/+0
svn path=/trunk/; revision=37127
2011-01-15Don't (blindly) pass the result of match_strval() into proto_tree_add_*():Jeff Morriss1-6/+2
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
2010-12-29Update list of relevant protocol specs. Some drafts are now RFC's.Chris Maynard1-5/+5
svn path=/trunk/; revision=35301
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
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-05-13As suggested in ↵Jeff Morriss1-55/+44
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
2009-10-09From Didier Gautheron:Anders Broman1-3/+0
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-09-25Upon 2nd thought: revert changes I made to remove 'if(checkcol(...)' around ↵Bill Meier1-61/+85
col_add_fstr(...) svn path=/trunk/; revision=30134
2009-09-22Use col_set_str instead of col_add_fstr when adding constant strings to COL_INFOKovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=30082
2009-09-14Remove unneeded #includes (stdio.h & etc);Bill Meier1-432/+411
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-13From Stephane Bryant via ↵Jeff Morriss1-439/+1062
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-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-08-02packet-stun2 registers for TCP & UDP port 3478 so packet-stun need not ↵Bill Meier1-1/+2
register for same. svn path=/trunk/; revision=29267
2009-07-07From Kovarththanan Rajaratnam:Stig Bjørlykke1-2/+2
More FT_XXX cleanup. svn path=/trunk/; revision=28971