Commit Graph

2043 Commits

Author SHA1 Message Date
Alexis La Goutte b7b33b54bd Continue to remove $Id$ from top of file
Last one $Id$ (remove by hand) to make checkAPI haapy !

Change-Id: I5adfdcac0629a36e08c5fe3ea7960bdbc251364f
Reviewed-on: https://code.wireshark.org/review/887
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:49:52 +00:00
Alexis La Goutte 757aa33220 Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash)

Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd
Reviewed-on: https://code.wireshark.org/review/881
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:48:06 +00:00
Alexis La Goutte fb61a0afa9 Continue to remove $Id$ from top of file
(Using sed :sed -i '/^  \* \$Id\$/,+1 d') (2 spaces before star)

Change-Id: I7060f198b4ae4dd271ecc454f6c6dd8bd4cfd8d4
Reviewed-on: https://code.wireshark.org/review/885
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:47:40 +00:00
Alexis La Goutte 09cd306d1c Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\* \$Id\$/,+1 d') (no space before star)

Change-Id: I318968db2b8512ba1303b5fc5c624c66441658f0
Reviewed-on: https://code.wireshark.org/review/879
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-31 18:30:52 +00:00
Alexis La Goutte 94a791a76e Continue to remove $Id$ from top of file
(Using sed : sed -i '/^\$Id\$/,+1 d') (No space or star before $Id$)

Change-Id: I0801bd7cf234d32487008a8b6dcee64875b07688
Reviewed-on: https://code.wireshark.org/review/876
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-31 16:00:04 +00:00
Michael Mann d8265cd8c6 Remove Visual Studio solution and project files (and their existence from Makefiles)
There have been discussions on -dev about removing this and I believe I was the last holdout. Finally convinced that I should just have a local copy (ignored by git)

Change-Id: Ic72a22baf58e3412023cf851f0fce16eb07113b0
Reviewed-on: https://code.wireshark.org/review/681
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-16 18:03:41 +00:00
Guy Harris c8b6b76996 Thou shalt not put newlines in the strings in value_string tables.
That just breaks too many things.

This catches the examples of that found in bug 9878.  There might be
others that my grepping didn't find.

We should also have the checkAPIs.pl script check for this, so this
isn't a full fix for bug 9878.

Change-Id: I3bf6f1fc0fe8654d0f54a995e72f1966ae012f5e
Reviewed-on: https://code.wireshark.org/review/623
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-03-12 22:10:53 +00:00
Widok 970197c19f Corrected mrp decoding of link up and down
Added DCP decoding of reset to factory
removed unused value_strings
corrected decoding of PDSubFrameBlock
most of the length display added a dec_hex display


Signed-off-by: Widok <kellingwido@aol.com>
Change-Id: I17b59b45eff37b65047a7a3e5e275f01a37ee616
Reviewed-on: https://code.wireshark.org/review/517
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-05 18:53:50 +00:00
Alexis La Goutte abc6fb24fa Fix some code remove by 296591399f
(Copyright or info about file...)

Change-Id: I90ba8b1c3ec8406b0c3365a69a8555837fc4bbb1
Reviewed-on: https://code.wireshark.org/review/515
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-03-05 09:25:47 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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-03-04 14:27:33 +00:00
Bill Meier 11b5c15fdb Remove trailing whitespace
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0
Reviewed-on: https://code.wireshark.org/review/385
Reviewed-by: Bill Meier <wmeier@newsguy.com>
Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-25 20:46:49 +00:00
Alexis La Goutte 9b6f1392ff Fix -Wunused-const-variable found by Clang
Change-Id: I7fb2e6477cea26a5ee13dcc0610f7522ce211ae2
Reviewed-on: https://code.wireshark.org/review/321
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-24 17:50:42 +00:00
Widok cfe488b814 Bug 9721 - profinet write doesn't decode the Profidrive value Type correct
removed win-setup.sh.bak
Signed-off-by: Widok <kellingwido@aol.com>
Change-Id: I4ec65ef10ca794cd5b43fa66502edd4533c356d1
Reviewed-on: https://code.wireshark.org/review/198
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-19 13:30:23 +00:00
Pascal Quantin b1bea543d9 Introduce end-of-line normalization
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-05 22:28:01 +00:00
Evan Huus 538525918a Don't pass tvb_get_ptr to proto_tree_add_string
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-03 16:18:54 +00:00
Alexis La Goutte c93ddddb6e Fix (-W)documentation found by Clang
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-03 13:11:14 +00:00
Gilbert Ramirez 4cc694839d Fix all -fstrict-alias warnings found by gcc 4.1.2
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-02-03 09:26:10 +00:00
Gilbert Ramirez a20d788da3 Add newlines at end of files that are missing them.
gcc 4.1.2 complained with:
    No newline at end of file

