Commit Graph

40 Commits

Author SHA1 Message Date
Alexis La Goutte 84e31e29b7 Replace proto_tree_add_text/uint/boolean by proto_tree_add_item Use bitmask (remove tvb_get_bits(..))
svn path=/trunk/; revision=47798
2013-02-21 15:32:07 +00:00
Alexis La Goutte 964d9adf42 Fix indent (Tab => 4 Spaces) and Add Modelines
svn path=/trunk/; revision=47797
2013-02-21 15:31:58 +00:00
Alexis La Goutte fbbe22d170 Fix CheckAPI about trailing space
svn path=/trunk/; revision=47794
2013-02-21 12:31:16 +00:00
Alexis La Goutte d2b0c28f71 From Paul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8319 CAPWAP Header dissector returns invalid length
The problem is when Wireshark dissect CAPWAP packets from Cisco without preference "Cisco Wireless Controller Support"

In this case the whole packet decoded wrong, not only Wireless Specific Information field in CAPWAP header

I suggest following patch to dissect_capwap_header function to always return correct length of CAPWAP header based on HLEN header field

From me:
Add expert info to display a warning about Calculate length and Header length are different (and suggest to activate Cisco Wireless Controller Support Preference)

svn path=/trunk/; revision=47793
2013-02-21 10:50:28 +00:00
Anders Broman 57d3c5e260 Higlight the Header bytes.
svn path=/trunk/; revision=46037
2012-11-16 09:42:18 +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
Jeff Morriss aa5d9d78dd From Robert Bullen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 :
The reassembled fragments tree in the Packet Details view is awesome, but it
lacks one thing: a field that exposes the reassembled data.

tcp.data already exists for exposing a single TCP segment's payload as a byte
array. It would be handy to have something similar for a single application
layer PDU when TCP segment reassembly is involved. I propose
tcp.reassembled.data, named and placed after the already existing field
tcp.reassembled.length.

My primary use case for this feature is outputting tcp.reassembled.data with
tshark for further processing with a script.

The attached patch implements this very feature. Because the reassembled
fragment tree code is general purpose, i.e. not specific to just TCP, any
dissector that relies upon it can add a similar field very cheaply. In that
vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which
expose reassembled fragment data as a single byte stream for IPv4 and IPv6,
respectively. All other protocols that use the reassembly code have been left
alone, other than inserting NULL into their initializer lists for the newly
introduced struct field reassemble.h:fragment_items.hf_reassembled_data.

svn path=/trunk/; revision=44802
2012-09-07 02:09:59 +00:00
Guy Harris 682d1f34b6 Fix non-proto_tree_add_item() calls passing an ENC_ value as the last
argument.

svn path=/trunk/; revision=43802
2012-07-18 23:18:01 +00:00
Chris Maynard 1ff8c1fcba Don't pass the return value of tvb_length_remaining() to fragment_add_check(), as it might have been -1.
Fixes Coverity CID 280510: Improper use of negative value.

svn path=/trunk/; revision=43716
2012-07-14 19:52:18 +00:00
Bill Meier d53320919a Remove unneeded #includes (stdlib, stdio, ctypes, time);
In a few cases: do some whitespace, indentation cleanup & reformatting.

svn path=/trunk/; revision=42632
2012-05-15 19:23:35 +00:00
Anders Broman 4c379bc979 From Dirk:
CAPWAP dissector tries to allocate -1 bytes of memory during reassembly.
- changed to return offset.

svn path=/trunk/; revision=39779
2011-11-10 06:07:16 +00:00
Alexis La Goutte 654f213aae Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=39654
2011-10-28 17:39:31 +00:00
Bill Meier 54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +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 d65261d344 Use ENC_NA as proto_tree_add_item() encoding arg for FT_ETHER hf[] field type.
(Some minor whitespace cleanup).

svn path=/trunk/; revision=39488
2011-10-20 14:07:54 +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
Bill Meier ffde0a10bb Restore saved 'pinfo->fragmented' as appropriate;
Fixes gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.

svn path=/trunk/; revision=38297
2011-07-31 23:41:20 +00:00
Anders Broman c5fab10bf1 From qgj:
when dissect the capwap control header,the sequence's value is decoded
improperly,it tooks the wrong offset value,so the control messages' sequence is
showed improperly.
Changed to uset proto_add_item and encoding type changed from FALSE to ENC_BIG_ENDIAN.

