aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
AgeCommit message (Collapse)AuthorFilesLines
2014-02-05Introduce end-of-line normalizationPascal Quantin1-34/+34
Change-Id: Ie6991af2432b193fbdc23bbbd335f83c091f14e8 Reviewed-on: https://code.wireshark.org/review/114 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-02-03Don't pass tvb_get_ptr to proto_tree_add_stringEvan Huus1-4/+1
If the string doesn't end with a null-terminator in the given length it causes a read-overflow. Should fix bug #9717. Change-Id: I44647ef8ecb856e07d1175777ed603736ec63553 Reviewed-on: https://code.wireshark.org/review/90 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-03Fix (-W)documentation found by ClangAlexis La Goutte1-64/+64
Convert comment to doxygen type Change-Id: Ib7adc2ece99dc4baa8ec3a349896dfa89277e00b Reviewed-on: https://code.wireshark.org/review/84 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-03Fix all -fstrict-alias warnings found by gcc 4.1.2Gilbert Ramirez1-1/+1
The majority of the fixes are for calls to uat_new(). Instead of having each caller cast its private data to (void**), we use void* in the uat_new() API itself. Inside uat_new(), we cast the void* to void**. Some dissectors use val64_string arrays, so a VALS64() macro was added for those, to avoid using VALS(), which is useful only for value_string arrays. packet-mq.c was changed because dissect_nt_sid() requires a char**, not a guint**. All other callers of dissect_nt_sid() use char*'s (and take the address of it) for their local storage. So, this was changed to follow the other practices. A confusion between gint and absolute_time_display_e in packet-time.c was cleared up. The ugliest fix is the addition of ip6_guint8_to_str(), for exactly one caller. The caller uses one type of ip6 address byte array, while ip6_to_str() expects another. This new function is in place until the various address implementations can be consolidated. Add VALS64() to the developer documentation. Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805 Reviewed-on: https://code.wireshark.org/review/48 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-01-29Add newlines at end of files that are missing them.Gilbert Ramirez2-2/+2
gcc 4.1.2 complained with: No newline at end of file Change-Id: I813af88737e725a328713eea4a7096d28942f9b2
2014-01-24The wimax plugin primarily uses tvb_get_ptr buffer accesses instead of theEvan Huus2-2/+10
safe accessor functions, and it's all done via scary bit-twiddling macros to boot. Create the macros TVB_NIB_WORD and TVB_NIB_NIBBLE that (should) behave just like the raw-pointer NIB_WORD and NIB_NIBBLE macros, except using the safe tvb functions instead. Replace two instances with the safe versions, which fixes an out-of-bounds access caught by my valgrind fuzzer. If this doesn't break anything then we should probably do a wholesale replacement at some point, but I'm not feeling that adventurous at the moment. svn path=/trunk/; revision=54951
2014-01-14More prototype cleanup.Guy Harris5-1/+25
svn path=/trunk/; revision=54752
2014-01-13In a source file that defines external functions, the header file thatGuy Harris6-4/+76
declares the functions must be included, in order to make sure the declarations match the function signature. Make it so - which means creating the header file in the first place. Also, declare proto_register_wimax_compact_dlmap_ie() early in wimax_compact_dlmap_ie_decoder.c, similar to what we do in wimax_copact_ulmap_ie_decoder.c. svn path=/trunk/; revision=54739
2014-01-13dissect_CBA_Connection_Data() isn't used outside packet-dcom-cba-acco.c,Guy Harris2-8/+1
so make it static - and get rid of the #if 0'ed out declaration in packet-dcom-cba-acco.h. svn path=/trunk/; revision=54735
2014-01-13Move dissect_pn_uint16_ret_item() to packet-pn.c, to be with its siblingGuy Harris3-22/+22
dissect_pn_uint16(). Declare it in packet-pn.h. svn path=/trunk/; revision=54733
2014-01-13dispatchService() is imported from other code; declare it inGuy Harris2-3/+1
opcua_transport_layer.h, not opcua_transport_layer.c. svn path=/trunk/; revision=54730
2014-01-02Stop building and distributing the asn1 plugin. I bleleve it to be obsolete.Anders Broman2-2/+0
svn path=/trunk/; revision=54559
2014-01-02Fix [-Wmissing-prototypes]Anders Broman13-0/+32
svn path=/trunk/; revision=54558
2014-01-02Fix [-Wmissing-prototypes]Anders Broman23-0/+71
svn path=/trunk/; revision=54552
2014-01-01wimax_compact_ulmap_ie_decoder() is used outside of ↵Pascal Quantin1-1/+1
wimax_compact_ulmap_ie_decoder.c svn path=/trunk/; revision=54533
2014-01-01Fix [-Wmissing-prototypes]Anders Broman2-1/+5
svn path=/trunk/; revision=54530
2014-01-01Fix [-Wmissing-prototypes]Anders Broman13-5/+30
svn path=/trunk/; revision=54528
2013-12-27Fix [-Wmissing-prototypes]Anders Broman4-0/+10
svn path=/trunk/; revision=54473
2013-12-23Avoid using ephemeral memory in register routines.Evan Huus2-4/+7
svn path=/trunk/; revision=54423
2013-12-20#if 0 a group of unused #defines;Bill Meier1-8/+23
Remove some trailing whitespace; Add editor modelines. svn path=/trunk/; revision=54307
2013-12-20fixMartin Kaiser1-0/+1
CC packet-ecatmb.lo packet-ecatmb.c: In function 'dissect_ecat_mailbox': packet-ecatmb.c:877:64: error: 'info.anSdoInfoUnion.Entry.ValueInfo' may be used uninitialized in this function [-Werror=uninitialized] packet-ecatmb.c:796:38: note: 'info.anSdoInfoUnion.Entry.ValueInfo' was declared here packet-ecatmb.c:884:34: error: 'info.anSdoInfoUnion.Entry.Res.BitLen' may be used uninitialized in this function [-Werror=uninitialized] packet-ecatmb.c:796:38: note: 'info.anSdoInfoUnion.Entry.Res.BitLen' was declared here svn path=/trunk/; revision=54286
2013-12-20Fix [-Wmissing-prototypes]Anders Broman2-6/+12
svn path=/trunk/; revision=54280
2013-12-19Add bytestring_to_str() which takes a wmem scope and is otherwise identical toEvan Huus1-4/+4
bytestring_to_ep_str (now deprecated). Use the new one in a few obvious places. Also just print directly to the buffer when loading ethernet addresses for resolution. The straight-to-buffer bytes_to_hexstr seems useful, maybe it shouldn't be in a private header... svn path=/trunk/; revision=54270
2013-12-19Rename more to_str functions to have ep_ in the name if they return ephemeralEvan Huus1-6/+6
buffers. Remove two unused functions. svn path=/trunk/; revision=54250
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-4/+4
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-14Use "(void) <variable/>" to avoid unused variable warnings similar toGerald Combs1-1/+4
Qt's Q_UNUSED macro. svn path=/trunk/; revision=54110
2013-12-14Take a preemptive strike at some likely future VS Code Analyzer warnings ↵Chris Maynard1-3/+10
about strings possibly not being zero-terminated. svn path=/trunk/; revision=54098
2013-12-14Prevent VS Code Analyzer warning; (AFAICT: not an actual bug).Bill Meier1-0/+3
svn path=/trunk/; revision=54096
2013-12-14Fix warningsJakub Zawadzki1-3/+0
svn path=/trunk/; revision=54089
2013-12-14Remove not needed ';'Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54088
2013-12-13Fix Visual Studio Code Analysis warning C6054: String 'szStr' might not be ↵Chris Maynard1-0/+2
zero-terminated svn path=/trunk/; revision=54049
2013-12-12Reject the packet if info is NULL under conditions where it'll be used.Chris Maynard1-0/+4
svn path=/trunk/; revision=53969
2013-12-03When including <epan/prefs.h> don't force inclusion of <epan/uat.h>Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53769
2013-11-29Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 ↵Michael Mann1-4/+39
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9452) From Deon van der Westhuysen - Bug fix: object leak in stats_tree after a tap reset (for example apply statistics preferences with a stats_tree window open) - Bug fix: correct sample code in README.stats_tree - Add: slash in plug-in name now creates submenu as docs describe (was a bug?) - Add: menu separator before the stat_tree registered plug-ins - Add: stats_tree can now calculate averages for nodes; automatically calculated for range nodes. Add section in README.stats_tree describing averages. - Add: stats_tree can now calculate burst rate of each node (like rate but with a shorter, sliding time window) - Add: sorting for stats_tree plug-ins. Can sort on node name, count, average, min, max values and burst rate. - Add: preferences for stats_tree system (default sort column, burst calc params) - Add: stats_tree window copy to clipboard and export and plain text, csv and XML. - Added sample of new functionality in $srcdir/plugins/stats_tree/pinfo_stats_tree.c - Moved all stats_tree sample plug-ins to "IP Statistics" submenu. svn path=/trunk/; revision=53657
2013-11-29Avoid including <wiretap/wtap.h> in dissectors.Jakub Zawadzki2-0/+2
svn path=/trunk/; revision=53655
2013-11-29Rename some of pint.h macros to match common style (bits number on the end).Jakub Zawadzki1-14/+14
pntohs -> pntoh16 pntohl -> pntoh32 pletohs -> pletoh16 pletohl -> pletoh32 phtons -> phton16 phtonl -> phton32 svn path=/trunk/; revision=53652
2013-11-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-3/+3
(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-22Create multiple dissection functions if packet_info->ipproto is used to ↵Michael Mann1-15/+22
distinguish behavior. svn path=/trunk/; revision=53504
2013-11-21Create separate dissector function for TCP functionality so ↵Michael Mann1-12/+17
packet_info->ethertype doesn't need to be used. svn path=/trunk/; revision=53478
2013-11-19Fix [-Wmissing-prototypes]Anders Broman10-12/+26
svn path=/trunk/; revision=53425
2013-11-18Fix [-Wmissing-prototypes]Anders Broman44-1/+124
svn path=/trunk/; revision=53404
2013-11-17Move get_tempfile_path() from filesystem.[ch] to tempfile.[ch].Guy Harris1-1/+2
svn path=/trunk/; revision=53379
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris3-3/+3
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-11-15Try to fix [-Wmissing-prototypes]Anders Broman7-1/+9
svn path=/trunk/; revision=53337
2013-11-12Now that fvalue_to_string_repr() returns NULL if the fvalue's ftype hasGuy Harris1-6/+2
no val_to_string_repr method, we don't need to check whether it has such a method, and thus don't need to include epan/ftypes/ftypes-int.h. svn path=/trunk/; revision=53293
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki16-0/+18
svn path=/trunk/; revision=53230
2013-11-10Move struct _ftype_t + callback typedefs + free macro to ftypes-int.hJakub Zawadzki1-0/+2
svn path=/trunk/; revision=53223
2013-11-09Add data parameter to tcp_dissect_pdus() as well as convert it to using ↵Michael Mann2-21/+23
"new" style dissectors. Now that "bytes consumed" can be determined, should tcp_dissect_pdus() take advantage of that? Should tcp_dissect_pdus return length (bytes consumed)? There are many dissectors that just call tcp_dissect_pdus() then return tvb_length(tvb). Seems like that could all be rolled into one. svn path=/trunk/; revision=53198
2013-11-09include <wsutil/pint.h> only when needed.Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=53196
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki2-0/+2
svn path=/trunk/; revision=53189