aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-xtp.c
AgeCommit message (Collapse)AuthorFilesLines
2016-09-22Don't call proto_register_field_array() or expert_register_protocol() withAndersBroman1-3/+4
proto = -1 Change-Id: I60f899ad748b5d3e17f237552af7d2dbc8f27bd2 Reviewed-on: https://code.wireshark.org/review/17864 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-07-27Follow up for proto_tree_add_checksum.Michael Mann1-6/+13
Fill in the "gaps" so that all dissectors that verify checksums have both a status and expert info field. Also address comments from original proto_tree_add_checksum patch that didn't make it. Ping-Bug: 8859 Change-Id: I2e6640108fd6bb218cb959fe9e4ba98a13e43a2f Reviewed-on: https://code.wireshark.org/review/16590 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>
2016-07-21Add proto_tree_add_checksum.Michael Mann1-13/+4
This is an attempt to standardize display/handling of checksum fields for all dissectors. The main target is for dissectors that do validation, but dissectors that just report the checksum were also included just to make them easier to find in the future. Bug: 10620 Bug: 12058 Ping-Bug: 8859 Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf Reviewed-on: https://code.wireshark.org/review/16380 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-21Do not mix wmem and glib allocatorsPascal Quantin1-23/+6
Change-Id: I4bf861ed9e6b767341f2cbd4e926606d4919f2ef Reviewed-on: https://code.wireshark.org/review/15041 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-11-30Remove some THROWs and just return when lengths are bad.Michael Mann1-2/+2
Change-Id: I4e01117e0cf0600be75f75336f22d011c4964113 Reviewed-on: https://code.wireshark.org/review/12298 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>
2015-05-27Convert proto_tree_add_boolean to ↵Michael Mann1-46/+30
proto_tree_add_bitmask_[value|value_with_flags|list] Final part. While there change deprecated tvb_length-xxx() calls Change-Id: I8b0cf823c2d37a92c58fcb653f7fe1e8fdad5a79 Reviewed-on: https://code.wireshark.org/review/8642 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-03xtp: Don't call col_...() under 'if (tree)'Bill Meier1-1/+1
Change-Id: Ie80476e919b5ba0a2e5f036c654a5379b91ddd32 Reviewed-on: https://code.wireshark.org/review/6931 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-4/+0
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-10-02Add editor modelines & adjust indentation/whitespace as needed.Bill Meier1-220/+234
Change-Id: Ice2d93632cd42dfcef3bfbf0e15f2a8a147278fc Reviewed-on: https://code.wireshark.org/review/4433 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-07Eliminate proto_tree_add_text from some of the dissectors.Michael Mann1-9/+17
Other minor cleanups while in the area. Change-Id: Id8dab02df6f111c3462238c3de1bf201e037ca48 Reviewed-on: https://code.wireshark.org/review/4022 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-08-09Clean up Internet checksum handling.Guy Harris1-2/+1
Add macros to set entries of a vec_t, one for use when you have a pointer to private data, and one for use when you have data in a tvbuff. The latter wraps the use of tvb_get_ptr(), so that you're not directly calling it in a dissector. Move ip_checksum() to epan/in_cksum.c, and add an ip_checksum_tvb() that wraps the use of tvb_get_ptr(). In the CARP dissector, give the length variable an unsigned type - there's no benefit to it being signed, and that requires some casts to be thrown around. In the DCCP dissector, check only against the coverage length to see if we have enough data, combine the "should we check the checksum?" check with the "*can* we check the checksum?" check in a single if, and throw a dissector assertion if the source network address type isn't IPv4 or IPv6. Get rid of inclues of <epan/in_cksum.h> in dissectors that don't use any of the Internet checksum routines. In the HIP dissector, make sure we have the data to calculate the checksum before doing so. Change-Id: I2f9674775dbb54c533d33082632809f7d32ec8ae Reviewed-on: https://code.wireshark.org/review/3517 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-05convert to proto_tree_add_subtree[_format]Michael Mann1-18/+10
Change-Id: I66f0bffb987568c3d4c14a06bdc90465c877b27f Reviewed-on: https://code.wireshark.org/review/2867 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-10/+10
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-10/+10
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-1/+1
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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>
2013-12-10- Forward declaration of register functions.Anders Broman1-0/+3
svn path=/trunk/; revision=53901
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53230
2013-09-22emem -> wmem conversion:Pascal Quantin1-1/+1
- 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-21Add _g_ to the names of functions that allocate glib memory. This is a bit moreEvan Huus1-1/+1
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-12emem -> wmemJörg Mayer1-1/+2
svn path=/trunk/; revision=51993
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-2/+2
svn path=/trunk/; revision=51852
2013-07-01Define certain 'const char *...' arrays as static.Bill Meier1-3/+3
Reduces code memory usage and execution time. (See SVN #50271) svn path=/trunk/; revision=50292
2013-06-14Remove check_col() and the occasional tree.Michael Mann1-18/+13
This leaves just the Pidl dissectors remaining for removal of check_col() in the dissectors directory. A small handful of check_col() calls remain outside of the dissectors. svn path=/trunk/; revision=49941
2013-05-28Batch of filterable expert infos. This (mostly) completes the non-ASN.1 ↵Michael Mann1-2/+13
list of (built-in) dissectors that only had a small handful of add_expert_info_format calls. svn path=/trunk/; revision=49602
2013-03-19From beroset:Anders Broman1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48430
2012-12-21Get rid of unnecessary initialization that causes "discards qualifiers"Guy Harris1-1/+1
warnings. svn path=/trunk/; revision=46688
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-06Add a maximum span length check to XTP. Fixes a crash discovered by BenGerald Combs1-22/+14
Schmidt. Just use proto_tree_add_item() instead of allocating a big-ol-honkin'-block of guint64s and adding their values to the tree via proto_tree_add_uint64(). Dissection *should* still work correctly but I can't find any XTP captures for testing. svn path=/trunk/; revision=44289
2012-03-18From Reinhard Speyerer: Fix several misspellings/typos in WiresharkBill Meier1-1/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967 svn path=/trunk/; revision=41645
2012-01-19Fix a duplicate display filter name.Chris Maynard1-1/+1
svn path=/trunk/; revision=40587
2012-01-13Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-2/+0
svn path=/trunk/; revision=40470
2011-12-28Fix memory leaks involving tvb_get_string[z]().Chris Maynard1-0/+1
svn path=/trunk/; revision=40312
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-08-08Fix Coverity CID 1242: Pointer "ti" returned by proto_tree_add_uint64() is ↵Chris Maynard1-1/+1
never used. svn path=/trunk/; revision=38418
2011-07-18Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings.Bill Meier1-4/+2
svn path=/trunk/; revision=38085
2011-05-23Fix various benign cases of Coverity [UNUSED]: 996,995,956,936,899,1133,1000Bill Meier1-3/+0
svn path=/trunk/; revision=37371
2011-05-05packet-xtp.h used only in packet-xtp.c; Move packet-xtp.h contents to ↵Bill Meier1-1/+129
packet-xtp.c svn path=/trunk/; revision=36994
2011-05-05Don't assign to unused variable: Coverity 1132 [UNUSED].Bill Meier1-2/+2
svn path=/trunk/; revision=36993
2011-02-07Remove unneeded #includes (stdio.h,stdlib.h);Bill Meier1-108/+106
Whitespace cleanup: trailing, indentation, "4-space tabs" svn path=/trunk/; revision=35850
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-04-06#include <string.h> not needed.Bill Meier1-1/+0
svn path=/trunk/; revision=32410
2010-04-03Remove unneeded #include <stdio.h>Bill Meier1-1/+0
svn path=/trunk/; revision=32367
2009-10-25From Jakub Zawadzki:Anders Broman1-2/+1
Cleanup dissector code - use proper memory functions. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4164 svn path=/trunk/; revision=30691
2009-08-09Don't guard col_clear with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29344
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-60/+60
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2009-04-07Use some default true_false_string's.Bill Meier1-20/+15
svn path=/trunk/; revision=27983