Commit Graph

2043 Commits

Author SHA1 Message Date
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
Michael Mann 8a18cb574b guint16 needed to prevent rollover. Bug 8199 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8199)
#BACKPORT

svn path=/trunk/; revision=47045
2013-01-13 02:03:55 +00:00
Michael Mann 86d690880f replace "unsigned" datatype with "guint". Some mpeg files needed "unsigned int" instead.
bugs 7825-7827 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7825)

svn path=/trunk/; revision=46928
2013-01-04 05:22:43 +00:00
Guy Harris 3dfac15921 Another 64-bit-to-32-bit warning on 32-bit platforms.
svn path=/trunk/; revision=46781
2012-12-26 12:28:40 +00:00
Guy Harris ef175a2208 Squelch some more discarding-qualifiers warnings.
svn path=/trunk/; revision=46770
2012-12-26 11:24:39 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
sizeof.

Cast away some implicit 64-bit-to-32-bit conversion errors due to use of
strtol() and strtoul().

Change some data types to avoid those implicit conversion warnings.

When assigning a constant to a float, make sure the constant isn't a
double, by appending "f" to the constant.

Constify a bunch of variables, parameters, and return values to
eliminate warnings due to strings being given const qualifiers.  Cast
away those warnings in some cases where an API we don't control forces
us to do so.

Enable a bunch of additional warnings by default.  Note why at least
some of the other warnings aren't enabled.

randpkt.c and text2pcap.c are used to build programs, so they don't need
to be in EXTRA_DIST.

If the user specifies --enable-warnings-as-errors, add -Werror *even if
the user specified --enable-extra-gcc-flags; assume they know what
they're doing and are willing to have the compile fail due to the extra
GCC warnings being treated as errors.

svn path=/trunk/; revision=46748
2012-12-26 05:57:06 +00:00
Bill Meier 5a8c275b26 General cleanup:
- Localize some variables; remove unneeded initializers;
- Reformat some hf[] entries;
- Whitespace; style; long lines.

svn path=/trunk/; revision=46529
2012-12-13 18:17:47 +00:00
Bill Meier e790f93057 Remove some commented out code as per Wido Kelling:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8002#c9

svn path=/trunk/; revision=46527
2012-12-13 16:27:40 +00:00
Bill Meier 53eccd2b40 General cleanup:
- Don't call expert...() under 'if (tree)';
- Make some functions static;
- Localize some variables; remove some uneeded initializers;
- Reformat some hf[] entries;
- Do whitespace fixes (including "4 space tabs").

svn path=/trunk/; revision=46523
2012-12-12 21:40:35 +00:00
Bill Meier 708e463c47 From Wido Kelling: [Profinet] Updated disecction regarding the IEC 61158
(with a few minor fixes by me).

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

major change:
 reassembling of PNIO fragments (only works if OpenSafty dissector is disabled)

minor changes:
 improved handling of DFP Frames

added / updated
 MRP Block decoding
 ARServerBlock
 ARVendorBlock
 PDInterfaceDataReal
 PDInterfaceAdjust
 PDPortStatistic
 SubdirFrameData corrected display and subblocks added
 PDIRGlobalData complete dissection
 decoding of FrameDataProperties and ARTypes updated to conform the STD
 removed now usuported RTC2 ranges


svn path=/trunk/; revision=46522
2012-12-12 18:47:59 +00:00
Bill Meier a4128c56b9 General cleanup:
- Use/create extended value strings as appropriate;
- Reformat hf[] entries;
- Do whitespace, & etc changes to use a consistent formatting style;
- Reformat some long lines;
- Localize some variables; remove some unneeded initializers;
- expert...() shouldnt be called under 'if (tree)' (packet-wimaxasncp);
- Move proto_register...() & etc to the end of the file (packet-ieee80211);
- Misc.

svn path=/trunk/; revision=46489
2012-12-10 14:50:32 +00:00
Anders Broman 8f3f87a931 Bump revission.
svn path=/trunk/; revision=46447
2012-12-07 19:15:34 +00:00
Anders Broman 5505655199 From hannes:
'Fix for displaying the payload of the first chunk correctly.

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

svn path=/trunk/; revision=46445
2012-12-07 16:57:14 +00:00
Anders Broman e7c9ade670 From hannes:
Enable the plugin to detect and reassemble chunked UA messages for displaying them correctly.

