Commit Graph

1817 Commits

Author SHA1 Message Date
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