Commit Graph

28 Commits

Author SHA1 Message Date
Guy Harris ce3d2ff3de Rename dissector_add_handle() to dissector_add_for_decode_as().
Hopefully that name makes it clear what the routiner's purpose is, and
will encourage people to use it rather than using dissector_add_uint()
with a bogus integer value.

Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8
Reviewed-on: https://code.wireshark.org/review/2483
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-20 16:43:56 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki 1053e722ed Fix warnings
svn path=/trunk/; revision=54089
2013-12-14 12:45:57 +00:00
Chris Maynard 1455b36647 Fix Coverity CID 751720: Logically dead code.
In fixing this bug, also fix another:  Be sure to use tvb_length() and not tvb_reported_length() in get_utp_version(), since this is essentially where the heuristics are being applied to decide whether to accept the packet or not.

svn path=/trunk/; revision=47761
2013-02-20 02:15:20 +00:00
Chris Maynard 97af002693 Fix Coverity CID 746734: Dead default in switch. (No need to backport)
svn path=/trunk/; revision=47461
2013-02-04 02:44:04 +00:00
Pascal Quantin 2dbf4f6fff Strengthen BT-uTP heuristic dissector and add a preference to enable it (disabled by default)
svn path=/trunk/; revision=46551
2012-12-16 00:28:38 +00:00
Bill Meier fbbe7cb97f Fix [-Wshadow] warning.
svn path=/trunk/; revision=46379
2012-12-04 19:52:01 +00:00
Anders Broman 9ca3f30f75 From Patrik Lundquist Updated V1 header description to reflect corrected specification (BEP 0029). Removed if(tree) in dissect. New style dissector, right? Added heuristics for V0 header. Removed length checking in heuristics since uTP packets can have any lenght, even odd ones, and they do. Fixed Extensions looping over whole packets and added a Data field for the trailing payload. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8048
svn path=/trunk/; revision=46373
2012-12-04 17:47:07 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
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
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
Anders Broman d226f4de96 From Xiao Xiangquan:
bt-dht and bt-utp should also be common dissectors while not only heuristic
ones. So we can use them with "Decode As..." command.

Applying the missing part as this seems to be an owerlapping patch.

svn path=/trunk/; revision=40868
2012-02-05 13:51:50 +00:00
Bill Meier 3b387d1b8e Remove unneeded #include
svn path=/trunk/; revision=39869
2011-11-15 21:07:37 +00:00
Jeff Morriss f5e838b602 Remove comma at the end of several enumerator lists.
svn path=/trunk/; revision=39700
2011-11-01 01:23:10 +00:00
Alexis La Goutte f0f3d8d13c From Xiao Xiangquan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5767
Make bt-utp as heuristic dissectors

svn path=/trunk/; revision=39652
2011-10-28 14:49:31 +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 4e57694d4a 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_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +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
Bill Meier 781129806f Fix ex "modeline" so it works;
See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5748

svn path=/trunk/; revision=39081
2011-09-21 17:49:11 +00:00
Bill Meier 4910bc142f Add to comment about using a heuristic; Fix a typo.
svn path=/trunk/; revision=37330
2011-05-20 15:34:29 +00:00
Alexis La Goutte 2105f81d8a Enhance BT-UTP dissector:
* Add type (syn, data, reset...) in column info
* Split dissect_utp_header(...) function to 
	* dissect_utp_header_v0(...)
	* dissect_utp_header_v1(...)
	* dissect_utp_extensions(...)

svn path=/trunk/; revision=36803
2011-04-22 13:16:45 +00:00
Bill Meier 2eced546c1 Add code to dissect "original uTP header format"
as described in the LibuTP utp.cpp source code;
Add a kludgy heuristic to differentiate between
 original and "V1" header formats.
 TBD: validity of the heuristic; is there a better way ?

svn path=/trunk/; revision=36742
2011-04-20 20:32:26 +00:00
Bill Meier 42538888ea - New-style dissectors need to always return "bytes dissected" (not just when tree != NULL);
- The dissector probably shouldn't return a value for "bytes dissected" which is larger
   than the tvb length (altho there's actually no harm given the current implementation).
- Don't try to do an 'add_item' with an offset past the end of the tvb (altho again there's
   no actual harm in this case).

ToDo: Handle "original format" uTP headers.

svn path=/trunk/; revision=36737
2011-04-20 17:25:07 +00:00
Bill Meier 26a50ccd97 Whitespace cleanup; Remove an uneeded col_clear().
svn path=/trunk/; revision=36720
2011-04-19 16:37:39 +00:00
Stephen Fisher 9dad613f08 This file had an identical copy appended to the end of it. Remove
duplicate.


svn path=/trunk/; revision=36719
2011-04-19 16:24:29 +00:00
Alexis La Goutte 372639e7f8 From Xiao Xiangquan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5846
A new dissector for uTorrent Transport Protocol

From me :
* Add link to spec BEP-0029
* Add note about type/version 
* Rework extensions loop
* Use 2-space indenting


svn path=/trunk/; revision=36716
2011-04-19 15:23:51 +00:00