Change-Id: I813af88737e725a328713eea4a7096d28942f9b2
2014-01-29 05:11:10 -08:00
Evan Huus a7ea59488d The wimax plugin primarily uses tvb_get_ptr buffer accesses instead of the
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-24 20:48:55 +00:00
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
Michael Mann ffd7d714b3 Make WiMax CDMA Code Attribute its own protocol with it's own filter.
svn path=/trunk/; revision=52808
2013-10-24 00:30:14 +00:00
Michael Mann 5ca56e5bce Create a single array of ett_ variables, instead of individual etts + array of pointers.
Other minor cleanup.

svn path=/trunk/; revision=52807
2013-10-24 00:26:57 +00:00
Michael Mann 4cfd2f93ea Remove profinet_conv member of struct _packet_info and turn it into proto_data.
svn path=/trunk/; revision=52806
2013-10-24 00:17:58 +00:00
Bill Meier 8c220a6f7f Fix (using '#if 0') a few more [-Wunused-const-variable] warnings
svn path=/trunk/; revision=52799
2013-10-23 16:59:34 +00:00
Bill Meier aa67dd156e Fix (using '#if 0') various [-Wunused-const-variable] warnings
svn path=/trunk/; revision=52794
2013-10-23 15:53:31 +00:00
Michael Mann 2657071e88 Don't allow invalid ranges to be specified for the stats tree. Bug 9130 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9130)
Not sure which memory allocation should be used here (using wmem caused crash), but this revision can at least be easily backported to 1.10 where the bug was reported.

Also allow a single number to be used in the stats range since it's considered a valid "range" by the UAT.

svn path=/trunk/; revision=52679
2013-10-18 21:17:01 +00:00
Graham Bloice 9c4ee86784 Add CMake properties to targets so that they are logically organised when using a Visual Studio solution.
Add CMake properties to group the source files in epan into logical blocks when using a Visual Studio solution.

svn path=/trunk/; revision=52580
2013-10-13 09:21:55 +00:00
Alexis La Goutte 88c79b03d9 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=52290
2013-09-30 09:03:41 +00:00
Alexis La Goutte 37762701c4 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=52289
2013-09-30 09:03:28 +00:00
Alexis La Goutte bdd2350b2c Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=52288
2013-09-30 09:03:16 +00:00
Evan Huus ca52337c43 Fix various warnings in (hopefully) the right ways.
svn path=/trunk/; revision=52236
2013-09-28 02:41:49 +00:00
Michael Mann e5379de126 1. Remove PITEM_FINFO from add_tlv_subtree and add_protocol_subtree (as well as some other minor cleanup) and adjust the calling functions accordingly.
2. Converted several add_protocol_subtree calls to add_tlv_subtree to get true filterability.  Many of the add_protocol_subtree are effectively being (ab)used as proto_tree_add_text with different highlighting.

3. Convert tvb_new_subset into tvb_new_subset_length.

Still looks like some of the remaining "protocols" need more specific filters, and should just be regular FT_BYTES fields.

svn path=/trunk/; revision=52235
2013-09-28 00:45:44 +00:00
Michael Mann f92832c8f4 Prevent crashing as a result of tree removal in r52208. Tree removal + this patch should be the "quick" fix to bug 5349 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5349). I knew the tree check was preventing some dissection/column data/etc, but from the comments in bug 5349, the tree check was also protecting this (and maybe other) crashes (due to missed NULL checking).
I want to follow up with some massive cleanup (remove PITEM_FINFO calls), but this with r52208 should be good enough to backport to 1.8 and 1.10 to fix bug 5349.  Cleanup shouldn't need to be backported.

svn path=/trunk/; revision=52209
2013-09-24 21:06:05 +00:00
Guy Harris 9e24ed6e97 You are in a twisty little maze of code paths, all different. Get rid
of the if (tree) tests in dissect_mac_header_generic_decoder(), as some
of the stuff done inside there should be done even if we're not building
a protocol tree, e.g. CRC stuff and calling subdissectors.

Get rid of a gratuitous pair of curly braces, and fix the indentation of
one line, while we're at it.

svn path=/trunk/; revision=52208
2013-09-24 20:32:19 +00:00
Guy Harris 84ac86916b Stuff used when checking the CRC needs to be done regardless of whether
we're building a protocol tree or not.

svn path=/trunk/; revision=52207
2013-09-24 19:57:41 +00:00
Guy Harris ff7b1d8a65 Get rid of unused variable.
svn path=/trunk/; revision=52206
2013-09-24 19:56:56 +00:00
Guy Harris d08e9702c8 Fix copy-and-pasteo(?).
svn path=/trunk/; revision=52205
2013-09-24 19:09:10 +00:00
Guy Harris 36fd921839 One advantage of making as many things as possible static is that, if
they're not being used, the compiler can be made to warn about that.

In this case, Broadcast_Control_Pointer_IE() was used because of a
missing case in a switch statement; put that case in.

svn path=/trunk/; revision=52204
2013-09-24 19:07:22 +00:00
Michael Mann 1ac3997acb Wimax dissector improvements:
1. Remove message type field from all MAC Management "sub"dissectors and place it in Mac Management subdissector itself.  This may cause backwards-compatibility issues (malformed packets) with third-party subdissectors of the MAC Management dissector, but it didn't make sense to have so many filters for a single enumerated value, especially when the various "protocol" filters covers many of them.

