Commit Graph

12 Commits

Author SHA1 Message Date
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
Anders Broman ca4bb77022 From Patrik Lundquist:
Improvements to BitTorrent DHT dissector

Fixed filtering on protocol "bt-dht".

Improved heuristics. Can probably be enabled by default now (but I'll let someone else make that decision).

Unexpected IP address (first packet in capture file) and binary "tokens" (packet 17) were incorrectly printed as UTF-8 strings.

Moved duplicate code into bencoded_string_length().

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

svn path=/trunk/; revision=46396
2012-12-05 09:27:58 +00:00
Jeff Morriss 49466f95bc Introduce, and start using, TVB_SET_ADDRESS() and TVB_SET_ADDRESS_HF(). They
are like the non-TVB versions except that they take a TVB and an offset
instead of (frequently) a pointer into the TVB.

Calling tvb_get_ptr() before modifying the rest of the fields should help fix
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7960 (though I can't
reproduce that problem).


Replace a bunch of calls like:

SET_ADDRESS(..., AT_XXX, length, tvb_get_ptr(tvb, offset, length));

with:

TVB_SET_ADDRESS(..., AT_XXX, tvb, offset, length);

svn path=/trunk/; revision=46324
2012-12-02 04:49:13 +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
Bill Meier 638d74d43f Use val_to_str_const() where appropriate;
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-10 22:55:02 +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 2a30b1eff9 Get rid of a couple of warnings.
svn path=/trunk/; revision=43065
2012-06-04 13:21:44 +00:00
Bill Meier 1311f29800 Fix Fix "bt-dht [..] NOT registered properly" as reported in Bug #6571.
"bt-dht [...] should also be common dissectors while not only heuristic
ones. So we can use them with 'Decode As...' command."

Essentially:
 -Register dissector handle so the dissector can be accessed via "decode-as".

From me:
   1. Given that the current heuristic is much too weak and
      causes 'false positives':
        Add a preference to allow enabling/disabling of heuristic dissection.

      The default is 'disabled' since the current heuristic is quite weak.
      (For example: The heuristic incorrectly dissects about 40
       files in menagerie/public as being the BT-DHT protocol).
      Note: only heuristic dissection is disabled; 'decode-as' remains
            enabled.

Also:

1. Fix some bugs wherein bytes in the hex pane were not highlighted
   when a field was selected in the details pane.
2. Do some minor re-formatting of the source code.


svn path=/trunk/; revision=40603
2012-01-20 03:24:05 +00:00
Chris Maynard 5debb5c5e3 Fix memory leaks involving tvb_get_string[z]().
svn path=/trunk/; revision=40312
2011-12-28 16:36:57 +00:00
Bill Meier 36be9da221 Remove unneeded #includes;
Move proto_reg_handoff...() to the end of the file as per convention.

svn path=/trunk/; revision=39860
2011-11-15 19:00:08 +00:00
Alexis La Goutte 2fb7b4fc4c From Xiao Xiangquan via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5767
BitTorrent DHT dissector for wireshark

From me :
* Fix encoding attribut for proto_tree_add_item (with fix-encodings-args script)

svn path=/trunk/; revision=39653
2011-10-28 14:50:13 +00:00