Commit graph

198 commits

Author SHA1 Message Date
Guy Harris
050bc7d100 Update some comments to reflect reality.
Get rid of references to ep_ and se_ allocation in code that now uses
wmem allocation instead.

Fix API documentation of conversation_table.h routines to reflect that
as well - some APIs changed to pass wmem scopes.

Also, zbee_sec_key_hash() now takes the output buffer as an argument and
just returns it, and nobody actually uses the return value, so change it
to return void.

Change-Id: Ife1ec675a9322fd0f0be306a9d639ec17aad1c7a
Reviewed-on: https://code.wireshark.org/review/6636
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-18 21:02:40 +00:00
Michael Mann
64a7bac641 tvb_bytes_to_ep_str -> tvb_bytes_to_str
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4
Reviewed-on: https://code.wireshark.org/review/6371
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-07 18:16:23 +00:00
Alexis La Goutte
fa0ebfcae0 BACAPP: fix empty paragraph passed to '@param' command [-Wdocumentation]
Change-Id: Ibef3cee6930dea08fc7a87635c48de609d3d4015
Reviewed-on: https://code.wireshark.org/review/6299
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-04 13:54:07 +00:00
Alexis La Goutte
5248c0df21 Fix unknown command tag name [-Wdocumentation-unknown-command]
Change-Id: I6c2564a86e13d9321001856ba1f51681a9f20976
Reviewed-on: https://code.wireshark.org/review/5979
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-12-22 15:24:28 +00:00
Bill Meier
b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Steve Karg
a919566091 BACnet: fix dissection of exception-schedule property.
The exception schedule special-event disection already used matched
open-close tags and only needed to check for an unmatched close tag
to exit when used with ReadPropertyMultiple service.

Bug: 10691
Change-Id: I54f2f6f3f470138a6a88f84c62fd15b07ea74c37
Reviewed-on: https://code.wireshark.org/review/5593
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-04 09:06:29 +00:00
desolat
7469faba5e BACAPP: fix dissection of event parameters for event notifications of Event_Type Change_of_Status_Flags
Implementation for this event parameter type was missing

Bug: 9626
Change-Id: Iea0bc819858bbf5660d97cfd0c418a963ac149fb
Reviewed-on: https://code.wireshark.org/review/5228
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-11 05:17:15 +00:00
desolat
ae61a41e57 BACAPP: fix dissection of event parameters for event notifications of Event_Type Change_of_Characterstring
Implementation for this event parameter type was missing

Bug: 9625
Change-Id: I575d387ec4764fa1ecd365624d13e3f41e2473c6
Reviewed-on: https://code.wireshark.org/review/5189
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-11-08 20:52:22 +00:00
Anish Bhatt
1c51075376 [BACnet][trivial] change strings as per Bug 9640
Change-Id: I542b5a96bcff6c779359b80ddce513524852272c
Reviewed-on: https://code.wireshark.org/review/4572
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-09 07:49:55 +00:00
Anish Bhatt
f31836dbaf [bacnet] update vendors list, fix whitespace issues, all generated via script
Change-Id: Ieb4b169dfcf5e89b7b2a2cb90b6572a3d973d744
Reviewed-on: https://code.wireshark.org/review/4519
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-08 02:51:54 +00:00
Anish Bhatt
04bca658f9 [bacnet] update vendor list
Change-Id: I6b7bd3b3a110b8d393cd849c12890fff17446e54
Reviewed-on: https://code.wireshark.org/review/4515
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-07 06:44:43 +00:00
Guy Harris
79fcc6a1a3 Squelch some compiler warnings.
Change-Id: Ie39c7b0c1fef8f862cec016a3a1a5bd1451a3df2
Reviewed-on: https://code.wireshark.org/review/2905
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 23:49:04 +00:00
Guy Harris
6896def6da Get rid of some unused variables.
Change-Id: I2a806af639e5f0519ba93b0048ec7a4624fa33fc
Reviewed-on: https://code.wireshark.org/review/2567
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 21:49:26 +00:00
Michael Mann
188aa9a80e convert to proto_tree_add_subtree[_format]
Change-Id: Ib60ca75b7da8cfa21cfe2999c9b9448a02c332df
Reviewed-on: https://code.wireshark.org/review/2560
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-22 21:07:16 +00:00
Guy Harris
46ecf18fbd Use address_to_str(NULL, ...) for strings allocated outside dissectors.
ep_address_to_str() doesn't crash if called outside packet scope, but
it's still not correct to use outside packet scope.  Use
address_to_str(NULL, ...) to allocate those strings, and then explicitly
free them when we're done; exceptions don't get thrown between the
allocate and free, so there's no risk of a leak.