2. Removed some if(tree) checks as column info and calling other dissectors are sometimes executed underneath.  Some of this is in preparation for addressing bug 5349.

3. Make all dissector functions (and a few others) static, and use register_dissector() when necessary.

4. Convert generic decoder CRC errors into expert info, rather than have it be a "protocol" filter (it just looks funny that way)


In general, these dissectors seem "over-protocolized". I understand the need for all of the dissectors, but I don't know if they all need "protocol" status.

svn path=/trunk/; revision=52203
2013-09-24 18:45:39 +00:00
Pascal Quantin 102c452bcb More emem -> wmem conversion:
- tvb_get_g_stringz()/tvb_get_ephemeral_stringz()/tvb_get_seasonal_stringz() -> tvb_get_stringz()
- tvb_get_g_stringz_enc()/tvb_get_ephemeral_stringz_enc() -> tvb_get_stringz_enc()
- tvb_get_ephemeral_unicode_stringz() -> tvb_get_unicode_stringz()
- tvb_bcd_dig_to_ep_str() -> tvb_bcd_dig_to_wmem_packet_str()
- update docs accordingly

svn path=/trunk/; revision=52180
2013-09-22 20:04:35 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- 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-22 15:50:55 +00:00
Jeff Morriss e33209d9a4 Don't declare proto_mac_mgmt_msg_ucd_decoder twice.
svn path=/trunk/; revision=52168
2013-09-22 14:00:52 +00:00
Michael Mann 6ceb84b10b Make dissectors register for their MAC Management Message Type and use dissector_try_uint to do any dissection. Many "outside" (third-party) message types appear to exist.
Have the makefiles do all the work setting up proto_register_<dissector> and proto_reg_handoff_<dissector>, rather than sprinkled throughout the dissectors with extern declarations.

More is coming to make more functions static (because of current makefile fixes) and cleanup MAC Management dissectors to remove unnecessary/duplicative code, but I wanted to get the build issues squared away.

svn path=/trunk/; revision=52167
2013-09-22 00:50:24 +00:00
Michael Mann a92dd77e6e Enhance DOCSIS dissector with new fields. Bug 9149 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9149)
From Jerry Negele

svn path=/trunk/; revision=52158
2013-09-20 19:02:15 +00:00
Pascal Quantin 953c6fed13 emem -> wmem
svn path=/trunk/; revision=52130
2013-09-17 21:34:05 +00:00
Michael Mann 7ec34a52c5 expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51850
2013-09-09 00:11:19 +00:00
Michael Mann f746c09862 Convert profinet dissector to use filterable expert info.
NOTE: Some of the expert group values may need to be checked, PI_UNDECODED doesn't always seem like the right choice.  I thought PI_PROTOCOL should be used more.


