Commit Graph

18 Commits

Author SHA1 Message Date
Guy Harris cb16dff992 Get rid of more tvb_get_nstringz* calls.
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-12 22:27:22 +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
Bill Meier 11b5c15fdb Remove trailing whitespace
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-25 20:46:49 +00:00
Guy Harris 61867d0b2f Eliminate fvalue_set() in favor of routines that take arguments
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
2014-01-15 01:05:03 +00:00
Michael Mann ea7bcf0783 Add count() function to display filter. Bug 9480 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9480)
From Martin Kaiser

svn path=/trunk/; revision=53623
2013-11-28 15:56:53 +00:00
Guy Harris 409dd075c6 Replace fvalue_ftype() with a fvalue_type_ftenum() routine that returns
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-12 22:06:00 +00:00
Jakub Zawadzki 12d1509aa1 Move struct _ftype_t + callback typedefs + free macro to ftypes-int.h
svn path=/trunk/; revision=53223
2013-11-10 13:14:09 +00:00
Jakub Zawadzki 6bd6c5eed9 Add new dfilter function: size()
Make it return fvalue_length() of field.

[XXX, rename len() to strlen(), and size() to len()?!]

svn path=/trunk/; revision=49771
2013-06-04 19:29:10 +00:00
Anders Broman 089dfcd108 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48424
2013-03-19 19:02:25 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Jakub Zawadzki 40776e2fed Add len() function to dfilter. For now only support FT_STRING*
Note: it returns bytes-length, not number of UTF-8 characters.

svn path=/trunk/; revision=43541
2012-06-29 11:11:24 +00:00
Jakub Zawadzki a8eea83c37 Also support FT_STRINGZ and FT_UINT_STRING in lower()/ upper() functions.
svn path=/trunk/; revision=43540
2012-06-29 11:07:08 +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
Anders Broman 345b48d1ea Try to squelch warnings
svn path=/trunk/; revision=43019
2012-06-03 09:26:15 +00:00
Anders Broman 4cbb31e99c Try to squelch warnings
svn path=/trunk/; revision=43002
2012-06-02 15:52:42 +00:00
Ronnie Sahlberg 244956f843 use an ep allocated temporary string when creating the string for a FT_STRING value and call fvalue_set with already_copied==FALSE so the string gets allocated in ftype-string.c instead
svn path=/trunk/; revision=20239
2006-12-29 22:55:13 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Gilbert Ramirez e3899ed4a4 Add infrastructure for display filter functions.
Add upper() and lower() display filter functions for string fields.

svn path=/trunk/; revision=18071
2006-05-02 14:26:17 +00:00