From me:
- Partly applied by hand.
- move hf and ett asignments inseide the register routine as per convention.

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

svn path=/trunk/; revision=46436
2012-12-07 09:33:40 +00:00
Bill Meier 7cd0417af5 Fix numerous instances of a variable/parameter name "shadowing" a library function name;
(At least some (gcc ?) compilers give a "shadow" warning for these).

svn path=/trunk/; revision=46402
2012-12-05 15:56:36 +00:00
Jeff Morriss 366fe213a2 Add a checkapi target.
svn path=/trunk/; revision=46296
2012-11-29 21:44:38 +00:00
Bill Meier 0a94d24771 Fix several [-Wshadow] warnings.
svn path=/trunk/; revision=46287
2012-11-29 16:22:54 +00:00
Bill Meier 40a2218110 Fix [-Wshadow] warning;
Also:
 - remove some uneeded variable initializers;
 - reformat some long lines;
 - do some whitespace and formatting changes to use a consistent style.

svn path=/trunk/; revision=46272
2012-11-28 23:53:25 +00:00
Alexis La Goutte cf50d93510 Fix :
CMake Warning (dev) at CMakeLists.txt:476 (add_subdirectory):
  The source directory

    /home/wireshark/plugins/wimaxmacphy

  does not contain a CMakeLists.txt file.

  CMake does not support this case but it used to work accidentally and is
  being allowed for compatibility.

  Policy CMP0014 is not set: Input directories must have CMakeLists.txt.  Run
  "cmake --help-policy CMP0014" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

svn path=/trunk/; revision=46267
2012-11-28 22:50:33 +00:00
Anders Broman fa4c9734ea Revert http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=46140
looks like the worong variables may be used in the for loops.

../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_PDInterfaceMrpDataAdjust_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:4420:12: warning: variable 'u8MrpInstance' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_PDInterfaceMrpDataReal_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:4542:5: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
../../../plugins/profinet/packet-dcerpc-pn-io.c:4491:12: warning: variable 'u8MrpInstance' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_PDInterfaceMrpDataCheck_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:4570:12: warning: variable 'u8MrpInstance' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_MrpInstanceDataCheck_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:5426:160: error: unused parameter 'u16BodyLength' [-Werror=unused-parameter]
../../../plugins/profinet/packet-dcerpc-pn-io.c: In function 'dissect_ARBlockReq_block':
../../../plugins/profinet/packet-dcerpc-pn-io.c:6873:9: error: format '%x' expects a matching 'unsigned int' argument [-Werror=format]
../../../plugins/profinet/packet-dcerpc-pn-io.c:6811:13: warning: variable 'u16ARDevAccess' set but not used [-Wunused-but-set-variable]
../../../plugins/profinet/packet-dcerpc-pn-io.c: At top level:
../../../plugins/profinet/packet-dcerpc-pn-io.c:7628:1: error: 'dissect_IRTFrameBlock_block' defined but not used [-Werror=unused-function]
cc1: all warnings being treated as errors

svn path=/trunk/; revision=46142
2012-11-22 12:45:50 +00:00
Anders Broman 79974a41b0 From Wido Kelling:
Updates to conform IEC 61158.
major change:
reassembling of PNIO fragments (only works if OpenSafty dissector is disabled)
see Bug 7997

minor changes:
improved handling of DFP Frames

added / updated 
MRP Block decoding
ARServerBlock
ARVendorBlock
PDInterfaceDataReal
PDInterfaceAdjust
PDPortStatistic
SubdirFrameData corrected display and subblocks added
PDIRGlobalData complete dissection 
decoding of FrameDataProperties and ARTypes updated to conform the STD
removed now usuported RTC2 ranges

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

svn path=/trunk/; revision=46140
2012-11-22 12:12:12 +00:00
Michael Mann 4b0a6ca955 Add CRC verification to Modbus RTU dissector. CRC algorithm is the same as the "crc16-plain" with a different initial CRC (0xFFFF instead of 0). Created crc16_plain_tvb_offset_seed to "replace" crc16_plain_tvb_offset, but didn't remove crc16_plain_tvb_offset for backwards compatibility worries. Updated only dissector that used crc16_plain_tvb_offset (profinet/packet-pn-rt.c) to use crc16_plain_tvb_offset_seed(..., 0)
svn path=/trunk/; revision=45854
2012-10-31 20:09:05 +00:00
Evan Huus 361aedec1f Create SET_ADDRESS_HF that takes an additional hf_ value that can be
used to override the filter generated from the address column.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728 (again).

