Commit Graph

1874 Commits

Author SHA1 Message Date
Guy Harris 88e3e47bfd More prototype cleanup.
svn path=/trunk/; revision=54752
2014-01-14 02:17:16 +00:00
Guy Harris 2081d99c2d In a source file that defines external functions, the header file that
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-13 23:05:44 +00:00
Guy Harris 9935ef7474 dissect_CBA_Connection_Data() isn't used outside packet-dcom-cba-acco.c,
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-13 22:46:05 +00:00
Guy Harris 40791d0c4c Move dissect_pn_uint16_ret_item() to packet-pn.c, to be with its sibling
dissect_pn_uint16().  Declare it in packet-pn.h.

svn path=/trunk/; revision=54733
2014-01-13 22:36:52 +00:00
Guy Harris 4fdbf843a6 dispatchService() is imported from other code; declare it in
opcua_transport_layer.h, not opcua_transport_layer.c.

svn path=/trunk/; revision=54730
2014-01-13 22:24:54 +00:00
Anders Broman 643b572665 Stop building and distributing the asn1 plugin. I bleleve it to be obsolete.
svn path=/trunk/; revision=54559
2014-01-02 17:47:34 +00:00
Anders Broman 61c72710a7 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54558
2014-01-02 17:42:02 +00:00
Anders Broman 3cb2c58eaf Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54552
2014-01-02 11:27:10 +00:00
Pascal Quantin e504cf945b wimax_compact_ulmap_ie_decoder() is used outside of wimax_compact_ulmap_ie_decoder.c
svn path=/trunk/; revision=54533
2014-01-01 14:29:16 +00:00
Anders Broman 818c0fdaf8 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54530
2014-01-01 12:25:44 +00:00
Anders Broman 451c30ef81 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54528
2014-01-01 12:17:57 +00:00
Anders Broman d0915cabb3 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54473
2013-12-27 10:49:35 +00:00
Evan Huus e805778692 Avoid using ephemeral memory in register routines.
svn path=/trunk/; revision=54423
2013-12-23 21:19:34 +00:00
Bill Meier dcd669e70c #if 0 a group of unused #defines;
Remove some trailing whitespace;
Add editor modelines.

svn path=/trunk/; revision=54307
2013-12-20 16:25:37 +00:00
Martin Kaiser f53f20513a fix
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-20 08:57:17 +00:00
Anders Broman 5fbfa6c351 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=54280
2013-12-20 06:30:13 +00:00
Evan Huus 6be37815a1 Add bytestring_to_str() which takes a wmem scope and is otherwise identical to
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-19 20:53:44 +00:00
Evan Huus 2ae8edccea Rename more to_str functions to have ep_ in the name if they return ephemeral
buffers. Remove two unused functions.

svn path=/trunk/; revision=54250
2013-12-19 16:28:39 +00:00
Evan Huus a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
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-19 15:49:09 +00:00
Gerald Combs 465e4664de Use "(void) <variable/>" to avoid unused variable warnings similar to
Qt's Q_UNUSED macro.

