Commit Graph

51 Commits

Author SHA1 Message Date
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Michael Mann b40cb1adea Apply found fix-encoding-args.pl errors in the dissector directory.
I coincidentally found a few files with errors, so I thought it might be time to run it on the whole directory again.

Change-Id: Ia32e54b3b1b94e5a418ed758ea79807c8bc7e798
Reviewed-on: https://code.wireshark.org/review/978
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-06 15:11:36 +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
Anders Broman 440a1809cc - Forward declaration of register functions.
svn path=/trunk/; revision=53918
2013-12-10 21:30:13 +00:00
Michael Mann 9b7fb8a811 Create the ability to have packet scoped "proto" data. Bug 9470 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470)
I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future.  And search/replace of a function name is easy enough to do.

The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As.

All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope().  All other dissectors were converted to using file_scope() which was the original scope for "proto" data.

svn path=/trunk/; revision=53520
2013-11-23 02:20:13 +00:00
Bill Meier 9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Michael Mann 2dafe09f0b Update spice protocol dissector. Bug 9143 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9143)
From Jonathon Jongsma

Note that the new packet-spice.h is auto-generated outside of Wireshark.

svn path=/trunk/; revision=52737
2013-10-21 16:48:07 +00:00
Pascal Quantin 102c452bcb More emem -> wmem conversion:
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz()
- tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc()
- tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz()
- tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str()
- update docs accordingly

svn path=/trunk/; revision=52180
2013-09-22 20:04:35 +00:00
Evan Huus 58a9f5cb1e More wmem.
svn path=/trunk/; revision=51968
2013-09-12 12:37:27 +00:00
Michael Mann b0090fd046 Batch of filterable expert infos
svn path=/trunk/; revision=49600
2013-05-27 23:21:11 +00:00
Anders Broman 85a8e304dd Add the posibillity to use a key for per-packet-data.
svn path=/trunk/; revision=49259
2013-05-12 18:11:02 +00:00
Michael Mann eba34e00e7 Convert a few proto_tree_add_text to proto_tree_add_items. The dissector was originally under the 50% mark that checkAPIs.pl like, but subsequent patches pushed it over the limit, so I thought I'd knock it back down.
svn path=/trunk/; revision=49023
2013-04-24 23:20:24 +00:00
Martin Kaiser d7bb57a5ef remove unused structs and defines
(the unnamed union caused a compiler warning on fedora 14)

svn path=/trunk/; revision=48886
2013-04-16 20:53:24 +00:00
Anders Broman ae747e4c4b From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48430
2013-03-19 22:03:00 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Bill Meier be2e4d238f Minor changes:
- Init COL_PROTOCOL before fetching from tvb;
- Remove some unneeded variable initializers;
- Localize some variables;
- Misc including whitespace revisions.


svn path=/trunk/; revision=45537
2012-10-14 16:18:05 +00:00
Bill Meier 301b185cf4 remove unused variable; fixes compile error.
svn path=/trunk/; revision=45536
2012-10-14 15:31:44 +00:00
Bill Meier 6cf76e38bf From Yaniv Kaul: Spice protocol fixes and enhancements
- Dissection of monitors config message (SPICE_DISPLAY_MONITORS_CONFIG message)
- Better dissection of capabilities (added several more capabilities for main
  and display channels)

From me:
- Remove (now) unused variables.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7859

svn path=/trunk/; revision=45534
2012-10-14 15:12:03 +00:00
Bill Meier ad0219d033 Change 'for (i=1; i<=n;...' to 'for (i=0; i<n; ...)
The changes fix definite problems or
are done "just in case" for cases not esily determined
to be a problem by quick inspection.

Note: in some cases for loop index variables have been renamed
      to ensure  all required codes changes detected.

##backport