svn path=/trunk/; revision=45792
2012-10-26 01:59:17 +00:00
Evan Huus c6b522bc70 Revert revision 44921.
See discussion on https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728

svn path=/trunk/; revision=45791
2012-10-26 00:42:34 +00:00
Guy Harris 5ba1ad12cc Based on patch from Bill Parker, check for ws_fopen() failing.
The rest of the code already checks for namelist being null, so it's OK
to call build_tree_view() - and it may be necessary to do so, as the
code below might assume that's worked.

However, we should not call fclose() on namelist if it's null; the C89
standard, at least, does *not* assert that fclose(NULL) is a no-op.

Clean up indentation a little bit.

Last part of fix for bug 7824.

svn path=/trunk/; revision=45455
2012-10-10 19:50:37 +00:00
Alexis La Goutte 26f28b0427 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=45219
2012-09-30 11:06:28 +00:00
Alexis La Goutte 84f7a07047 From Yu Zhang via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7769
Add Dissector for SuboptionDeviceInstance under DevicePropertiesOption in PROFINET DCP

In PROFINET DCP dissector, current build didn't have SuboptionDeviceInstance
(0x07) under DevicePropertiesOption (0x02). This patch add the support of
SuboptionDeviceInstance

svn path=/trunk/; revision=45218
2012-09-30 11:02:56 +00:00
Michael Mann 8dcfa4214c replace unnecessary decode_numeric_bitfield calls
svn path=/trunk/; revision=45154
2012-09-26 18:33:10 +00:00
Jaap Keuter d249038a65 Implement and document the Custom plugin system. Create relevant example files and add them to the distribution. Rewrite README.plugins to describe how to use this system.
svn path=/trunk/; revision=45142
2012-09-25 21:02:13 +00:00
Jakub Zawadzki 72ca9d0e61 Store pointers to previously displayed and captured packet, not nstime_t deltas.
This commit reduces size (from 144B to 128B on AMD64) of frame_data structure.

Part of bug 5821: Reduce per-packet memory requirements.

svn path=/trunk/; revision=45071
2012-09-23 16:25:28 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Evan Huus 826bba705b From Pontus Fuchs via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7728
Make right-click + apply-as-filter work in the packet list for non-ethernet
frames (such as ieee 802.11 frames).

svn path=/trunk/; revision=44921
2012-09-15 20:16:14 +00:00
Jakub Zawadzki dee4443809 Add data parameter to dissector_try_heuristic
svn path=/trunk/; revision=44871
2012-09-11 08:26:48 +00:00
Jakub Zawadzki 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Bill Meier 0fbdec6d83 Fix a trivial typo.
svn path=/trunk/; revision=44660
2012-08-24 20:56:23 +00:00
Jörg Mayer b43901043a Remove commented out rules
Whitespace fixes

svn path=/trunk/; revision=44629
2012-08-23 10:34:45 +00:00
Chris Maynard b1aba30a79 Fix Coverity CID's 712344-712345: Unused pointer value.
svn path=/trunk/; revision=44135
2012-07-30 13:24:27 +00:00
Jörg Mayer 3bfda44ae0 Fix two "set but unused variable" warnings turning errors:
- Comment out hdrbits, it's retrieved but not used (slightly different
  approach to overwritten patch)
- Change two instances of pt to tree as this *may* have been
  the intention

svn path=/trunk/; revision=44061
2012-07-27 07:23:01 +00:00
Anders Broman fc192f4c57 Remove unused variable, use the created subtree. Found by buildbot.
svn path=/trunk/; revision=44059
2012-07-27 07:12:55 +00:00
Jeff Morriss 0183bd93fc You can't (well, shouldn't) reference and modify a given variable multiple
times in one C statement: the order of references and modifications is
undefined.  Anyway I don't think the modification is intentional: just divide
instead of divide-and-assign.

Also remove what looks to be some test code (only executed for frame number
11).

