Commit Graph

29 Commits

Author SHA1 Message Date
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
Evan Huus 6df83e8078 Add _g_ to the names of functions that allocate glib memory. This is a bit more
explicit, and frees up the "generic" names (like tvb_memdup) for new signatures
that take the appropriate wmem pool.

Majority of the conversion done with sed.

svn path=/trunk/; revision=52164
2013-09-21 17:04:41 +00:00
Michael Mann 00dd0adc0d expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51851
2013-09-09 00:28:48 +00:00
Alexis La Goutte 467ece42b3 Fix (-W)documentation error found by Clang
../../asn1/c1222/packet-c1222-template.c:348:15: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param pinfo
   ~~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:349:14: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param tree
   ~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:350:16: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param length
   ~~~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:351:16: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param offset
   ~~~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:758:11: error: parameter 'keybuf' not
      found in the function declaration [-Werror,-Wdocumentation]
 * \param keybuf is updated with a copy of the key data if successful lookup.
          ^~~~~~
../../asn1/c1222/packet-c1222-template.c:758:11: note: did you mean 'keybuff'?
 * \param keybuf is updated with a copy of the key data if successful lookup.
          ^~~~~~
          keybuff
../../asn1/c1222/packet-c1222-template.c:879:13: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param tvb
   ~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:880:16: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param offset
   ~~~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:881:13: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param len
   ~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:882:15: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param pinfo
   ~~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:883:14: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param tree
   ~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:1023:13: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param tvb
   ~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:1024:15: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param pinfo
   ~~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:1025:14: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param tree
   ~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:1047:15: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param pinfo
   ~~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:1048:13: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param tvb
   ~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:1049:16: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param offset
   ~~~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:1068:13: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param tvb
   ~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:1069:15: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param pinfo
   ~~~~~~~~~~~^
../../asn1/c1222/packet-c1222-template.c:1070:14: error: empty paragraph passed
      to '\param' command [-Werror,-Wdocumentation]
 * \param tree
   ~~~~~~~~~~^

svn path=/trunk/; revision=51272
2013-08-10 21:30:38 +00:00
Jeff Morriss 2df54da6e2 Move a bunch of the crypt modules and pint.h into wsutil.
This means wsutil now links against libcrypt.

Protect a bunch of the crypt header files from multiple inclusion.

svn path=/trunk/; revision=51100
2013-08-01 23:34:47 +00:00
Guy Harris b2475c1c29 Squelch some warnings that show up with, for example, the GCC 4.2.1 that
comes with Xcode 3.2.6 (it's not a real problem, but that requires more
flow analysis than that version of the compiler does, apparently).

svn path=/trunk/; revision=50419
2013-07-06 19:34:21 +00:00
Michael Mann 225698ef0b Fix display filter errors caught by checkfiltername.pl
svn path=/trunk/; revision=50399
2013-07-06 02:53:45 +00:00
Pascal Quantin 1bb2081fd2 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8746 :
Add procedure numbers to C12.22 dissection

svn path=/trunk/; revision=49775
2013-06-04 20:21:17 +00:00
Jeff Morriss 29d51623c2 From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8762 :
Remove dead code (condition can never happen).

svn path=/trunk/; revision=49743
2013-06-04 01:38:53 +00:00
Michael Mann 7fe5422c4b Convert ASN.1 dissectors to use filterable expert info.
NOTE: Kerberos ASN.1 template was updated, but not generated to source.

svn path=/trunk/; revision=49707
2013-06-03 03:42:36 +00:00
Pascal Quantin c553280339 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8745 :
Upgrade AP-title ASN.1 description

svn path=/trunk/; revision=49684
2013-06-01 23:10:37 +00:00
Pascal Quantin c310bd7dcc Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8744 :
Display C12.22 Invocation Id as unsigned integer

svn path=/trunk/; revision=49682
2013-06-01 20:51:14 +00:00
Pascal Quantin 0ee4d0a00a Postfix FT_NONE fields with "_element" string to reduce number of incompatible filters in ASN.1 dissectors
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2402

svn path=/trunk/; revision=49599
2013-05-27 20:26:49 +00:00
Anders Broman e9f90d8c42 Make C12.22 work over UDP.
svn path=/trunk/; revision=49104
2013-05-01 08:34:40 +00:00
Pascal Quantin a37c044203 Update the ASN.1 based dissectors following the changes done in r48812
svn path=/trunk/; revision=48820
2013-04-11 18:14:53 +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
Michael Mann fd44f9a339 Remove C++ incompatibilities in c1222 dissector.
Also addresses an implicit cast in the epan/uat.h file

Bug 8342 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8342)

svn path=/trunk/; revision=47721
2013-02-17 22:15:16 +00:00
Jakub Zawadzki 7a9d27c33f Regenerate asn.1 dissectors.
svn path=/trunk/; revision=45110
2012-09-24 19:38:46 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Chris Maynard a592bd657c tvb_length_remaining() can return -1, so don't assign its return value to an unsigned integer. Fixes Coverity CID 281367: Improper use of negative value.
svn path=/trunk/; revision=43698
2012-07-13 21:03:54 +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
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
Chris Maynard 8fd9342f7d tvb_length_remaining() can return a negative number, so be sure to handle it. Fixes Coverity CID 281367.
svn path=/trunk/; revision=42840
2012-05-25 00:29:46 +00:00
Guy Harris 25917db46e Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_bitmask() calls.

svn path=/trunk/; revision=42568
2012-05-11 08:10:42 +00:00
Guy Harris 6eaf0037f8 Get rid of remaining Booleans-as-encoding-arguments in
proto_tree_add_item() calls.

svn path=/trunk/; revision=42477
2012-05-07 18:06:47 +00:00
Stig Bjørlykke 1301b98e25 Use _U_ for unused arguments.
svn path=/trunk/; revision=41478
2012-03-11 12:00:00 +00:00
Alexis La Goutte 7857dc50fb Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41299
2012-03-02 11:02:02 +00:00
Jörg Mayer de0bf160b9 The warning fix overdid things: It removed functionality.
Now I only remove the variable ft and everything looks good.

svn path=/trunk/; revision=40516
2012-01-15 17:07:55 +00:00
Jörg Mayer 6197143d6c Ed Beroset <beroset@mindspring.com> via bug 5531
The ANSI C12.22 protocol is a smart grid protocol for utility meters, including
gas, water and electric.  The dissector implemented in the patch file includes
full support for all EPSEM (Extended Protocol Specification for Electricity
Metering) services and includes a full implementation of the C12.22 security
modes.

[...]

To decrypt the attached sample file, you need to set up the key table in the
preferences to include key 0 with a value of 6624C7E23034E4036FE5CB3A8B5DAB44.

Me: Fixes for:

[ 64%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-c1222.c.o            
../../asn1/c1222/packet-c1222-template.c: In function ‘dissect_epsem’:                   
../../asn1/c1222/packet-c1222-template.c:860:15: error: variable ‘ft’ set but not used [-Werror=unused-but-set-variable]

[  5%] Building C object epan/CMakeFiles/epan.dir/dissectors/packet-c1222.c.o
../../asn1/c1222/packet-c1222-template.c:103:19: error: ‘c1222_flags’ defined but not used [-Werror=unused-variable]



svn path=/trunk/; revision=40500
2012-01-14 15:22:10 +00:00