This concludes the conversion expert_add_info_format for all dissectors (where the function isn't commented or #defined out).  Onto the "internal" (epan/lua) uses of the call.

svn path=/trunk/; revision=51841
2013-09-08 16:23:33 +00:00
Alexis La Goutte ea6e5b7241 Fix Function call argument is an uninitialized value Warning found by Clang
packet-dcerpc-pn-io.c:9101:29: warning: Function call argument is an uninitialized value
        tvbuff_t *new_tvb = tvb_new_subset(tvb, offset, u32RecDataLen, u32RecDataLen);
                            ^                           ~~~~~~~~~~~~~

svn path=/trunk/; revision=51687
2013-09-02 23:16:39 +00:00
Alexis La Goutte f1ef082dab Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=51680
2013-09-02 23:15:29 +00:00
Alexis La Goutte 21436abf5f Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=51679
2013-09-02 23:15:17 +00:00
Alexis La Goutte b92f4ec821 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=51678
2013-09-02 23:15:07 +00:00
Alexis La Goutte 5be903807b Enhance Profinet MRP (Merge LinkUp and LinkDown)
svn path=/trunk/; revision=51548
2013-08-27 21:12:32 +00:00
Anders Broman c5ae1bbbca packet-dcerpc-pn-io.c: In function 'dissect_PNIO_C_SDU':
packet-dcerpc-pn-io.c:9220: warning: unused parameter 'drep'

svn path=/trunk/; revision=51390
2013-08-16 05:24:09 +00:00
Anders Broman 3e69184794 From Wido Kelling:
wrong interpretation of first byte in userdata of profinet data.

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

svn path=/trunk/; revision=51389
2013-08-16 04:57:48 +00:00
Evan Huus 80ea68ad78 As suggested by Volcke Mario, fixing
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9036

Don't change the length *and* the offset when adjusting for the ethercat header,
just the offset is enough (the length is then right).

svn path=/trunk/; revision=51360
2013-08-15 02:06:49 +00:00
Pascal Quantin 9ef54f5ea2 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9035 :
Indicate the right direction in info column

svn path=/trunk/; revision=51333
2013-08-13 08:19:41 +00:00
Jakub Zawadzki 9cfac1227d Replace hfinfo pointer to same_name_prev, with same_name_prev_id.
svn path=/trunk/; revision=51175
2013-08-06 20:53:47 +00:00
Jakub Zawadzki 72ea2f9c9c Remove hfinfo->bitshift member, add hfinfo_bitshift() to get it.
svn path=/trunk/; revision=51174
2013-08-06 20:10:59 +00:00
Jakub Zawadzki e07c9fccac Revert removed line in r50774, we can update pinfo->rel_ts not sure if it makes sense, but why not?
svn path=/trunk/; revision=50795
2013-07-22 19:49:03 +00:00
Jakub Zawadzki 1a1360c2e1 Update plugins/ with recent change.
svn path=/trunk/; revision=50774
2013-07-21 23:26:07 +00:00
Jakub Zawadzki a18172147f Remove fragment_data, add fragment_head, fragment_item - for now alias it to the same structure.
This is begin of work to split fragment head and fragments items.

svn path=/trunk/; revision=50708
2013-07-17 21:12:24 +00:00
Evan Huus df77b38e6e Bail in the profinet heuristics if we don't have source and destination mac
addresses. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8904

svn path=/trunk/; revision=50651
2013-07-16 01:42:26 +00:00
Chris Maynard f5f20fa8e3 Fix warning: ISO C does not allow extra ';' outside of a function.
svn path=/trunk/; revision=50638
2013-07-15 20:42:57 +00:00
Jeff Morriss 54bb2e7a5c Move report_err.{h,c} from epan into wsutil: there's nothing epan-specific there and moving it avoids having to recompile the file for use in editcap and capinfos (which don't link against libwireshark).
svn path=/trunk/; revision=50598
2013-07-15 02:48:26 +00:00
Guy Harris b161d15f0e Use tvb_new_chain with the tvbuffs from a reassembly.
svn path=/trunk/; revision=50585
2013-07-14 17:34:16 +00:00
Guy Harris 976cca3f98 A fragment_data structure now contains a pointer to a tvbuff to the
fragment or reassembled data, not a pointer to the data itself; instead
of having to construct a tvbuffs for the reassembled data, we can now
just use the existing tvbuff.

Spell out "fragment" and "fragmentation" in comments while we're at it.

svn path=/trunk/; revision=50584
2013-07-14 17:27:57 +00:00
Evan Huus 53c6595bd9 Add our license header to plugin moduleinfo.h files. Cleans up a batch of
licensecheck warnings.

svn path=/trunk/; revision=50407
2013-07-06 13:31:31 +00:00
Guy Harris 5d87a8c461 WS_DLL_PUBLIC is now always WS_DLL_PUBLIC_NOEXTERN with "extern" added;
just define WS_DLL_PUBLIC_NOEXTERN inside the ifdefs, and define
WS_DLL_PUBLIC as WS_DLL_PUBLIC_NOEXTERN followed by "extern".

Then rename WS_DLL_PUBLIC_NOEXTERN to WS_DLL_PUBLIC_DEF, to clarify that
it's what should be used for definitions; at least on Windows, you
*have* to use it when declaring arrays without a size, and, whilst you
might be able to use WS_DLL_PUBLIC for definitions of functions and
perhaps data definitions other than no-size arrays, it might be clearer
to rename WS_DLL_PUBLIC to WS_DLL_PUBLIC_DECL and use it only for
declarations.

svn path=/trunk/; revision=50334
2013-07-03 01:43:39 +00:00
Chris Maynard b26abebc27 Fix Coverity CID 280618 (Dereference before null check).
#BACKPORT(1.10,1.8)

svn path=/trunk/; revision=50305
2013-07-01 20:25:49 +00:00
Chris Maynard 3f0aefb91e Fix Coverity CID 1035326 (Improper use of negative value) by guarding against tvb_reported_length_remaining() possibly returning -1.
#BACKPORT(1.10,1.8)

