aboutsummaryrefslogtreecommitdiffstats
path: root/epan/ftypes/ftypes.h
AgeCommit message (Collapse)AuthorFilesLines
2016-05-10Have fvalue_to_string_repr always return an (wmem) allocated buffer.Michael Mann1-8/+4
Previous patches converted all fvalue_to_string_repr calls to expect an allocated buffer (and not a passed in one). Now changing signature to force an allocated buffer. Added wmem in case that can be taken advantage of within epan (and since the function signature was changing anyway). Change-Id: Ica1ac4a9a182ce0e73303856329e198d9d525b7b Reviewed-on: https://code.wireshark.org/review/15343 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-05Convert ftype-tvbuff.c to ftype-protocol.cMichael Mann1-2/+8
As noted in https://www.wireshark.org/lists/wireshark-dev/201604/msg00103.html a protocol field isn't really a tv_buff, so allow for the possibility of a NULL tv_buff in a "protocol type". If the tvb is NULL, use the string of the protocol field for comparison Bug: 12335 Change-Id: Ie12a5f7b31c7293c61006b0f70135d100a97c4e0 Reviewed-on: https://code.wireshark.org/review/15261 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-01-12Fix FT_UINT24 comment errorKevin Bracey1-1/+1
Displayed as 6 hex digits, not 3. Change-Id: I61f9b41d4bd846ff74fac24b0651c7243c9c9e51 Reviewed-on: https://code.wireshark.org/review/13235 Reviewed-by: João Valverde <j@v6e.pt>
2016-01-04Rename ipv4_addr and ipv6_addr to indicate their full contents.Guy Harris1-17/+17
They're not just addresses, they also include a mask length for IPv4 and a prefix length for IPv6. Rename them appropriately. Rename the old ipv4_addr_and_mask() and ipv6_addr_and_mask() to reflect that 1) they fetch data from a tvbuff and 2) *don't* fetch the mask length or prefix length, those lengths are passed as arguments to indicate how many bytes worth of address to fetch. Change-Id: I4cad5a186ad7bfcb60022a91dbe8bc8479e6471f Reviewed-on: https://code.wireshark.org/review/13035 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-03Rename ipv6-utils.h to ipv6.h.Guy Harris1-1/+1
By analogy to ipv4.h. Change-Id: I147565b332024b1bb88e9cd15889255773d04524 Reviewed-on: https://code.wireshark.org/review/13034 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-29Add support for IEEE-11073 FLOATsMichal Labedzki1-0/+4
Add support for IEEE-11073 32-bit FLOAT and 16 bit SFLOAT field types. Use them in Bluetooth ATT dissector. Change-Id: Ife0f3843da84a9af23483b0a0d9b69cd2f511d08 Reviewed-on: https://code.wireshark.org/review/12680 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-11-15Lua: Added support for ProtoField framenum type.Stig Bjørlykke1-1/+2
Change-Id: I1d4cddd4026f08416005f2b3212536b3984d1a8d Reviewed-on: https://code.wireshark.org/review/11834 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-03-12One check mark for ACKs, two check marks for dup ACKs.Gerald Combs1-1/+3
Add FT_FRAMENUM_ACK and FT_FRAMENUM_DUP_ACK and set them for tcp.analysis.acks_frame and tcp.analysis.duplicate_ack_frame. Draw a single or double check mark in the packet list accordingly. These are probably specific to TCP, but as it happens there are a lot of TCP packets. Change-Id: I35416506419159a79ad8cc2e35f8a14485edfb7e Reviewed-on: https://code.wireshark.org/review/7568 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-05Qt: Add extra related packet indicator types.Gerald Combs1-0/+8
Add the ability to set frame number types: none, request, or response. Use the types to draw different related packet indicators in the packet list. Track the conversation in PacketListRecord. Use it to draw dashed lines for unrelated frames. Set frame number types for DNS and ICMP. Instead of drawing a transparent QImage, alpha blend our foreground color and draw directly in our painter. Blend more toward the foreground color. Add FRAMENUM_TYPE to checkAPIs. Change-Id: I2495945bb436413e05d6ec697184a0b4fd5ad214 Reviewed-on: https://code.wireshark.org/review/7436 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-02-21Make FT_{U}INT64 behave more like FT_{U}INT32, add support for ↵JC Wren1-5/+20
FT_{U}INT{40,48,56} Change-Id: I57354c309ecf3a0c8f0c7cff485638027f30bb19 Reviewed-on: https://code.wireshark.org/review/5813 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-15epan/ftypes/*.[hc]: As needed: Add editor modelines & Fix indentationBill Meier1-0/+13
Change-Id: Ib0bd1ea7801ab450b300a94c4757f16d0dd75760 Reviewed-on: https://code.wireshark.org/review/7137 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-18Clean up ftype-conversion and dfilter error message string handling.Guy Harris1-4/+2
Have dfilter_compile() take an additional gchar ** argument, pointing to a gchar * item that, on error, gets set to point to a g_malloc()ed error string. That removes one bit of global state from the display filter parser, and doesn't impose a fixed limit on the error message strings. Have fvalue_from_string() and fvalue_from_unparsed() take a gchar ** argument, pointer to a gchar * item, rather than an error-reporting function, and set the gchar * item to point to a g_malloc()ed error string on an error. Allow either gchar ** argument to be null; if the argument is null, no error message is allocated or provided. Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c Reviewed-on: https://code.wireshark.org/review/6608 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-04Create BASE_DOT, BASE_DASH, and BASE_SEMICOLON types for the FT_BYTES field ↵Michael Mann1-2/+5
type. These "bases" will put a ".", "-", or ":" respectively between hexidecimal bytes in the field in packet view and display filter. FT_BYTES with BASE_NONE will have no separator in the packet view, but continue to have the ':' as a separator in the display filter. Converted the "string" hf_ entries that used tvb_fc_to_str as a string to use proto_tree_add_item with FT_BYTES/BASE_DOT type. Converted applicable tvb_bytes_to_ep_str_punct() calls to use the new BASE values. Change-Id: I2442185bb314d04a3ff2ba57883652ecd738b5f9 Reviewed-on: https://code.wireshark.org/review/6098 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-28Create FT_FCWWN field type.Michael Mann1-0/+2
Also, convert the "string" hf_ entries that used tvb_fcwwn_to_str as a string to use proto_tree_add_item with FT_FCWWN type. Change-Id: I4ca77870499fd8239584a70874998b5d194a7167 Reviewed-on: https://code.wireshark.org/review/6036 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-12Get rid of more tvb_get_nstringz* calls.Guy Harris1-1/+2
Add an FT_STRINGZPAD type, for null-padded strings (typically fixed-length fields, where the string can be up to the length of the field, and is null-padded if it's shorter than that), and use it. Use IS_FT_STRING() in more cases, so that less code needs to know what types are string types. Add a tvb_get_stringzpad() routine, which gets null-padded strings. Currently, it does the same thing that tvb_get_string_enc() does, but that might change if we don't store string values as null-terminated strings. Change-Id: I46f56e130de8f419a19b56ded914e24cc7518a66 Reviewed-on: https://code.wireshark.org/review/1082 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-04-07The encoding of a string is *not* part of its type.Guy Harris1-1/+0
So get rid of the commented-out FT_UCS2_LE; that would be handled as an FT_STRING, FT_UINT_STRING, or FT_STRINGZ with an encoding of ENC_UCS_2|ENC_LITTLE_ENDIAN. Change-Id: I828fc1ed49843a503ec70e6adaf6dadd256df407 Reviewed-on: https://code.wireshark.org/review/996 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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>
2014-02-21Fix bug 9790: Lua: wslua allows duplicate field registrationHadriel Kaplan1-0/+5
As discussed in bug 3513 and 9709, one can register more than one new ProtoFields for the same field name. Of course C-code can do that too, and does a LOT apparently, but if they're not similar ftypes then things can get scrweed up in display filters. So this change prevents duplicate field registration of dissimilar ftypes. The similarity is based on the discussion on the mailing list, and the listing in README.developer has been updated to refelect that as well. Also, this change adds a testscript for Proto/ProtoFields. Change-Id: I43bd323f785245941a21289647332a19adec2a9d Reviewed-on: https://code.wireshark.org/review/285 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-01-15Eliminate fvalue_set() in favor of routines that take argumentsGuy Harris1-3/+18
appropriate for particular FT_ types. This lets us do some more type checking and lets us use const pointers when appropriate. Constify a bunch of stuff, and don't cast away constness. svn path=/trunk/; revision=54811
2013-12-23Add FT_SYSTEM_ID type and convert the dissectors that use print_system_id ↵Michael Mann1-0/+1
with FT_BYTES to now use FT_SYSTEM_ID type. svn path=/trunk/; revision=54383
2013-11-12Replace fvalue_ftype() with a fvalue_type_ftenum() routine that returnsGuy Harris1-2/+2
the ftenum_t for the fvalue's ftype, rather than a pointer to the ftype (which isn't all that useful except as a handle, unless you import the internal header). Have fvalue_to_string_repr() return NULL, rather than failing, if the fvalue's ftype has no val_to_string_repr method. This lets us not include the ftypes internal header in ui/cli/tap-diameter-avp.c. svn path=/trunk/; revision=53290
2013-11-10Move struct _ftype_t + callback typedefs + free macro to ftypes-int.hJakub Zawadzki1-84/+2
svn path=/trunk/; revision=53223
2013-10-06Add support for RELATIVE-OID ASN.1 type. Bug 9192 ↵Michael Mann1-0/+1
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9192) From Ed Beroset. svn path=/trunk/; revision=52393
2013-09-13Remove epan.h from ftypes.h, address.h and tpg.h,Jörg Mayer1-1/+0
add it to proto.h as it contains macros that require emem.h svn path=/trunk/; revision=52001
2013-07-28Make many items filterable for Vines dissectors.Michael Mann1-0/+2
Add support for FT_VINES type. svn path=/trunk/; revision=50962
2013-06-25Move a couple of time-related modules into wsutil.Jeff Morriss1-1/+1
A bunch of files didn't really need to include these header files so remove the include line rather than changing it. svn path=/trunk/; revision=50154
2013-03-09Remove the emem slab feature (sl_* functions) completely, replacing it withEvan Huus1-3/+1
glib memory slices. - We weren't doing anything with the emem slab that couldn't be done with glib slices. - Removes a fair bit of code as well as one debugging environment variable. - Glib slices are much cache-friendlier and are multi-threading friendly (if we ever go there). - Allows glib to actually return slices to the OS on occasion. The emem slab would hold onto its memory forever which resulted in a great deal of wasted memory after closing a large file. svn path=/trunk/; revision=48218
2013-03-05type drange -> drange_tAnders Broman1-1/+1
explicit casts. svn path=/trunk/; revision=48083
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-6/+21
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2013-01-18Make the buffer argument to FvalueToStringRepr functions volatileEvan Huus1-1/+1
and use that to fix a -Wclobbered error that bleeding-edge GCC throws on tvbuff types. Also remove a variable that looked like it was being used to hide the error before GCC got clever. svn path=/trunk/; revision=47153
2012-11-06When comparing fvalue_t we don't modify them, make arguments const.Jakub Zawadzki1-10/+10
svn path=/trunk/; revision=45948
2012-08-19Handle double-clicks in the tree.Gerald Combs1-3/+11
svn path=/trunk/; revision=44592
2012-08-02From Richard Stearn: support for AX.25, including support forGuy Harris1-0/+2
LINKTYPE_AX25. svn path=/trunk/; revision=44211
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-09-07From Jakub Zawadzki :Anders Broman1-0/+2
Add support for prefix in IPv6 address filter. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5538 svn path=/trunk/; revision=38916
2011-08-23Remove support for libpcre, we use GRegex in GLib.Stig Bjørlykke1-8/+0
svn path=/trunk/; revision=38683
2011-07-11More GLIB_CHECK_VERSION cleanups. Update the minimum GLib/GTK+ versionsGerald Combs1-2/+2
in README.devloper. Remove g_gnuc.h since it's no longer needed. Remove tvbuff_init(), tvbuff_cleanup(), reassemble_init(), and reassemble_cleanup() since they were only used for older GLib versions which didn't support GSlices. Assume we always support the "matches" operator. svn path=/trunk/; revision=37978
2011-07-05Add some additional routine variants that handle string encodings, andGuy Harris1-1/+0
make FT_STRING and FT_UINT_STRING handle string encodings. Get rid of FT_EBCDIC in favor of FT_STRING with ENC_EBCDIC. Add some URLs for DRDA. Clean up some stuff in TN3270 and TN5250, including using ENC_ values for proto_tree_add_item(). svn path=/trunk/; revision=37909
2011-05-09Convert SLAB_-s, to sl_-API.Jakub Zawadzki1-7/+3
svn path=/trunk/; revision=37030
2011-05-08Add FT_EUI64 Field TypeAlexis La Goutte1-0/+2
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector * Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name * Update Documentation (README.dev) * Add new function in libwireshark.def * Support of encoding for tvb_eui64_to_str * Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector svn path=/trunk/; revision=37015
2010-05-08(Trivial) Fix a typo & some indentationBill Meier1-7/+7
svn path=/trunk/; revision=32724
2009-12-18If we don't have PCRE and we do have GLib >= 2.14, use GRegexes for theGerald Combs1-0/+2
"matches" operator. svn path=/trunk/; revision=31302
2009-09-10Introduce a few FT_XXX lengths defines and use those instead of hard coding ↵Kovarththanan Rajaratnam1-0/+7
constants svn path=/trunk/; revision=29846
2009-09-10Use the correct type, that is GByteArray instead of GString. The reason why ↵Kovarththanan Rajaratnam1-1/+0
this 'worked' before (on non-64bit platforms that is): struct _GString { gchar *str; gsize len; gsize allocated_len; }; And: struct _GArray { gchar *data; guint len; }; We only accessed the first two fields of the GString struct. svn path=/trunk/; revision=29841
2009-09-10Remove unused fieldKovarththanan Rajaratnam1-3/+2
svn path=/trunk/; revision=29840
2008-11-11Signal error on field values that cannot be safely represented as strings ↵Balint Reczey1-1/+6
instead of crashing. This fixes bug 2845. svn path=/trunk/; revision=26749
2008-06-28Add FT_INT64 to IS_FT_INT and FT_UINT_64 to IS_FT_UINT.Anders Broman1-2/+2
svn path=/trunk/; revision=25623
2007-11-19Introduce a new field type called FT_EBCDIC. This field works the same asStephen Fisher1-0/+1
FT_STRING, except that it converts the data from the packet from EBCDIC to ASCII for display in Wireshark. svn path=/trunk/; revision=23503
2007-01-18Add separate union entries to fvalue.value for signed and unsignedMartin Mathieson1-7/+18
32-bit numbers. Separate signed and unsigned accessors have been added and used where appropriate. Definitely not for 0.99.5. svn path=/trunk/; revision=20472
2006-12-22hmmRonnie Sahlberg1-0/+25
best to revert this for a while. revert all changes from previous patch. svn path=/trunk/; revision=20195