summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-rtps.c
AgeCommit message (Collapse)AuthorFilesLines
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-3/+0
Specifically: - Set packet.h to be the first wireshark #include after config.h and "system" #includes. packet.h added as an #include in some cases when missing. - Remove some #includes included (directly/indirectly) in packet.h. E.g., glib.h. (Done only for those files including packet.h). - As needed, move "system" #includes to be after config.h and before wireshark #includes. - Rework various #include file specifications for consistency. - Misc. Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95 Reviewed-on: https://code.wireshark.org/review/5923 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-11-02RTPS: fix warning: no previous prototype for function ... [-Wmissing-prototypes]Alexis La Goutte1-3/+3
Change-Id: I1943c1446a7bc3381d869514d7802bc0fbb1f6e3 Reviewed-on: https://code.wireshark.org/review/5072 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-19Do encoding-arg changes (all benign)Bill Meier1-8/+7
For: - FT_BYTES: Always use just ENC_NA - integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN Also: - FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...) - Change one case of incorrect '||' to '|' Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0 Reviewed-on: https://code.wireshark.org/review/4184 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-04Fix unused variable... [-Werror,-Wunused-const-variable]Stig Bjørlykke1-1/+3
Use DATA_FRAG_FLAGS, disabled unused NACK_FLAGS Change-Id: I2d3dda2c3ab1ebbd66e32bf5ec1b62b521a7140d Reviewed-on: https://code.wireshark.org/review/3968 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-09-03RTPS: Add Modelines infoAlexis La Goutte1-2/+14
Change-Id: Ib29fb16d3b82b53aba52e2d13be2ce8e8727ccfb Reviewed-on: https://code.wireshark.org/review/3973 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-03RTPS: fix Result of operation is garbage or undefinedAlexis La Goutte1-0/+1
Missing get num_virtual_guids value... Change-Id: I81a3dea3c96fb946c5c26ffe4ab2bfb82d1d8222 Reviewed-on: https://code.wireshark.org/review/3972 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-02RTPS: added new PIDs and included minor improvementsJuanjo1-277/+1592
- (Updated) Fixed code review issues - (Updated) Fixed whitespaces and code review issues - Representing now some NTP times as duration (not as date) - Added some vendor specific PIDs (RTI) - Added dissect_APP_ACK_CONF, dissect_APP_ACK and dissect_HEARTBEAT_VIRTUAL - Added is_discovery to dissect_serialize_data to avoid malformed packets when using mutable types (Wireshark assumes serialized data with CDR-PL encapsulation is always discovery data, what is not true when using Mutable types) Change-Id: I491750d95b12f386c41d7de4ae7e280781efa375 Reviewed-on: https://code.wireshark.org/review/3836 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06convert to proto_tree_add_subtree[_format]Michael Mann1-64/+37
Change-Id: Ia2567695ffed30c990eda3740b08bfab101cea96 Reviewed-on: https://code.wireshark.org/review/2883 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-11/+11
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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-01-14Don't cast away constness.Guy Harris1-6/+6
svn path=/trunk/; revision=54766
2013-12-15Create separate dissection functions for TCP and UDP.Michael Mann1-16/+21
svn path=/trunk/; revision=54115
2013-12-12- Make local functions static.Anders Broman1-0/+3
- Forward declaration of register functions. svn path=/trunk/; revision=53958
2013-11-06Fix for checking RTPS sub message length. Bug 9378 ↵Michael Mann1-6/+20
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9378) From Steve Osselton #BACKPORT(1.10) svn path=/trunk/; revision=53107
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-1/+1
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+2
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-57/+57
svn path=/trunk/; revision=52591
2013-09-22emem -> wmem conversion:Pascal Quantin1-11/+11
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-09-15emem -> wmem (except uat or init routines)Pascal Quantin1-20/+21
svn path=/trunk/; revision=52087
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-28/+28
svn path=/trunk/; revision=51852
2013-08-25Batch of filterable expert infos.Michael Mann1-45/+56
svn path=/trunk/; revision=51518
2013-08-19Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9053 :Pascal Quantin1-3/+16
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-08Correctly check bounds on dim_max.Evan Huus1-0/+5
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9019 svn path=/trunk/; revision=51213
2013-06-12Batch of filterable expert infos with some minor cleanup I noticed while ↵Michael Mann1-20/+29
doing the filter conversions. svn path=/trunk/; revision=49893
2013-04-07Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-3/+2
svn path=/trunk/; revision=48782
2013-04-04Try to fix compilation on LinuxPascal Quantin1-18/+9
svn path=/trunk/; revision=48731
2013-04-04RTPS Cleanup, Part 3 (final)Michael Mann1-1800/+4253
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-03-29Rename value string (and similar) functions to use a consistent pattern. ThisEvan Huus1-2/+2
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-23Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-6/+6
svn path=/trunk/; revision=48506
2013-03-19From beroset:Anders Broman1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48430
2013-03-11Fix Coverity CID 990224 and 990225: Unused pointer value.Chris Maynard1-11/+11
svn path=/trunk/; revision=48256
2013-03-09Put items in the tree we just created, mark an unused param as _U_.Evan Huus1-2/+2
Fixes GCC build. svn path=/trunk/; revision=48209
2013-03-09RTPS Cleanup, Part 2Michael Mann1-1664/+733
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-05RTPS Cleanup, Part 1Michael Mann1-412/+181
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-02-14Fix potential buffer overflow in RTPS and RTPS2 dissectors by allocating ↵Michael Mann1-2/+3
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-01-13bugfix nested loop that wasn't breaking out of the main loop when subloop ↵Michael Mann1-1/+1
really wanted it to. Bug 8198 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8198) svn path=/trunk/; revision=47046
2012-12-26Fix a bunch of warnings.Guy Harris1-10/+10
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-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-4/+3
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2011-10-26Fix a proto_tree_add_item() encoding areg;Bill Meier1-19/+19
Use gboolean instead of int in certain cases. svn path=/trunk/; revision=39617
2011-10-26Fix proto_tree_add_item() encoding args.Bill Meier1-24/+24
svn path=/trunk/; revision=39615
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-2/+2
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-07-18Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.Bill Meier1-8/+3
svn path=/trunk/; revision=38095
2011-04-16Fix the warnings in Coverity CIDs 606-608.Gerald Combs1-2/+1
svn path=/trunk/; revision=36671
2011-03-23Fix bugs: 'if ((flags & 0x2) == 1)' ==> 'if ((flags & 0x2) != 0)'Bill Meier1-4/+4
Coverity 346 & 347 svn path=/trunk/; revision=36292
2011-02-07Remove unneeded #includes (stdio.h,stdlib.h);Bill Meier1-687/+678
Whitespace cleanup: trailing, indentation, "4-space tabs" svn path=/trunk/; revision=35850
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2010-04-03(Trivial): indentation & whitespace cleanup.Bill Meier1-6/+6
svn path=/trunk/; revision=32366