svn path=/trunk/; revision=50301
2013-07-01 16:29:17 +00:00
Bill Meier 3f4fb4d56b Define certain 'const char *...' arrays as static.
(That is: Don't create the array on the stack each time
  the function is called).

 Reduces code memory usage and execution time.
 (See SVN #50271)


svn path=/trunk/; revision=50296
2013-07-01 14:40:58 +00:00
Jeff Morriss 7fa41b815c Add a question about whether hf_pn_rt_frag_data should be FT_STRING or FT_BYTES.
svn path=/trunk/; revision=50261
2013-06-30 16:59:58 +00:00
Jeff Morriss c56ea13cdb Link this plugin with libwsutil too (in order to pick up time symbols).
svn path=/trunk/; revision=50155
2013-06-25 22:15:11 +00:00
Chris Maynard ce088c334d makefile.nmake -> Makefile.nmake and minor whitespace (spaces -> tabs) changes.
svn path=/trunk/; revision=50140
2013-06-25 15:32:49 +00:00
Pascal Quantin 24623bdff3 More PDU export work:
- add automatic export of port type when exporting a source / destination port
- add export of SCTP PPID (usefulness to be checked)
- fix some field size

svn path=/trunk/; revision=49989
2013-06-17 21:54:21 +00:00
Michael Mann dffc4fefc6 Batch (some of) the plugins to filterable expert infos. The Profinet plugin started to get a bit complex in determining filter names (especially the DCOM stuff), so I'll leave that to someone more familiar with the protocol.
svn path=/trunk/; revision=49624
2013-05-29 23:41:33 +00:00
Michael Mann 4a1bd75b60 Add a "hidden" array of UAT entry data to allow separation between UAT file syntax errors and "syntactically correct, but invalid field". Now UAT files load all entries into the "hidden" array (raw_data), but only adds valid ones to the user_data, which is used by the dissectors.
This is a start to fixing bug 7471 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7471) and is being committed to get the new ABI/API in before the 1.10 release.
What remains is the "GUI portion" (GTK+qt) to indicate to users which UAT entries are invalid.

svn path=/trunk/; revision=48960
2013-04-22 02:10:49 +00:00
Guy Harris 4b34417a5e Fix FSF address.
svn path=/trunk/; revision=48907
2013-04-18 02:04:18 +00:00
Alexis La Goutte c1b61506d9 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=48898
2013-04-17 19:37:44 +00:00
Evan Huus d0bd2097f0 Fix another dozen or so files with bad FSF addresses as caught by licensecheck.
svn path=/trunk/; revision=48869
2013-04-16 00:00:09 +00:00
Martin Kaiser dbec63309a Coverity CID 280337 Unchecked return value
check the return value of fstat()

svn path=/trunk/; revision=48809
2013-04-10 17:11:51 +00:00
Martin Kaiser 4ab6240b4e Coverity CID 751101: Logically Dead Code
my assumption is that this was a typo
check should be for u8BlockVersionLow>2
there's code to handle u8BlockVersionLow 0, 1 and 2

svn path=/trunk/; revision=48805
2013-04-09 22:28:00 +00:00
Martin Kaiser c51a5e9628 fix indenting
svn path=/trunk/; revision=48804
2013-04-09 22:22:43 +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
Guy Harris a2414d8909 Don't wire into the reassembly code the notion that reassemblies should
be done on flows from one address to another; reassembly for protocols
running atop TCP should be done on flows from one TCP endpoint to
another.

We do this by:

	adding "reassembly table" as a data structure;

	associating hash tables for both in-progress reassemblies and
	completed reassemblies with that data structure (currently, not
	all reassemblies use the latter; they might keep completed
	reassemblies in the first table);

	having functions to create and destroy keys in that table;

	offering standard routines for doing address-based and
	address-and-port-based flow processing, so that dissectors not
	needing their own specialized flow processing can just use them.

This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where
the second YPALL response is processed as if it were a continuation of
a previous response between different endpoints, even though said
response is already reassembled), and also allows the DCE RPC-specific
stuff to be moved out of epan/reassembly.c into the DCE RPC dissector.

svn path=/trunk/; revision=48491
2013-03-22 23:59:54 +00:00
Bill Meier 1f083fd654 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachments #10423,#10424

svn path=/trunk/; revision=48450
2013-03-21 14:29:58 +00:00
Bill Meier 48af69f95f From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10409

svn path=/trunk/; revision=48449
2013-03-21 03:07:23 +00:00
Anders Broman f92bd64966 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48439
2013-03-20 05:59:22 +00:00
Bill Meier 0df5a9390d From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397

svn path=/trunk/; revision=48438
2013-03-20 01:18:10 +00:00
Anders Broman 26ddabf0d7 From Michal Labedzki:
Fix some compilation errors in dumpcap/plugins


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

svn path=/trunk/; revision=48413
2013-03-19 05:09:37 +00:00
Anders Broman 55c498169d From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48400
2013-03-18 21:16:23 +00:00
Anders Broman 84241f46ad From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48399
2013-03-18 20:44:36 +00:00
Balint Reczey 005a83e54f Build easy codec plugin as a DLL
This fixes compilation on Windows.

From Gisle Vanem <gvanem@broadpark.no> with a minor change by me.

svn path=/trunk/; revision=48314
2013-03-15 13:00:51 +00:00
Jaap Keuter 827eb58b04 From David Arnold:
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools.

svn path=/trunk/; revision=48261
2013-03-12 06:53:39 +00:00
Evan Huus 91cec2a12e From Thomas Wiens via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8455
Don't add an extra 16 to offset, we've been updating it as we go. Fixes cases
where valid AMS packets were marked as malformed.

svn path=/trunk/; revision=48215
2013-03-09 13:47:08 +00:00
Pascal Quantin b7e55ff079 ENC_BIG_ENDIAN -> ENC_NA (as found by fix-encoding-args.pl)
svn path=/trunk/; revision=48040
2013-03-03 18:59:20 +00:00
Pascal Quantin 4d63de1b41 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from profinet plugin