svn path=/trunk/; revision=37962
2011-07-11 13:43:12 +00:00
Alexis La Goutte 7d317e553b Add FT_EUI64 Field Type
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector 
* Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name
* Update Documentation (README.dev)
* Add new function in libwireshark.def
* Support of encoding for tvb_eui64_to_str
* Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector

svn path=/trunk/; revision=37015
2011-05-08 10:23:53 +00:00
Stig Bjørlykke 84bc28bd6a Introduce "Fragment count" filter element for all protocols doing reassembly.
svn path=/trunk/; revision=35705
2011-01-30 21:01:07 +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 381664535b As suggested by Kovarththanan Rajaratnam in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3548 :
Clean up hf fields some more: mostly removing leading and trailing spaces from names and blurbs.

svn path=/trunk/; revision=34165
2010-09-21 03:14:49 +00:00
Bill Meier 7219ee2a49 Use val_to_str_ext() & friends to access sminmpec_values[];
Also: packet-nhrp.c: #include sminmpec.h not req'd;

svn path=/trunk/; revision=34143
2010-09-17 04:51:21 +00:00
Bill Meier 055dd62063 #include <string.h> not needed.
svn path=/trunk/; revision=32410
2010-04-06 21:14:01 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Stig Bjørlykke 539b558f8c Renamed some reassembled data texts.
Removed some check_col().

svn path=/trunk/; revision=31809
2010-02-06 18:20:21 +00:00
Stig Bjørlykke 88b72356ad Introduce "Reassembled length" filter element for all protocols doing
reassembly.

svn path=/trunk/; revision=31767
2010-02-02 16:01:52 +00:00
Stig Bjørlykke 1d845b1d80 Small fix for "Flag C" filter.
svn path=/trunk/; revision=31121
2009-11-29 19:55:02 +00:00
Jaap Keuter cf9260ec0d From Alexis La Goutte:
Based from a Cisco Sample (Thanks Tanmay)
Changelog :
* Fix a error about value of wbid 
* Support of CAPWAP fragmentation
* Add proper handling of the alignment stuff from the RFC for Radio MAC and Wireless specific information
* Add more support of Messages Element Type
* Add a option to dissector Cisco Sample (Cisco Controler use a old draft)

svn path=/trunk/; revision=31114
2009-11-29 13:33:05 +00:00
Stig Bjørlykke a9e644f382 Changed type for "Wireless data" to FT_BYTES.
svn path=/trunk/; revision=29725
2009-09-05 22:12:51 +00:00
Jörg Mayer 283dbb4414 As pointed out by Alexis La Goutte via PM, r29474 didn't
support the different MAC formats (eui48 and eui64) properly.
Now, eui48 is printed as mac, the rest is still handled as
blob.

svn path=/trunk/; revision=29476
2009-08-19 15:42:24 +00:00
Jörg Mayer 69069395df Add support for Radio Mac/Wireless Specific Information optional
header fields. This patch lacks handling of padding since a) I don't
have a trace containing padding and b) I don't understand the
wording in the rfc (it's to ambigous for my liking).

svn path=/trunk/; revision=29474
2009-08-19 12:25:40 +00:00
Kovarththanan Rajaratnam 8b515e9340 Switch a bunch of dissectors over to using tvb_new_subset_remaining()
svn path=/trunk/; revision=29446
2009-08-16 12:36:22 +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
Jaap Keuter a27093be2e Remove the module globals.
Clean up the source code.

svn path=/trunk/; revision=28615
2009-06-02 21:44:00 +00:00
Bill Meier 0a6a096b34 Do find_dissector_handles once-only in proto_reg_handoff...
lenght ==> length in a few places;

svn path=/trunk/; revision=28610
2009-06-02 19:41:35 +00:00
Stig Bjørlykke ab319c586e From Alexis La Goutte via bug 3488:
Add support for decoding CAPWAP Control Packet (RFC5415)

From me:
Adjusted some names.
Some space cleanup.

svn path=/trunk/; revision=28603
2009-06-02 18:39:38 +00:00