Commit Graph

56 Commits

Author SHA1 Message Date
Michael Mann e5e4d357e3 Batch of filterable expert infos.
svn path=/trunk/; revision=51518
2013-08-25 21:01:11 +00:00
Pascal Quantin 85667447f1 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9053 :
Update DDS RTPS Vendor and Product Ids based on http://portals.omg.org/dds/content/page/dds-rtps-vendor-and-product-ids

svn path=/trunk/; revision=51428
2013-08-19 16:56:05 +00:00
Evan Huus 2d2271f12b Correctly check bounds on dim_max.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9019

svn path=/trunk/; revision=51213
2013-08-08 10:50:11 +00:00
Michael Mann 93be0fb393 Batch of filterable expert infos with some minor cleanup I noticed while doing the filter conversions.
svn path=/trunk/; revision=49893
2013-06-12 03:33:44 +00:00
Alexis La Goutte 1ad2bb6aa9 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48782
2013-04-07 18:56:23 +00:00
Pascal Quantin 3322a952f6 Try to fix compilation on Linux
svn path=/trunk/; revision=48731
2013-04-04 15:01:56 +00:00
Michael Mann 4e7e06ca3a RTPS Cleanup, Part 3 (final)
Merged packet-rtps.c and packet-rtps2.c into a single dissector.  It appears packet-rtps2.[ch] "API" needs to be externally available, otherwise I would have rolled (the newly merged) packet-rtps.h into packet-rtps.c as well.

Converted many of the remaining proto_tree_add_text to proto_tree_add_item/expert_info and cleaned up the manual string manipulation so checkAPIs.pl is happy.

Added a "cooked" capture file to the SampleCaptures page on the wiki for future fuzztesting/regression.

svn path=/trunk/; revision=48727
2013-04-04 12:22:04 +00:00
Evan Huus 37600a157b Rename value string (and similar) functions to use a consistent pattern. This
was done using textual search+replace, not anything syntax-aware, so presumably
it got most comments as well (except where there were typos).

Use a consistent coding style, and make proper use of the WS_DLL_* defines.

Group the functions appropriately in the header.

I ended up getting rid of most of the explanatory comments since many of them
duplicated what was in the value_string.c file (and were out of sync with the
recent updates I made to those in r48633). Presumably most of the comments
should be in the .h file not the .c file, but there's enough churn ahead that
it's not worth fixing yet.

Part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8467

svn path=/trunk/; revision=48634
2013-03-29 00:26:23 +00:00
Alexis La Goutte 4633fb157a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48506
2013-03-23 13:08:48 +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
Chris Maynard 7be1086254 Fix Coverity CID 990224 and 990225: Unused pointer value.
svn path=/trunk/; revision=48256
2013-03-11 20:43:52 +00:00
Evan Huus e5d5bb67bc Put items in the tree we just created, mark an unused param as _U_.
Fixes GCC build.

svn path=/trunk/; revision=48209
2013-03-09 03:31:27 +00:00
Michael Mann 88205d4b72 RTPS Cleanup, Part 2
1. Convert more proto_tree_add_text to proto_tree_add_<something else>/expert_info.  checkAPIs.pl is happy (for packet-rtps.c), but the raw number is a bit deceiving because of macros and wrappers. 
2. Fixed the offending "uses snprintf + strlen to assemble strings" in packet-rtps.c.  The exact same code is used in packet-rtps2.c, so just proper refactoring will fix it.  There is still too much unnecessary use of g_snprintf/g_strlcpy/strlen, but that's for a later date.
3. Removed most of the "useless" wrapper functions.  Again, the number of proto_tree_add_text is deceiving, so the number of hfs that really need to be created is much larger.  
4. Whitespace cleanup.   Removed a lot of whitespace so I could see more code on the screen, to help determine duplication between packet-rtps.c and packet-rtps2.c  Comments/descriptions of fields remain untouched.

The more I trim, the more I think this should all be in a single dissector file, which will be the goal of the next update.  Trying to patch this in somewhat manageable chunks.

Also need to submit sample traces generated for (fuzz)testing.

svn path=/trunk/; revision=48206
2013-03-09 00:21:56 +00:00
Michael Mann dd8c596851 RTPS Cleanup, Part 1
1. Cleanup COL_INFO processing
2. Add expert_info for "octet_to_next_header" ranges
3. Check "RTPS" all at once
4. Remove some unnecessary function declaration.

Next is probably consolidating packet-rtps.c and packet-rtps2.c as there seems to be a lot of duplicative functionality.

svn path=/trunk/; revision=48082
2013-03-05 05:52:23 +00:00
Michael Mann 19eb91cb27 Fix potential buffer overflow in RTPS and RTPS2 dissectors by allocating enough memory to fit the "indentation space".
Bug 8332 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8332)

svn path=/trunk/; revision=47658
2013-02-14 19:42:58 +00:00
Michael Mann a9fb54c677 bugfix nested loop that wasn't breaking out of the main loop when subloop really wanted it to. Bug 8198 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8198)
svn path=/trunk/; revision=47046
2013-01-13 02:58:42 +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
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 b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier 1fff1e1b09 Fix a proto_tree_add_item() encoding areg;
Use gboolean instead of int in certain cases.