Change-Id: Iea2af93b0757e648d399e2ba64249224eb7e9e3c
Reviewed-on: https://code.wireshark.org/review/2438
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-19 18:58:49 +00:00
Michael Mann
b0bc4d5535 Revert "Fixup: ep_address_to_str -> address_to_str"
Most (all?) of these functions are being called within GUI, so they can't have packet_scope, which is why they weren't already converted (I made this mistake once already)

This reverts commit 7fea55a054.

Change-Id: I4bf29b206e5e1f5daefcec131309a8f6e78e1eb1
Reviewed-on: https://code.wireshark.org/review/2428
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:26:57 +00:00
Michael Mann
14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo
7fea55a054 Fixup: ep_address_to_str -> address_to_str
Change-Id: Id49ba07e32a71357b50b32de7cecfd80e412d508
Reviewed-on: https://code.wireshark.org/review/2379
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:22:02 +00:00
Dario Lombardo
246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Dario Lombardo
971ffd683e Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe
Reviewed-on: https://code.wireshark.org/review/2376
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:13:58 +00:00
Pascal Quantin
828bb24226 Partly revert fdeed480bf
wmem_packet_scope() cannot be used outside of a packet treatment

Change-Id: I6e545bbb51f325b366288f17358f9d2347a7d7c4
Reviewed-on: https://code.wireshark.org/review/977
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-04-06 10:18:15 +00:00
Michael Mann
fdeed480bf Convert ep_address_to_str -> address_to_str(wmem_packet_scope, ...) for all dissectors
Change-Id: I7489e2fb3a1f2630ca17b0a5fe1aa873992f1061
Reviewed-on: https://code.wireshark.org/review/975
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-06 01:31:28 +00:00
Alexis La Goutte
296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Alexis La Goutte
aa65e8463e Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=54416
2013-12-23 20:13:31 +00:00
Alexis La Goutte
b3a584d8dc Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=54412
2013-12-23 20:12:39 +00:00
Guy Harris
a1c84e00de Get rid of a set-but-unused variable.
svn path=/trunk/; revision=54355
2013-12-22 11:15:35 +00:00
Guy Harris
fc7a77189d Add UCS-4 support, and use it.
Shuffle the character ENC_ values around a bit, keeping the Unicode
encodings together, moving the Windows code pages (only one for now)
after the ISO 8859 encodings, and putting "I can't believe it's not
ASCII!" at the end.

Fix some comment typoes, and update another comment, while we're at it.

svn path=/trunk/; revision=54351
2013-12-22 08:45:57 +00:00
Evan Huus
a6415ece0a Rename a couple of to_str functions to have ep_ in the name. This makes it
obvious that the returned string is ephemeral, and opens up the original names
in the API for versions that take a wmem pool (and thus can work in any scope).

svn path=/trunk/; revision=54249
2013-12-19 15:49:09 +00:00
Evan Huus
24360c9951 Make sure all unused bits are 0 in bacapp, fixes uninitialized memory found by
valgrind.

svn path=/trunk/; revision=54077
2013-12-13 23:08:32 +00:00
Guy Harris
2d5c1c8689 Note that apparently some BACnet implementations misuse the "ANSI X3.4"
encoding for ISO 8859-1; this means that those strings won't be
correctly interpreted if they're interpreted as UTF-8.