svn path=/trunk/; revision=48039
2013-03-03 18:45:23 +00:00
Balint Reczey 1ebdb2e521 Export libwireshark symbols using WS_DLL_PUBLIC define
Also remove old WS_VAR_IMPORT define and related Makefile magic
everywhere in the project.

svn path=/trunk/; revision=47992
2013-03-01 23:53:11 +00:00
Pascal Quantin 323ab76f2d From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from packet-asn1.c

svn path=/trunk/; revision=47984
2013-03-01 19:32:23 +00:00
Pascal Quantin 809c118bee From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from WiMAX plugins

svn path=/trunk/; revision=47978
2013-03-01 19:05:25 +00:00
Guy Harris 6b629c4d92 Move show_exception() and show_reported_bounds_error() to
epan/show_exception.c, as it's used outside
epan/dissectors/packet-frame.c.  Update their callers to include
<epan/show_exception.h> to get their declaration.

Add a CATCH_NONFATAL_ERRORS macro that catches all exceptions that, if
there's more stuff in the packet to dissect after the dissector call
that threw the exception, doesn't mean you shouldn't go ahead and
dissect that stuff.  Use it in all those cases, including ones where
BoundsError was inappropriately being caught (you want those passed up
to the top level, so that the packet is reported as having been cut
short in the capture process).

Add a CATCH_BOUNDS_ERRORS macro that catches all exceptions that
correspond to running past the end of the data for a tvbuff; use it
rather than explicitly catching those exceptions individually, and
rather than just catching all exceptions (the only place that
DissectorError should be caught, for example, is at the top level, so
dissector bugs show up in the protocol tree).

Don't catch and then immediately rethrow exceptions without doing
anything else; just let the exceptions go up to the final catcher.

Use show_exception() to report non-fatal errors, rather than doing it
yourself.
 
If a dissector is called from Lua, catch all non-fatal errors and use
show_exception() to report them rather than catching only
ReportedBoundsError and adding a proto_malformed item.

Don't catch exceptions when constructing a trailer tvbuff in
packet-ieee8023.c - just construct it after the payload has been
dissected, and let whatever exceptions that throws be handled at the top
level.

Avoid some TRY/CATCH/ENDTRY cases by using checks such as
tvb_bytes_exist() before even looking in the tvbuff.

svn path=/trunk/; revision=47924
2013-02-27 22:43:54 +00:00
Bill Meier 96a24cc79f Fix spelling/typos found using a list of commonly misspelled words.
The misspellings were mostly in comments but some were
in text strings visible to the user.


svn path=/trunk/; revision=47899
2013-02-26 04:42:26 +00:00
Bill Meier 63f113d908 it's ==> its & its == > it's as needed.
svn path=/trunk/; revision=47893
2013-02-26 01:30:56 +00:00
Guy Harris 29715ccc8f How can I get a new tvbuff that starts at an offset within a given
tvbuff and runs to the end of the tvbuff?  Let me count the ways....

Replace a bunch of different ways of doing that (some incorrect, in that
they're not properly handling tvbuffs where the captured and reported
lengths are different) with tvb_new_subset_remaining().

svn path=/trunk/; revision=47751
2013-02-19 23:17:07 +00:00
Guy Harris 3b9b52e279 Get rid of an extra blank line.
svn path=/trunk/; revision=47677
2013-02-15 20:10:19 +00:00
Evan Huus f95978cf08 From Hannes Mezger via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8327
Updates to the OPCUA plugin so that subtrees of the dissector select the
appropriate number of bytes. Also fix dissection of the array dimensions
field for matrix values and the highlighting for empty string fields.

svn path=/trunk/; revision=47673
2013-02-15 15:24:39 +00:00
Gilbert Ramirez 486c6d5445 Fix the grammar.h/grammar.c/grammar.lemon dependency so that
grammar.h is not always out of date. Use the same pattern as in the
Makefile.nmake files

svn path=/trunk/; revision=47643
2013-02-12 17:25:28 +00:00
Bill Meier f784806968 Comment out numerous unused hf_.... instances found by checkhf.
svn path=/trunk/; revision=47617
2013-02-10 20:52:21 +00:00
Guy Harris 0a20c5dd91 Add %option noinput to some Flex files, as we aren't using the input()
routine and thus don't need to have it generated - and as it produces
warnings of a routine defined but not used, we don't want to have it
generated.

svn path=/trunk/; revision=47616
2013-02-10 20:21:05 +00:00
Bill Meier af28be3598 Fix a (benign) ERROR: NO ARRAY: opcua/opcua.c, hf_opcua_reassembled_data
svn path=/trunk/; revision=47614
2013-02-10 19:30:37 +00:00
Guy Harris ebacca89a7 Add %option noinput to a bunch of Flex files, as we aren't using the
input() routine and thus don't need to have it generated - and as it
produces warnings of a routine defined but not used, we don't want to
have it generated.

Squelch a casting-const-away warning.

