aboutsummaryrefslogtreecommitdiffstats
path: root/epan/value_string.h
AgeCommit message (Collapse)AuthorFilesLines
2011-05-13(Trivial) fix a spelling error.Bill Meier1-1/+1
svn path=/trunk/; revision=37126
2011-04-28Change value_string_ext->_vs_match to return value_string struct (instead of ↵Jakub Zawadzki1-6/+6
strptr), Now index can be easily calculated so remove idx pointer from all match functions. Just in case change names if someone is using wireshark internals. svn path=/trunk/; revision=36930
2011-01-12Fix the fuzz failure in ↵Jeff Morriss1-2/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5574 : The first time a value_string_ext() is accessed, _match_strval_ext_init() is used before the real match function is called. This function was not expanded to take an idx parameter (in rev 35451). It compiled only because the function: a) previously did not match _value_string_match_t b) and the difference was being cast away when assigning _match_strval to it (So the fact that the index parameter was not added was also ignored.) To fix the problem, give _match_strval_ext_init() and index parameter and use it instead of a dummy variable when calling the real match function. That way the first call to match_strval_ext_idx() will return an actual (initialized) index. To prevent the problem in the future, make the vse argument to _match_strval_ext_init() const *and then cast away the constness* so the function can modify the vse. svn path=/trunk/; revision=35508
2011-01-10Introduce match_strval_idx_ext()Anders Broman1-1/+8
svn path=/trunk/; revision=35451
2010-11-14'tshark -G values' - Validate (somewhat) value_string_ext before use to ↵Bill Meier1-0/+3
prevent a crash. svn path=/trunk/; revision=34869
2010-11-12Enhance 'tshark -G values': Add info about extended value strings (including ↵Bill Meier1-0/+5
acess method). svn path=/trunk/; revision=34854
2010-10-14Rework "extended value strings":Bill Meier1-16/+71
- Allow direct access when a range of values begins with a value other than 0; - Provide value_string_ext_new() for creating extended value strings at runtime; - Do access to value_string_ext members via a macro (all but value_string.c); - Update documentation. svn path=/trunk/; revision=34514
2010-04-27Correct two comments.Jaap Keuter1-2/+2
svn path=/trunk/; revision=32578
2010-04-27From Jakub Zawadzki:Anders Broman1-13/+6
- use function pointers instead of switch. - initalize ->match_type during first use of match_str() func. svn path=/trunk/; revision=32576
2010-04-27From Jakub Zawadzki:Anders Broman1-0/+22
Itroduce value_string_ext for faster value matching in value_strings. svn path=/trunk/; revision=32574
2010-04-03 From Yaniv Kaul: constify parametersBill Meier1-11/+11
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 From me: Fix a number of instances where the function prototype or the function definition wasn't changed so there was a mismatch thus causing Windows (but not gcc) compilation errors. svn path=/trunk/; revision=32365
2010-04-02Revert SVN #32360 until Windows compilation errors corrected.Bill Meier1-11/+11
svn path=/trunk/; revision=32361
2010-04-02From Yaniv Kaul: constify parametersBill Meier1-11/+11
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4422 svn path=/trunk/; revision=32360
2009-09-06Don't pass ep_alloc()'ed strings to col_set_str().Kovarththanan Rajaratnam1-0/+5
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3984 svn path=/trunk/; revision=29726
2009-05-26From Didier Gautheron via bug 3052:Gerald Combs1-0/+21
Add: - FIX 4.0 to 4.4 fields, auto generated with XSLT stylesheets applied on http://www.quickfixengine.org/ xml files (not included quickfixengine code is BSD but xml files have no copyright). - value_string functions for string keys, added to value_string.c. - FIX desegmentation, it doesn't work well with malformed FIX PDU. svn path=/trunk/; revision=28478
2006-12-07From Francesco Fondelli:Stephen Fisher1-0/+24
I defined a range_string struct. It's like value_string but stores range <-> string pairs. Moreover I wrote rval_to_str(), match_strrval_idx() match_strrval() which are behaving exactly as val_to_str(), match_strval_idx() and match_strval(). svn path=/trunk/; revision=20061
2006-05-21name changeRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18197
2005-06-26Get rid of the private "my_match_strval()" routine in many dissectors;Guy Harris1-6/+10
add a "match_strval_idx()" routine that does the same thing, and have "match_strval()" call it. Make those routines, and "val_to_str()", return a "const" pointer. Update dissectors as necessary to squelch compiler warnings produced by that. Use "val_to_str()" rather than using "match_strval()" and then, if the result is null, substituting a specific string. Clean up some other "match_strval()"/"val_to_str()" usages. Add a null pointer check in the NDPS dissector's "attribute_value()" routine, as it's not clear that "global_attribute_name" won't be null at that point. Make some global variables in the AFS4INT dissector local. Make some routines not used outside the module they're in static. Make some tables "static const". Clean up white space. Fix Gerald's address in some files. svn path=/trunk/; revision=14786
2005-06-16Get rid of several megabytes worth of warnings aboutJörg Mayer1-1/+1
"discards qualifier from assignment". svn path=/trunk/; revision=14663
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-05-07did some code cleanup, added some comments from value_string.cUlf Lamping1-5/+16
svn path=/trunk/; revision=10813
2004-02-22From Peter J. Creath: add a convenience macro for value_string tablesGuy Harris1-1/+4
where the values all have #defines or enum values and the corresponding strings are just the #define or enum value names. svn path=/trunk/; revision=10187
2003-12-01From Tomas Kukosa: add "decode_enumerated_bitfield_shifted()", which isGuy Harris1-1/+3
like "decode_enumerated_bitfield()" but handles value_string tables containing values as they appear in the bitfield rather than as they appear in the item containing the bitfield. svn path=/trunk/; revision=9134
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-4/+4
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6116
2001-11-04Declare routines exported to plugins through the plugin API table asGuy Harris1-5/+5
extern, so that "plugin_api_defs.h" works on platforms where you have to use the plugin API table. svn path=/trunk/; revision=4151
2001-04-01Moved the value_string structures and function from packet.{c,h} intoEd Warnicke1-0/+44
a separate value_string.{c,h}. svn path=/trunk/; revision=3221