summaryrefslogtreecommitdiff
path: root/epan/ftypes
AgeCommit message (Collapse)AuthorFilesLines
2014-09-01Escape double quotes when printing ABSOLUTE_TIME fieldMichael Mann1-9/+13
This regression was introduced by the commit e5353bf1198d6abf748de78084ff64f597f13663 done for bug 10081 Bug: 10213 Change-Id: I3925a47ef13055f10f49fa9fefd022731746fbb8 Reviewed-on: https://code.wireshark.org/review/2572 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-06Clean up handling of missing functions.Guy Harris1-1/+1
With autotools, CMake, and nmake, if we have a function, #define HAVE_{function_name_in_all_caps}, otherwise don't #define it. If we provide our own version of a function in libwsutil, make sure we have a header that declares it, and *ONLY* include that header if HAVE_{function_name_in_all_caps} is *NOT* defined, so that we don't have the system declaration and our declaration colliding. Check for inet_aton, strncasecmp, and strptime with CMake, just as we do with autotools. Simplify the addition of {function_name_in_all_caps}_LO to libwsutil in autotools. Change-Id: Id5be5c73f79f81919a3a865324e400eca7b88889 Reviewed-on: https://code.wireshark.org/review/2903 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-16Convert more time_to_str functions to wmemEvan Huus1-3/+23
Change-Id: Ibaae0e79935dc62f12f713f2df5b57d0f3f799b9 Reviewed-on: https://code.wireshark.org/review/2254 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-16Convert a bunch of time_to_str functions to wmemEvan Huus1-5/+12
Change-Id: I24fe3cc4a3589dadc4528a77fe7ff13d06b1a983 Reviewed-on: https://code.wireshark.org/review/2245 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-04-25Support out-of-source checkapiStig Bjørlykke1-2/+3
Always call $(top_srcdir)/tools/checkAPIs.pl with -sourcedir=$(srcdir) from Makefile.am to allow out-of-source 'make checkapi'. Change-Id: I60d7e0079984a8ededdacf4517a0738486fa7973 Reviewed-on: https://code.wireshark.org/review/1294 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-12Get rid of more tvb_get_nstringz* calls.Guy Harris2-1/+45
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-31Continue to remove $Id$ from top of fileAlexis La Goutte3-5/+0
(Using sed : sed -i '/^\# \$Id\$/,+1 d') (start with dash) Change-Id: Ia4b5a6c2302f6a531f6a86c1ec3a2f8205c8c2dd Reviewed-on: https://code.wireshark.org/review/881 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte14-28/+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-25Remove trailing whitespaceBill Meier2-5/+5
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-21Fix bug 9790: Lua: wslua allows duplicate field registrationHadriel Kaplan2-0/+68
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-15Don't cast away constness.Guy Harris1-1/+1
svn path=/trunk/; revision=54813
2014-01-15Eliminate fvalue_set() in favor of routines that take argumentsGuy Harris14-178/+396
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-23Make buildbot HappyAlexis La Goutte1-1/+1
error: unused parameter 'allow_partial_value' svn path=/trunk/; revision=54389
2013-12-23Add FT_SYSTEM_ID type and convert the dissectors that use print_system_id ↵Michael Mann2-0/+81
with FT_BYTES to now use FT_SYSTEM_ID type. svn path=/trunk/; revision=54383
2013-12-19Rename more to_str functions to have ep_ in the name if they return ephemeralEvan Huus1-4/+4
buffers. Remove two unused functions. svn path=/trunk/; revision=54250
2013-11-12Replace fvalue_ftype() with a fvalue_type_ftenum() routine that returnsGuy Harris2-6/+9
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-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki4-0/+5
svn path=/trunk/; revision=53230
2013-11-10Move struct _ftype_t + callback typedefs + free macro to ftypes-int.hJakub Zawadzki2-84/+86
svn path=/trunk/; revision=53223
2013-11-09include <wsutil/pint.h> only when needed.Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=53196
2013-11-09Replace STRINGIFY with glib version.Jakub Zawadzki1-2/+2
svn path=/trunk/; revision=53193
2013-11-09Include <epan/to_str.h> only when needed.Jakub Zawadzki2-0/+2
svn path=/trunk/; revision=53189
2013-11-08Use escape_string*() functions in ftype-string.Jakub Zawadzki1-56/+12
Found in attachment #11961, by Didier Gautheron svn path=/trunk/; revision=53174
2013-10-27Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9323 :Jeff Morriss1-3/+5
Actually handle non-NULL-terminated FT_STRINGs properly. svn path=/trunk/; revision=52905
2013-10-06Add support for RELATIVE-OID ASN.1 type. Bug 9192 ↵Michael Mann2-1/+93
(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-09-13Two more places with now explicit emem.h includeJörg Mayer2-0/+2
svn path=/trunk/; revision=51998
2013-07-28Make many items filterable for Vines dissectors.Michael Mann2-0/+77
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-06-25makefile.nmake -> Makefile.nmake and minor whitespace (spaces -> tabs) changes.Chris Maynard1-1/+1
svn path=/trunk/; revision=50140
2013-06-21get_ax25_name() is *NOT* the right routine to use to translate aGuy Harris1-15/+61
human-readable representing an AX.25 subaddress (e.g. "KA9Q-01") into the binary form of an AX.25 address, because what it does is translate the binary form of an AX.25 address to the human-readable form! We currently have no routine that does the right thing and, even if we did, given that some bits in the AX.25 subaddress format are used for purposes other than representing the call sign and substation ID, so the matching routines for AX.25 addresses need to ignore certain bits. For now, we just remove the call to get_ax25_name() (which squelches the pointer-signedness warning that made me look at this code, and find the problem, in the first place) and replace it with a comment discussing the problem and a failure. The other pointer-signedness warning brought up a question of what to do with G_REGEX_RAW in the g_regex_match_full() call; it didn't bring up an immediately obvious *answer*, so we throw a cast at the warning and add another comment. (We fix up alignment while we're at it.) svn path=/trunk/; revision=50106
2013-03-19From beroset:Anders Broman4-7/+7
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48424
2013-03-12From David Arnold:Jaap Keuter1-1/+1
Replace use of INCLUDES with AM_CPPFLAGS in all Makefiles to placate recent autotools. svn path=/trunk/; revision=48261
2013-03-10Remove slab.h and replace its last remaining usage with glib slices.Evan Huus1-1/+0
Take the opportunity to deduplicate some code that was common to both an if block and its else block. svn path=/trunk/; revision=48227
2013-03-09Remove the emem slab feature (sl_* functions) completely, replacing it withEvan Huus2-8/+2
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 Broman2-2/+2
explicit casts. svn path=/trunk/; revision=48083
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey2-7/+22
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 Huus2-8/+6
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-12-26Fix a bunch of warnings.Guy Harris1-21/+6
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-11-06When comparing fvalue_t we don't modify them, make arguments const.Jakub Zawadzki11-98/+98
svn path=/trunk/; revision=45948
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss12-24/+0
svn path=/trunk/; revision=45016
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 Harris2-0/+84
LINKTYPE_AX25. svn path=/trunk/; revision=44211
2012-06-28Update Free Software Foundation address.Jakub Zawadzki16-16/+16
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-11Fix bug 6917Jakub Zawadzki1-1/+1
strtod() is locale-aware, change it to g_ascii_strtod() svn path=/trunk/; revision=43212
2012-06-02Try to squelch warningsAnders Broman6-40/+40
svn path=/trunk/; revision=43001
2012-04-04Add a "-build" argument to checkAPIs.pl. Use that argument when buildingJeff Morriss2-2/+2
from makefiles (and thus from the buildbot). The intention is to be able to tell when a human is running the tool so we can provide more code-review guidance. As a starter, enable the "too many proto_tree_add_text() calls" check when a human is running the tool. svn path=/trunk/; revision=41943
2012-02-24CVARSDLL hasn't been used (is undefined) for a while....Bill Meier1-1/+1
svn path=/trunk/; revision=41180
2012-02-05From Tony Trinh:Anders Broman1-1/+35
"matches" operator fails to match hex. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6613 svn path=/trunk/; revision=40867
2012-01-29Add *.sbr files to the clean target.Anders Broman1-1/+1
svn path=/trunk/; revision=40762