svn path=/trunk/; revision=39617
2011-10-26 20:25:00 +00:00
Bill Meier f7a3494571 Fix proto_tree_add_item() encoding args.
svn path=/trunk/; revision=39615
2011-10-26 19:24:58 +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 3f7e7672c9 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.
svn path=/trunk/; revision=38095
2011-07-18 19:11:32 +00:00
Gerald Combs ed25109219 Fix the warnings in Coverity CIDs 606-608.
svn path=/trunk/; revision=36671
2011-04-16 21:38:21 +00:00
Bill Meier ae465d5d39 Fix bugs: 'if ((flags & 0x2) == 1)' ==> 'if ((flags & 0x2) != 0)'
Coverity 346 & 347

svn path=/trunk/; revision=36292
2011-03-23 15:15:02 +00:00
Bill Meier 121c65c613 Remove unneeded #includes (stdio.h,stdlib.h);
Whitespace cleanup: trailing, indentation, "4-space tabs"

svn path=/trunk/; revision=35850
2011-02-07 18:49:29 +00:00
Bill Meier 09764dd969 Remove unneeded #include <stdio.h>
svn path=/trunk/; revision=32367
2010-04-03 21:55:23 +00:00
Bill Meier 0d372283b3 (Trivial): indentation & whitespace cleanup.
svn path=/trunk/; revision=32366
2010-04-03 19:20:07 +00:00
Bill Meier 1a4283ccf8 Fixes for gcc -Wshadow warnings; Fix indentation and do other minor cleanup in a few cases.
svn path=/trunk/; revision=31617
2010-01-22 13:56:19 +00:00
Jaap Keuter 6602c02f68 From Fabrizio Bertocci:
I'm submitting an updated version of the RTPS & RTPS2 packet dissector.
While the RTPS packet dissector doesn't have too many changes (except for few
comments perhaps), the RTPS 2 packet dissector includes now dissecting of the
latest addition to the RTPS protocol (batched data, sessions, sparse data types).

svn path=/trunk/; revision=31026
2009-11-19 21:30:25 +00:00
Kovarththanan Rajaratnam a569e8d5b8 Use tvb_get_ephemeral_string() to avoid memleak (should have been part of r29994.
svn path=/trunk/; revision=30003
2009-09-20 08:42:51 +00:00
Kovarththanan Rajaratnam 47db27fcc1 Use ep_alloc() instead of g_malloc() for packet scoped allocations
svn path=/trunk/; revision=29995
2009-09-20 08:09:40 +00:00
Kovarththanan Rajaratnam 09c02f7118 Use tvb_get_ephemeral_string() to avoid memleak.
svn path=/trunk/; revision=29994
2009-09-20 08:06:20 +00:00
Kovarththanan Rajaratnam ac463d2697 Don't guard col_clear with col_check
svn path=/trunk/; revision=29346
2009-08-09 08:14:59 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +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
Michael Tüxen a9de6414e0 Fix from yamisoe@gmail.com for Bug 3533.
svn path=/trunk/; revision=28721
2009-06-14 10:24:52 +00:00
Bill Meier 871c9c7152 ep_strbuf usage: ep_strbuf_new_label("") --> ep_strbuf_new_label(NULL);
ep_strbuf_append() --> ep_strbuf_append_c() in a few cases.

svn path=/trunk/; revision=28052
2009-04-14 18:31:02 +00:00
Bill Meier f3d59ba1fe More ethereal --> wireshark
svn path=/trunk/; revision=27994
2009-04-08 13:07:21 +00:00
Gerald Combs c1e3c91b8f The last of the size_t fixes in epan/dissectors.
svn path=/trunk/; revision=27980
2009-04-06 23:06:35 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Bill Meier 09d097e7a7 #include <conversation.h> not req'd ....
svn path=/trunk/; revision=27389
2009-02-06 20:33:53 +00:00
Bill Meier c0e92cbc04 Fix various typos and spelling errors (mostly in text strings)
svn path=/trunk/; revision=27065
2008-12-20 00:09:02 +00:00
Stig Bjørlykke e6a22e689e Fix some "format not a string literal and no format arguments" warnings.
svn path=/trunk/; revision=26648
2008-10-31 15:34:00 +00:00
Guy Harris 7e4d12a120 PRI[duox]64 isn't being defined on all platforms, breaking the build,
and we don't want to use it in any case, as PRI[duox]64 might be
different from G_GUINT64_MODIFIER followed by [duox], and the latter is
what GLib's formatter supports, and that's the formatter we use.

svn path=/trunk/; revision=25996
2008-08-13 07:33:51 +00:00
Anders Broman 255d6b0af9 Fix:
packet-rtps.c:1462: warning: unused parameter 'label'
packet-rtps.c:2767: warning: unused parameter 'label'
packet-rtps2.c:1687: warning: unused parameter 'label'
packet-rtps2.c:3049: warning: unused parameter 'label'
packet-rtps2.c:3147: warning: unused parameter 'label'

svn path=/trunk/; revision=25995
2008-08-13 06:33:39 +00:00
Anders Broman a143298812 From Fabrizio Bertocci:
- The RTPS packet dissector has been rewritten from scratch to dissect RTPS 1.0
- 1.2 packets

svn path=/trunk/; revision=25994
2008-08-13 06:09:54 +00:00
Anders Broman 1950ffc214 Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster.
Replace 
- col_append_fstr() with faster  col_append_str() 
- col_add_str() with col_set_str()
when it's safe

svn path=/trunk/; revision=23252
2007-10-23 05:50:00 +00:00