svn path=/trunk/; revision=47613
2013-02-10 19:13:07 +00:00
Bill Meier c2b97dd845 Comment out various unused hf_... instances found by checkhf.
svn path=/trunk/; revision=47607
2013-02-10 16:31:52 +00:00
Bill Meier 9276c4340b Fix ERROR: NO ARRAY: packet-tlv.c, hf_docsis_rcv_mod_enc_ctr_freq_asgn
##Backport 1.6, 1.8


svn path=/trunk/; revision=47605
2013-02-10 16:18:18 +00:00
Guy Harris eca5bd1c65 We *did* fix the APIs used.
svn path=/trunk/; revision=47597
2013-02-09 20:21:37 +00:00
Guy Harris 4824a391e8 Pull the definition of NODIST_HEADER_FILES up into
plugins/Makefile.common.inc.

svn path=/trunk/; revision=47596
2013-02-09 20:15:18 +00:00
Guy Harris 19aa5dbe46 "make maintainer-clean" should nuke all generated files.
svn path=/trunk/; revision=47594
2013-02-09 19:32:31 +00:00
Guy Harris c8af93ea2d Get rid of trailing tabs, make comments more similar.
svn path=/trunk/; revision=47593
2013-02-09 19:30:18 +00:00
Guy Harris ccadade242 Define GENERATED_HEADER_FILES in plugins/Makefile.common.inc.
svn path=/trunk/; revision=47592
2013-02-09 19:20:13 +00:00
Guy Harris 9c4e108387 plugins/Makefile.common.inc defines NODIST_SRC_FILES, and
plugins/mate/Makefile.common includes it, so there's no need to define
it in plugins/mate/Makefile.common.

svn path=/trunk/; revision=47591
2013-02-09 19:15:24 +00:00
Guy Harris df33477429 Define FLEX_GENERATED_SRC_FILES and LEMON_GENERATED_SRC_FILES in
plugins/Makefile.common.inc, and use it in plugins/mate/Makefile.nmake.

svn path=/trunk/; revision=47590
2013-02-09 19:11:14 +00:00
Guy Harris fa596409e0 plugins/Makefile.common.inc should already be defining
GENERATED_SRC_FILES, and plugins/mate/Makefile.common includes it, so it
shouldn't need to define GENERATED_SRC_FILES itself.

svn path=/trunk/; revision=47589
2013-02-09 18:54:27 +00:00
Guy Harris 518e27bc00 The type of the second argument to g_snprintf() is gulong. (It *should*
have been size_t, just as with Boring Old Snprintf; what were they
thinking?)

svn path=/trunk/; revision=47588
2013-02-09 18:41:06 +00:00
Anders Broman 4e4cf2b9a5 Add casts to make it build on win64.
svn path=/trunk/; revision=47587
2013-02-09 17:08:41 +00:00
Anders Broman 3f00e454a5 Try to fix the makefiles to be able to build mate after distclean.
svn path=/trunk/; revision=47586
2013-02-09 16:34:51 +00:00
Evan Huus f07a2b1080 Get rid of a '- i' that appears to have been accidentally inserted in r47581.
i is definitely not initialized at that point (GCC was complaining), and there
seems to be no need to subtract anything from the value in question in the
first place.

svn path=/trunk/; revision=47582
2013-02-09 14:15:11 +00:00
Guy Harris 89d226b733 Get rid of g_sprintf() and strncpy() usage - this is somewhat of a hack,
but this should really be completely rewritten to use the packet-ber.c
routines and to handle strings better (code that handles strings should
not be written in a language that doesn't have a string datatype; that
eliminates C as a possibility, and that's not a bug, that's a
feature...).

svn path=/trunk/; revision=47581
2013-02-09 09:57:05 +00:00
Guy Harris 10e2296c79 The stats_tree plugin doesn't, at present, have anything that looks for
register routines, so there's no plugin.c and hence no plugin.obj.

svn path=/trunk/; revision=47580
2013-02-09 06:09:16 +00:00
Guy Harris e30d2b5001 Make the other plugin makefiles use the new style introduced in the MATE
makefiles.

svn path=/trunk/; revision=47579
2013-02-09 05:31:15 +00:00
Guy Harris a52fedeece Stick NONGENERATED_ in the front of the macros listing non-generated
files.  Define C_FILES and CPP_FILES in Makefile.common.inc to include
*all* C and C++ files, respectively, including generated files.

svn path=/trunk/; revision=47557
2013-02-08 05:31:13 +00:00
Guy Harris ddd4e48890 We don't care what source files are "dissector" source files, we only
need to care whether source files should be scanned for registration
functions.

Reduce the number of macros we define in Makefile.common.inc, getting
rid of some only used internally.

svn path=/trunk/; revision=47556
2013-02-08 04:20:32 +00:00
Guy Harris ec02b35a9c -Werror needs to be applied only to clean files, not to, for example,
Flex-generated files.  Comment it out for now.

svn path=/trunk/; revision=47516
2013-02-06 10:24:50 +00:00
Guy Harris de2db00f04 Add -Werror if enabled.
Sort EXTRA_DIST.