svn path=/trunk/; revision=44056
2012-07-26 20:57:42 +00:00
Michael Mann 44aabbdf14 Converted many proto_tree_add_text -> proto_tree_add_item (or at least something that's filterable). since Gryphon is used as the flagship example for plugins, I don't want developers to get the impression proto_tree_add_text is the way to add fields in Wireshark. Hopefully this will reduce the number of dissectors submitted with too many proto_tree_add_text()s.
svn path=/trunk/; revision=44055
2012-07-26 20:14:53 +00:00
Bill Meier b53d5078d9 - Call dissector_add-handle() so protocol is
available under UDP 'decode as';
- Back out use of extended value strings (added in SVN #43942);
   'tshark -G values' on Windows gives a warning as
   to 'Invalid value_string_ext ptr'.
   Issue: On Windows, value_string_ext validation code always
         fails for extended value strings in plugins.
         (Something todo with the linkage mechanism).

svn path=/trunk/; revision=44011
2012-07-25 20:37:47 +00:00
Bill Meier 4b9a0b0767 Cleanup:
- don't call col_...() and expert...() fcns under 'if (tree)';
- create/use extended value strings in a few cases;
- use val_to_str_ext_const();
- Don't increment offset if not used afterwards [set but unused];
- do whitespace cleanup (indentation, trailing, ...).


svn path=/trunk/; revision=43942
2012-07-23 18:17:38 +00:00
Jörg Mayer 26cbfc1be1 Fix a bit too much copy paste
svn path=/trunk/; revision=43853
2012-07-20 11:04:18 +00:00
Jörg Mayer 1cedb69de7 Add missing CMakeLists.txt
svn path=/trunk/; revision=43851
2012-07-20 10:33:21 +00:00
Pascal Quantin 8b883f5d9f Add SVN eol-style and keywords properties
svn path=/trunk/; revision=43848
2012-07-20 05:46:45 +00:00
Evan Huus 99f7759357 Fix some misplaced tree items, as caught by cppcheck (as unused variables).
svn path=/trunk/; revision=43845
2012-07-20 01:55:26 +00:00
Michael Mann 1ec2f43f2c WiMAX OFDMA PHY SAP dissector plugin (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2695)
svn path=/trunk/; revision=43844
2012-07-20 01:21:27 +00:00
Stephen Fisher a3d1900fbd Fix compilation error seen with gcc on Unix:
pinfo_stats_tree.c:234:2: error: no newline at end of file


svn path=/trunk/; revision=43755
2012-07-16 18:07:08 +00:00
Anders Broman 5d9d9b8221 From Wonil Kim: Enable statistics menu register for the tap plug-in. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7466
svn path=/trunk/; revision=43726
2012-07-15 16:24:35 +00:00
Anders Broman 1ae38887b6 From Evan Huus:
Grab-bag of unused variables.

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

svn path=/trunk/; revision=43616
2012-07-09 01:49:02 +00:00
Guy Harris 659cf0527a UATs could be put into "categories". The categories were defined only
implicitly by the #define name and string they were defined to; not all
UATs neatly fit into any of the categories, so some of them were put
into categories that weren't obviously correct for them, and one - the
display filter macro UAT - wasn't put into any category at all (which
caused crashes when editing them, as the GUI code that handled UAT
changes from a dialog assumed the category field was non-null).

The category was, in practice, used only to decide, in the
aforementioned GUI code, whether the packet summary pane needed to be
updated or not.  It also offered no option of "don't update the packet
summary pane *and* don't redissect anything", which is what would be
appropriate for the display filter macro UAT.

Replace the category with a set of fields indicating what the UAT
affects; we currently offer "dissection", which applies to most UATs
(any UAT in libwireshark presumably affects dissection at a minimum) and
"the set of named fields that exist".  Changing any UAT that affects
dissection requires a redissection; changing any UAT that affects the
set of named fields that exist requires a redissection *and* rebuilding
the packet summary pane.

Perhaps we also need "filtering", so that if you change a display filter
macro, we re-filter, in case the display is currently filtered with a
display filter that uses a macro that changed.

svn path=/trunk/; revision=43603
2012-07-08 01:00:46 +00:00
Guy Harris 85f219be2e From Michael Mann:
Add a preference for the packet length statistics.

Fixes bug 3239.

svn path=/trunk/; revision=43597
2012-07-07 08:15:41 +00:00
Pascal Quantin a0c01750b8 From Guy Martin via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7439 :
Add support for DOCSIS 3.0 AES keys

svn path=/trunk/; revision=43573
2012-07-05 19:10:46 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Jeff Morriss 4fdc3c3cc2 Create, and start using, file name preferences.
File name preferences are basically just string preferences except that the
GUI will present a "Browse" button that allows the user to go and find the
file s/he wants (rather than having to blindly type in the full path).

svn path=/trunk/; revision=43228
2012-06-13 01:13:12 +00:00
Bill Meier 128c4266a0 Attempt to fix display of "eoe macfilter header".
Among other things: fix incorrect 'display' value in several hf[] entries.
(See XXX coments in source for further details).
Attempt to fix use of incorrect value in hf[] entry 'display' fields


svn path=/trunk/; revision=43149
2012-06-07 20:16:28 +00:00
Jeff Morriss 8204b904b3 Fix Coverity 702421: Handle the possibility that fvalue_to_string_repr()
may return NULL.

svn path=/trunk/; revision=43114
2012-06-05 15:20:31 +00:00
Alexis La Goutte 7174762b51 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=43088
2012-06-04 22:25:10 +00:00
Pascal Quantin 797b83c838 From Martin Kaiser via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7322 :
Add a missing break in packet-bpkmattr.c (CID 280484)

svn path=/trunk/; revision=43007
2012-06-02 19:15:07 +00:00
Guy Harris 533f70aca2 No more GIOP plugins, so get rid of the directory for the former plugins.
svn path=/trunk/; revision=42978
2012-06-01 17:08:32 +00:00
Anders Broman ffec8d8a78 Make packet-coseventcomm.c a bultin dissector
svn path=/trunk/; revision=42976
2012-06-01 15:58:30 +00:00
Anders Broman a8e8234831 Make packet-coseventcomm.c a bultin dissector
svn path=/trunk/; revision=42974
2012-06-01 15:57:05 +00:00
Bill Meier 3d4b3f2784 Set Makefile.common as a plugin.c dependency so plugin.c is rebuilt if Makefile.common is changed
svn path=/trunk/; revision=42972
2012-06-01 14:44:35 +00:00
Bill Meier 1caa79ad80 Windows: Set Makefile.common as a plugin.c dependency so plugin.c is rebuilt if Makefile.common is changed
ToDo: ditto for Makefile.am ?

svn path=/trunk/; revision=42971
2012-06-01 14:08:12 +00:00
Anders Broman c8625796f1 Make the cosnaming dissector a builtin dissector.
svn path=/trunk/; revision=42968
2012-06-01 12:27:04 +00:00
Anders Broman b42bbc2cd6 Make the tango dissector a builtin dissector.
svn path=/trunk/; revision=42967
2012-06-01 10:31:34 +00:00
Anders Broman 5959f75518 parlay changes to Cmake
svn path=/trunk/; revision=42965
2012-06-01 09:04:28 +00:00
Anders Broman 5ef6c6d08a Make the parlay dissector a buil tin dissector.
svn path=/trunk/; revision=42964
2012-06-01 08:48:31 +00:00
Anders Broman d98be8ecf6 Dissable -Werror
svn path=/trunk/; revision=42928
2012-05-30 20:51:36 +00:00
Anders Broman 224daf8cd4 Forgot to change the name to giop
svn path=/trunk/; revision=42927
2012-05-30 19:51:54 +00:00
Anders Broman d8b0471ded Add files to use 'new plugin build style'
svn path=/trunk/; revision=42924
2012-05-30 19:01:29 +00:00
Bill Meier 78a170a506 Cleanup whitespace;
Reformat hf[] entries.

svn path=/trunk/; revision=42748
2012-05-21 16:12:56 +00:00
Bill Meier a729320b0a Init some variables to prevent scan-build "Function call argument is an uninitialized value" messages.
(Not actually a bug due to the way the code works ?)

svn path=/trunk/; revision=42747
2012-05-21 15:56:26 +00:00
Guy Harris 944ae5ae49 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42590
2012-05-11 20:02:52 +00:00
Guy Harris 0adedfaaee Show m2m.fch_burst_tlv_value in decimal.
svn path=/trunk/; revision=42589
2012-05-11 19:53:43 +00:00
Guy Harris 0fb9759eec Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

Add hf[] entries for some fields that didn't have them.

svn path=/trunk/; revision=42588
2012-05-11 19:27:59 +00:00
Guy Harris 4217008691 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42587
2012-05-11 19:22:25 +00:00
Guy Harris 90f564717f Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

Clean up indentation.

svn path=/trunk/; revision=42586
2012-05-11 19:20:23 +00:00
Guy Harris 7962b11c0f Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

Also, fix the type of what appears to be a 24-bit integral field
(cut-and-pasteo?).

svn path=/trunk/; revision=42585
2012-05-11 19:08:31 +00:00
Guy Harris 774028e5fc Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42584
2012-05-11 18:57:51 +00:00
Guy Harris 0e1de63173 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42583
2012-05-11 18:54:32 +00:00
Guy Harris ccb24a5ab7 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42582
2012-05-11 18:52:36 +00:00
Gerald Combs dedd0eadd0 Better fixes for the last commit.
svn path=/trunk/; revision=42529
2012-05-10 00:21:40 +00:00
Gerald Combs 4d30e72575 Fix a few scan-build warnings.
svn path=/trunk/; revision=42528
2012-05-09 23:08:47 +00:00
Bill Meier 1783543e92 AFAICT '#include sys/types.h' is not needed for these files.
svn path=/trunk/; revision=42446
2012-05-05 21:29:13 +00:00
pascal 48f4ae6e3b From Nhi Nguyen:
OPC UA bytestring node id decoding is wrong
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7226

svn path=/trunk/; revision=42437
2012-05-05 04:57:40 +00:00
Anders Broman 2311c797b2 From Gabor Somlai:
Decoding DOCSIS 3.0 Isolation DATA frames (FC_TYPE=10).

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

svn path=/trunk/; revision=42382
2012-05-02 10:49:03 +00:00
Guy Harris 66ee0608c7 The message length isn't needed in cmd_sched_rep() - it's just the
containing packet length, so if we go past it, we'll get an exception
thrown.  Get rid of it.

The answer to "Should msglen be returned instead of offset?" is "no" -
the command dissectors return the new offset.

Get rid of an unused - and unnecessary - variable.

svn path=/trunk/; revision=42367
2012-04-30 23:03:51 +00:00
Gerald Combs c40f94895d Fix a couple of clang warnings and adjust capitalization.
svn path=/trunk/; revision=42358
2012-04-30 20:15:46 +00:00
Chris Maynard 7655cb2f5a Initialize u32RecDataLen to 0 to avoid a clang warning and in the event it never gets initialized in either dissect_IODWriteReqHeader_block() or dissect_IODReadReqHeader_block().
svn path=/trunk/; revision=42325
2012-04-28 18:50:20 +00:00
Jeff Morriss 6aa32cb03a As suggested in http://www.wireshark.org/lists/wireshark-dev/201204/msg00062.html :
Don't use ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN with ENC_ASCII: ASCII has no
endianism, so ENC_NA is more appropriate.

svn path=/trunk/; revision=42300
2012-04-27 19:45:35 +00:00
Anders Broman 8a4268505b Fix Malformed packet AMS for Read Device Info Read State Request.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6710

check if data exists.

svn path=/trunk/; revision=42292
2012-04-27 14:13:06 +00:00
Jakub Zawadzki aec21991ec Fix value of "Error in Parameter API"
References: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3753#c3

svn path=/trunk/; revision=42285
2012-04-27 08:41:44 +00:00
Jakub Zawadzki 8a1dc57c03 Remove doubled semicolons and semicolons outside function.
svn path=/trunk/; revision=42053
2012-04-13 20:22:31 +00:00
Anders Broman b1b0af6e66 From Pascal Quantin:
Fix Bug 6793  Some WiMAX messages decoded incorrectly

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

svn path=/trunk/; revision=42045
2012-04-13 13:02:57 +00:00
Jakub Zawadzki 8fca2eb7e5 Add missing consts.
svn path=/trunk/; revision=42004
2012-04-10 10:20:20 +00:00
Jakub Zawadzki a3aa2b7d7c Add missing consts in opcua plugin.
svn path=/trunk/; revision=42000
2012-04-09 20:06:27 +00:00
Jeff Morriss 75c3c92f19 Add a "-build" argument to checkAPIs.pl. Use that argument when building
from makefiles (and thus from the buildbot).

The intention is to be able to tell when a human is running the tool so we
can provide more code-review guidance.

As a starter, enable the "too many proto_tree_add_text() calls" check when
a human is running the tool.

svn path=/trunk/; revision=41943
2012-04-04 20:46:49 +00:00
Stig Bjørlykke 1fd4eaaa88 Removed unused pdu_length in pdu_burst_decoder to avoid a warning from clang.
svn path=/trunk/; revision=41794
2012-03-27 06:57:39 +00:00