svn path=/trunk/; revision=45477
2012-10-11 19:20:21 +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
Michael Mann 1741731384 remove unnecessary underscores from display filters
svn path=/trunk/; revision=44181
2012-08-01 02:59:17 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
pascal b607964f1f Fix spice.common_cap_byte1 filter I changed by mistake in r42664
svn path=/trunk/; revision=42675
2012-05-17 08:22:34 +00:00
Gerald Combs 9e3487a953 Use BASE_DEC for spice.common_cap_byte1. (Hopefully that's correct.)
svn path=/trunk/; revision=42668
2012-05-16 22:05:47 +00:00
pascal 4a1de290f8 From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7264 :
Enhance the Spice dissector to deal with sized data streams and playback data
From me: fix a few hf entries

svn path=/trunk/; revision=42664
2012-05-16 21:20:16 +00:00
Jakub Zawadzki e2c680b245 Fix some "conflicting" value_string warnings.
copy & paste errors, not 0-terminated value_string arrays, etc.

svn path=/trunk/; revision=42260
2012-04-26 14:41:37 +00:00
Anders Broman 658fc3cb04 From Yaniv Kaul:
Enhance the Spice dissector to dissect KEY_DOWN, KEY_UP, {RECORD|PLAYBACK}_{VOLUME|MUTE}

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7133

svn path=/trunk/; revision=42130
2012-04-18 11:29:37 +00:00
Anders Broman fc41d4ad51 From Evan Huus:
Duplicate and misplaced 'break' statements.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7106

svn path=/trunk/; revision=42091
2012-04-16 08:39:34 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Bill Meier ca3e8b5d8b 'tab-width/tabstop/tabSize' in editor modelines should really always be 8;
Also: In some cases do some whitespace cleanup and some minor reformatting.

svn path=/trunk/; revision=41724
2012-03-21 18:20:44 +00:00
Anders Broman dc9a5254f4 From Yaniv Kaul:
Enhance the Spice dissector to deal with VM name and UUID messages.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6971

svn path=/trunk/; revision=41686
2012-03-20 16:03:30 +00:00
Anders Broman f77e059a2e From Yaniv Kaul:
Enhance the Spice dissector - small additional dissections.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6857

svn path=/trunk/; revision=41150
2012-02-23 09:06:33 +00:00
Michael Tüxen 1f2cb55d2c Use a bitwise & when checking with a mask.
svn path=/trunk/; revision=40720
2012-01-25 16:45:22 +00:00
Jeff Morriss cea1ad9500 From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6743 :
The dissection [added with the previous patch on this bug] was not complete.
Attaching a diff on top of the existing SVN to properly dissect small
packets with mini header.

svn path=/trunk/; revision=40666
2012-01-23 19:41:35 +00:00
Alexis La Goutte aa5439a783 From Yaniv Kaul via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6743
[PATCH] Enhance the Spice dissector to deal with mini headers

Spice recently gained the ability to use smaller packet headers.
This patch adds support to it, along with small other fixes/enhancements - none of which really interesting.

From me :
Fix a Clang Warning :
packet-spice.c:1303:5: warning: Value stored to 'offset' is never read

svn path=/trunk/; revision=40573
2012-01-18 21:44:21 +00:00
Bill Meier 199da73e21 Prevent memory leakage of uncompress tvb and associated data buffer (step 1).
(tvb memory leak will actually remain until a bug in tvbuff.c is also fixed).

svn path=/trunk/; revision=40171
2011-12-13 02:56:44 +00:00
Alexis La Goutte 65bfa0ed9a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40041
2011-11-29 19:53:02 +00:00
Bill Meier c4ace59928 Various Minor cleanup:
- Remove unneeded #includes;
- Use val_to_str_const() in several places;
- Reformat long lines;
- Fix whitepace and indentation.

svn path=/trunk/; revision=40016
2011-11-27 15:34:07 +00:00
Bill Meier 81a16331f8 'dissect_ImageLZ_JPEG()' is apparently not used; #if 0 the code for now.
svn path=/trunk/; revision=39973
2011-11-21 17:05:17 +00:00
Bill Meier 34c16b8c17 From Yaniv Kaul: Some enhancements, some fixes, to the Spice dissector:
- SASL authentication support - improved (and correct) state machine.
- indention, tab fixes
- macro to fetch PDU, simplifying the code (and improving its readability)
- properly show the length of agent messages and align them under the right tree.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6589

From me: Fix some indentation & remove some trailing whitespace.

svn path=/trunk/; revision=39972
2011-11-21 16:43:01 +00:00
Chris Maynard e550884d5e distribute -> redistribute.
svn path=/trunk/; revision=39903
2011-11-17 16:10:02 +00:00
Chris Maynard 8a630d8e37 Avoid using "POINT" as it causes compiler errors on some systems. Add modelines that match the current file's format. This dissector is now ready to be spiceistributed.
svn path=/trunk/; revision=39890
2011-11-16 21:27:30 +00:00
Anders Broman e1bdf00529 From Yaniv Kaul:
Many enhancements, and some fixes, to the Spice dissector:
- SASL authentication support
- indention, tab fixes
- LZ image dissection (fixing at least one TODO item)
- dissect Spice client agent data
- fix some proto_tree_add_item() offsets
- probably some more that I forgot.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6535#attach_7355

svn path=/trunk/; revision=39710
2011-11-02 06:30:25 +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 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
Guy Harris dcd97bd0c1 Clean up white space.
The appropriate encoding for a string is ENC_BIG_ENDIAN or
ENC_LITTLE_ENDIAN, combined with a character encoding value; it is not
ENC_NA, as the character encoding is definitely applicable, and the byte
order is also applicable if it's a counted string or a UTF-16 or UCS-2
string.  Assume ASCII for now.

svn path=/trunk/; revision=39187
2011-09-29 20:03:51 +00:00
Bill Meier b805c27a40 When building w/o LIBZ: (Somewhat clunky) attempt to fix "unused variable" and "unused parameter" compile errors.
svn path=/trunk/; revision=39186
2011-09-29 19:57:52 +00:00
Bill Meier c7d76f767b Comment out two cases of code which caused GCC 4.6 "unused-but-set-variable" warning.
svn path=/trunk/; revision=39185
2011-09-29 18:26:57 +00:00