svn path=/trunk/; revision=54069
2013-12-13 21:36:50 +00:00
Guy Harris
e1c994f55f It's ISO 8859-1, not "ISO 18859-1", at least according to ANSI/ASHRAE
Standard 135-2004.

Use tvb_get_string_enc() wherever possible.

svn path=/trunk/; revision=53840
2013-12-08 01:28:00 +00:00
Evan Huus
df1aec4a6b Remove old (2009) and no-longer-necessary compatibility macro.
svn path=/trunk/; revision=53527
2013-11-23 22:03:48 +00:00
Jakub Zawadzki
50aa247c72 Fix Bug #9457 Update BACnet vendor list
Based on attachment #12139 (diff for adding the table) by rtsking117,
but keep original formatting and encoding (ASCII).

svn path=/trunk/; revision=53457
2013-11-20 23:32:02 +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
Bill Meier
9874da2fcb #if 0 numerous "unused const variables" (mostly value-string-arrays);
Also; fix a few "set but not used" warnings.

svn path=/trunk/; revision=52780
2013-10-23 06:29:11 +00:00
Bill Meier
a3a15ff90b Remove instances of unused 'data_handle' (and of one other handle).
svn path=/trunk/; revision=52767
2013-10-22 16:13:32 +00:00
Bill Meier
59277781ff Minor whitespace changes
svn path=/trunk/; revision=52590
2013-10-13 19:14:33 +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
Bill Meier
7316284293 Reference 'BACnetVendorIdentifiers' value_string using
an extended value string.

svn path=/trunk/; revision=52124
2013-09-17 18:55:17 +00:00
Bill Meier
b7bb743641 Update 'BACnetVendorIdentifiers' value strings from
BACnet vendor ID list dated September 16, 2013.
http://www.bacnet.org/VendorID/BACnet%20Vendor%20IDs.htm


svn path=/trunk/; revision=52119
2013-09-17 16:44:26 +00:00
Jörg Mayer
0d1411f854 Add comment where the vendor ids come from
svn path=/trunk/; revision=52014
2013-09-13 17:40:32 +00:00
Pascal Quantin
6cedc2c336 Convert a few more dissectors to wmem
svn path=/trunk/; revision=51991
2013-09-12 22:03:31 +00:00
Michael Mann
9e3f9b449f expert_add_info_format_text -> expert_add_info_format
svn path=/trunk/; revision=51852
2013-09-09 00:44:09 +00:00
Alexis La Goutte
4c81d15a4a Fix (-W)documentation error found by Clang
packet-bacapp.c:78:13: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tvb
   ~~~~~~~~~^
packet-bacapp.c:79:15: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param pinfo
   ~~~~~~~~~~~^
packet-bacapp.c:80:14: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tree
   ~~~~~~~~~~^
packet-bacapp.c💯13: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tvb
   ~~~~~~~~~^
packet-bacapp.c:101:15: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param pinfo
   ~~~~~~~~~~~^
packet-bacapp.c:102:14: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tree
   ~~~~~~~~~~^
packet-bacapp.c:103:16: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param offset
   ~~~~~~~~~~~~^
packet-bacapp.c:110:13: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tvb
   ~~~~~~~~~^
packet-bacapp.c:111:15: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param pinfo
   ~~~~~~~~~~~^
packet-bacapp.c:112:14: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tree
   ~~~~~~~~~~^
packet-bacapp.c:113:16: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param offset
   ~~~~~~~~~~~~^
packet-bacapp.c:130:13: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tvb
   ~~~~~~~~~^
packet-bacapp.c:131:15: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param pinfo
   ~~~~~~~~~~~^
packet-bacapp.c:132:14: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tree
   ~~~~~~~~~~^
packet-bacapp.c:133:16: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param offset
   ~~~~~~~~~~~~^
packet-bacapp.c:146:13: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tvb
   ~~~~~~~~~^