svn path=/trunk/; revision=47515
2013-02-06 09:52:09 +00:00
Guy Harris c0afc1df76 Only remove Flex-generated files with "nmake distclean", not all
generated files.

Remove all generated files with "nmake maintainer-clean".

svn path=/trunk/; revision=47514
2013-02-06 09:51:33 +00:00
Guy Harris a7ae83ff95 Don't bother setting XXX_FILES to empty strings.
svn path=/trunk/; revision=47513
2013-02-06 09:50:38 +00:00
Guy Harris 4c99756f6e strtod() is locale-dependent; use g_ascii_strtod() instead.
If the intent is that floating-point representations be
locale-dependent, change this and somehow arrange that this not fail the
API test.  However, I doubt anybody's actually done anything that uses
this code path, given that...

...it was comparing a value against itself.  Fix it to use op->v.

svn path=/trunk/; revision=47512
2013-02-06 04:37:27 +00:00
Guy Harris 379a400c8f Don't run Lemon-generated header files through checkAPI, either (they
don't have an RCS ID, and they just define a pile of tokens).

svn path=/trunk/; revision=47511
2013-02-06 03:33:45 +00:00
Guy Harris 02433fe7d4 Get rid of extra blank line at the end.
svn path=/trunk/; revision=47510
2013-02-06 03:33:37 +00:00
Guy Harris 91f023174a Lemon-generated files get API warnings as well.
Do, however, run the support files through checkAPI.

svn path=/trunk/; revision=47509
2013-02-06 03:30:02 +00:00
Guy Harris af22672ed7 Do a bit more splitting and combining of file names, so that we can
avoid running the checkAPI stuff on Flex-generated files.

svn path=/trunk/; revision=47506
2013-02-06 02:30:08 +00:00
Guy Harris 39dd49ee2a mate_parser.obj depends on mate_grammar.h, as it's built from
mate_parser.c and mate_parser.c includes mate_grammar.h, so we need to
make sure mate_grammar.h is built before we try to compile
mate_parser.c.  However, mate_parser.obj isn't built by trying to
compile mate_grammar.h, so don't use $? in the $(CC) line, as that will
cause it to try to compile *all* the dependencies.

Add a comment to explain why mate_parser_lex.h depends on mate_parser.c.

svn path=/trunk/; revision=47504
2013-02-05 21:49:43 +00:00
Guy Harris c521263a6b Put NODIST_ at the beginning of macros containing NODIST, paralleling
the nodist_ convention for Automake variables.

Regularize the lists of source files, dividing them according to several
attributes.  Build composite lists in a plugins/Makefile.common.inc
file, to be included by plugin Makefile.common files, and use the
composite lists as appropriate in Makefile.am and Makefile.nmake.

svn path=/trunk/; revision=47502
2013-02-05 21:10:56 +00:00
Guy Harris 618e732f98 Don't forget the .c files that we *don't* distribute.
svn path=/trunk/; revision=47491
2013-02-05 09:11:37 +00:00
Guy Harris 68b610c304 mate_parser.c includes mate_grammar.h, so make mate_parser.obj depend on
mate_grammar.h.

svn path=/trunk/; revision=47490
2013-02-05 09:09:12 +00:00
Guy Harris 9eba2ea90a Don't distribute the results of running Lemon, as we distribute Lemon
ourselves.

Clean up various bits of "distribute" vs. "don't distribute" stuff in
the process - use similar names, and make the "distribute vs. don't
distribute" distinction the same as the "don't clean with "make
distclean" vs. clean with "make distclean"" distinction.

svn path=/trunk/; revision=47485
2013-02-05 06:09:17 +00:00
Gerald Combs 5130da6935 More silent build support.
svn path=/trunk/; revision=47472
2013-02-04 17:49:54 +00:00
Gerald Combs c0ca6220ef Prettify more build output.
svn path=/trunk/; revision=47469
2013-02-04 17:22:32 +00:00
Gerald Combs 8984a38512 Enable more build silence.
svn path=/trunk/; revision=47432
2013-02-01 22:13:43 +00:00
Gerald Combs c97b7912fa Go far enough down a rabbit hole and you will encounter libtool. See
if changing .o to .lo works.

svn path=/trunk/; revision=47430
2013-02-01 20:16:31 +00:00
Gerald Combs 34df2dbe54 Change some "<x>.c : <y>.h" rules to "<x>.o : <y>.h" in order to fix
distcheck. Add some rules recommended by the Automake manual in order
to avoid duplicate actions.

svn path=/trunk/; revision=47429
2013-02-01 18:20:17 +00:00
Gerald Combs 9296fcc310 Fix more dependencies.
svn path=/trunk/; revision=47371
2013-01-30 20:32:44 +00:00
Jaap Keuter f75e904ecc Fix for CID 280529 and 280530.
Check the validity of the TLV before using its retreived data.

svn path=/trunk/; revision=47294
2013-01-26 11:34:55 +00:00