svn path=/trunk/; revision=54110
2013-12-14 23:44:25 +00:00
Chris Maynard 862b30c07a Take a preemptive strike at some likely future VS Code Analyzer warnings about strings possibly not being zero-terminated.
svn path=/trunk/; revision=54098
2013-12-14 17:00:36 +00:00
Bill Meier b4acad6f0f Prevent VS Code Analyzer warning; (AFAICT: not an actual bug).
svn path=/trunk/; revision=54096
2013-12-14 16:36:07 +00:00
Jakub Zawadzki 1053e722ed Fix warnings
svn path=/trunk/; revision=54089
2013-12-14 12:45:57 +00:00
Jakub Zawadzki 4d92f6079b Remove not needed ';'
svn path=/trunk/; revision=54088
2013-12-14 11:12:20 +00:00
Chris Maynard 97964f3ebd Fix Visual Studio Code Analysis warning C6054: String 'szStr' might not be zero-terminated
svn path=/trunk/; revision=54049
2013-12-13 17:13:33 +00:00
Chris Maynard 69dbd3fb24 Reject the packet if info is NULL under conditions where it'll be used.
svn path=/trunk/; revision=53969
2013-12-12 19:38:20 +00:00
Jakub Zawadzki 65db82872c When including <epan/prefs.h> don't force inclusion of <epan/uat.h>
svn path=/trunk/; revision=53769
2013-12-03 22:16:49 +00:00
Michael Mann 60d6b05e23 Stats_tree enhancements for sorting, averages and burst rate. Bug 9452 (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-29 22:47:59 +00:00
Jakub Zawadzki 82e2675f45 Avoid including <wiretap/wtap.h> in dissectors.
svn path=/trunk/; revision=53655
2013-11-29 20:53:00 +00:00
Jakub Zawadzki 5ac6474c94 Rename some of pint.h macros to match common style (bits number on the end).
pntohs  -> pntoh16
   pntohl  -> pntoh32
   pletohs -> pletoh16
   pletohl -> pletoh32
   phtons  -> phton16
   phtonl  -> phton32


svn path=/trunk/; revision=53652
2013-11-29 18:59:06 +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
Michael Mann 9ba190f2a5 Create multiple dissection functions if packet_info->ipproto is used to distinguish behavior.
svn path=/trunk/; revision=53504
2013-11-22 02:52:41 +00:00
Michael Mann f4360dc48c Create separate dissector function for TCP functionality so packet_info->ethertype doesn't need to be used.
svn path=/trunk/; revision=53478
2013-11-21 17:18:11 +00:00
Anders Broman 864431b900 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=53425
2013-11-19 06:06:38 +00:00
Anders Broman 202a03b398 Fix [-Wmissing-prototypes]
svn path=/trunk/; revision=53404
2013-11-18 06:22:09 +00:00
Guy Harris eee9b9ddd3 Move get_tempfile_path() from filesystem.[ch] to tempfile.[ch].
svn path=/trunk/; revision=53379
2013-11-17 04:39:44 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Anders Broman 171f91db2b Try to fix [-Wmissing-prototypes]
svn path=/trunk/; revision=53337
2013-11-15 06:32:11 +00:00
Guy Harris 6461057a52 Now that fvalue_to_string_repr() returns NULL if the fvalue's ftype has
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-12 22:22:23 +00:00
Jakub Zawadzki ae59b09443 Add missing includes in order to remove exceptions.h from proto.h (next commit).
svn path=/trunk/; revision=53230
2013-11-10 15:59:37 +00:00
Jakub Zawadzki 12d1509aa1 Move struct _ftype_t + callback typedefs + free macro to ftypes-int.h
svn path=/trunk/; revision=53223
2013-11-10 13:14:09 +00:00
Michael Mann 8081cf1d90 Add data parameter to tcp_dissect_pdus() as well as convert it to using "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-09 17:46:28 +00:00
Jakub Zawadzki c9b2ee3768 include <wsutil/pint.h> only when needed.
svn path=/trunk/; revision=53196
2013-11-09 15:44:29 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Michael Mann 22760b2d2a Remove pinfo->private_data from DCERPC dissectors and instead have dcerpc_info* infomation be passed in as a function parameter. Bug 9387 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9387)
All "generated" source was manually modified (with the power of search/replace), but I believe the "source input" files have been adjusted (checked into revs 53098 and 53099) to reflect the necessary changes (with possible whitespace formatting differences).

The Microsoft compiler doesn't flag "unused function parameters", so I apologize in advance if I may have missed a few.  The "dcerpc_info* di" parameter is used in almost every function.

svn path=/trunk/; revision=53100
2013-11-06 14:31:29 +00:00
Michael Mann 7c33631d69 Remove setting of pinfo->private_data to ETHERCAT_MBOX_HEADER structure as it's not used anywhere in the Wireshark source.
If it's used by a third-party plugin, please submit a patch that passes the ETHERCAT_MBOX_HEADER structure through the data parameter of the "new" style dissector function.

svn path=/trunk/; revision=53094
2013-11-05 20:00:57 +00:00
Michael Mann f8f1f48371 Pass struct tcpinfo into all TCP subdissectors instead of through pinfo->private_data.
svn path=/trunk/; revision=53036
2013-11-02 00:36:30 +00:00
Bill Meier 0ad98563a2 From didier gautheron: remove redundant or use faster col_xxx functions
- 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-29 14:09:20 +00:00
Evan Huus 95f484a91e Add a very small hack to make the UAT update callback error string freeable, and
convert all existing UAT update callbacks to use glib memory instead of
ephemeral memory for that string.

UAT code paths are entirely distinct from packet dissection, so using ephemeral
memory was the wrong choice, because there was no guarantees about when it would
be freed.

The move away from emem still needs to be propogated deeper into the UAT code
itself at some point.

Net effect: remove another bunch of emem calls from dissectors, where replacing
with wmem would have caused assertions.

svn path=/trunk/; revision=52854
2013-10-25 22:14:25 +00:00
Michael Mann 503e211281 Minor cleanup.
svn path=/trunk/; revision=52809
2013-10-24 00:32:52 +00:00