packet-bacapp.c:147:15: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param pinfo
   ~~~~~~~~~~~^
packet-bacapp.c:148:14: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param tree
   ~~~~~~~~~~^
packet-bacapp.c:149:16: error: empty paragraph passed to '@param' command [-Werror,-Wdocumentation]
 * @param offset
   ~~~~~~~~~~~~^

packet-bacapp.c:251:15: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param label
   ~~~~~~~~~~~^
packet-bacapp.c:263:15: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param label
   ~~~~~~~~~~~^
packet-bacapp.c:275:15: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param label
   ~~~~~~~~~~~^
packet-bacapp.c:288:15: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param label
   ~~~~~~~~~~~^
packet-bacapp.c:300:15: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param label
   ~~~~~~~~~~~^
packet-bacapp.c:325:24: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param service_choice
   ~~~~~~~~~~~~~~~~~~~~^
packet-bacapp.c:338:24: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param service_choice
   ~~~~~~~~~~~~~~~~~~~~^
packet-bacapp.c:521:15: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param label
   ~~~~~~~~~~~^
packet-bacapp.c:522:13: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param src
   ~~~~~~~~~^
packet-bacapp.c:521:11: error: parameter 'label' not found in the function
      declaration [-Werror,-Wdocumentation]
 * @param label
          ^~~~~
packet-bacapp.c:522:11: error: parameter 'src' not found in the function
      declaration [-Werror,-Wdocumentation]
 * @param src
          ^~~
packet-bacapp.c:654:11: error: parameter 'tree' not found in the function
      declaration [-Werror,-Wdocumentation]
 * @param tree the tree to append this item to
          ^~~~
packet-bacapp.c:654:11: note: did you mean 'subtree'?
 * @param tree the tree to append this item to
          ^~~~
          subtree
packet-bacapp.c:723:11: error: parameter 'tree' not found in the function
      declaration [-Werror,-Wdocumentation]
 * @param tree the tree to append this item to
          ^~~~
packet-bacapp.c:723:11: note: did you mean 'subtree'?
 * @param tree the tree to append this item to
          ^~~~
          subtree
packet-bacapp.c:749:11: error: parameter 'tree' not found in the function
      declaration [-Werror,-Wdocumentation]
 * @param tree the tree to append this item to
          ^~~~
packet-bacapp.c:749:11: note: did you mean 'subtree'?
 * @param tree the tree to append this item to
          ^~~~
          subtree
packet-bacapp.c:1076:24: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param service_choice
   ~~~~~~~~~~~~~~~~~~~~^
packet-bacapp.c:1266:17: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param service
   ~~~~~~~~~~~~~^
packet-bacapp.c:1337:4: error: unknown command tag name 'pram'; did you mean
      'param'? [-Werror,-Wdocumentation]
 * @pram pinfo
   ^~~~~
    param
packet-bacapp.c:1337:14: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @pram pinfo
         ~~~~^
packet-bacapp.c:1366:15: error: empty paragraph passed to '@param' command
      [-Werror,-Wdocumentation]
 * @param label
   ~~~~~~~~~~~^

svn path=/trunk/; revision=51261
2013-08-10 21:28:59 +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
Michael Mann
7878e93cad expert_add_info_format_text + proto_tree_add_text = proto_tree_add_expert_format, where applicable.
svn path=/trunk/; revision=50377
2013-07-03 23:43:26 +00:00
Michael Mann
5bbc26236a Batch of filterable expert infos.
Also added a note about deprecating expert_add_info_format

svn path=/trunk/; revision=50270
2013-06-30 22:19:37 +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
Anders Broman
455f5c8243 - [-Wmissing-prototypes]
- explicit casts.

svn path=/trunk/; revision=48265
2013-03-12 20:00:50 +00:00
Alexis La Goutte
b9a0eaedae Fix indent (Tab => 4 Spaces) Remove whitespace And Modelines info
svn path=/trunk/; revision=47800
2013-02-21 15:32:29 +00:00