ABSOLUTE_TIME_LOCAL or ABSOLUTE_TIME_UTC, indicating whether to display
the date/time in local time or UTC. (int)ABSOLUTE_TIME_LOCAL ==
(int)BASE_NONE, so there's no source or binary compatiblity issue,
although we might want to eliminate BASE_NONE at some point and have the
BASE_ values used with integral types start at 0, so that you can't
specify BASE_NONE for an integral field.
svn path=/trunk/; revision=31319
a mask to select the base_display_e value from a display field in a
header_field_info structure.
Never select that value by masking out the BASE_RANGE_STRING flag bit,
as that won't continue to work if more flag bits, or other bitfields,
are added. Instead, mask with BASE_DISPLAY_E_MASK.
Note that the base_display_e value and BASE_RANGE_STRING flag are only
for integral field types, and clarify what BASE_DISPLAY_E_MASK is.
Give at least one of the reasons why hiding protocol fields is not
considered a good idea.
svn path=/trunk/; revision=31249
indicating whether the time should be shown as local time or UTC. For
now, always pass FALSE, meaning "show as local time".
Clean up some stuff in the SNMP dissector, use abs_time_secs_to_str()
for times with one-second resolution, and update a comment in various
macros in the WSP dissector, while we're at it.
svn path=/trunk/; revision=31227
FT_NONE: Print nothing
FT_PROTOCOL: Print "Yes" if protocol exists in packet
FT_IPv6: Print address
The changes in r29551 made wireshark crash for this columns.
svn path=/trunk/; revision=31016
* Fix memleak (df->deprecated in dfilter_free())
* Free protocol hash tables on cleanup.
* Free protocols list on cleanup.
* Free memory allocated by fgetline() in parse_services_file()
From me:
* proto.c: set gmc_hfinfo to NULL after free
* proto.c: switch order of g_free() and g_list_remove() in proto_cleanup()
svn path=/trunk/; revision=29656
just commit this:
Change the checks for type FT_IPv6 to no longer require
a lenght of exaclty 16 bytes, but something between
0 and 16 bytes. That way, we can filter on prefixes
that do not provide the whole length of 16 bytes.
svn path=/trunk/; revision=29594
Also make use of TRY_TO_FAKE_THIS_ITEM in proto_tree_add_text_node(), proto_tree_add_none_format() and proto_tree_add_protocol_format().
svn path=/trunk/; revision=29380
This patch optimizes proto_tree_prime_hfid() + friends and
plugs a memleak in the process.
From me:
Removed unused hfindex in proto_tree_new_item()
Fixed ref_count entry in struct header_field_info.
svn path=/trunk/; revision=29137
- dump_values: Handle range_strings (prevents crash);
- dump_fields:
a. Formats 2,3: If type==FT_BOOLEAN: output integer "parent bitfield width"
in Field 7 instead of "BASE_NONE", etc. to allow addt'l
field validation when using ftsanity.py.
b. Format 3: Output bitmask (Field 8) in hex (0x...) instead of decimal.
svn path=/trunk/; revision=28134
don't return -1, and also always NUL terminate the string.
We can clean sources by removing dead/unnecessary code.
From me: A few additional changes re use of g_snprintf.
svn path=/trunk/; revision=27818
With this combination we get tree items with only the string match and not
the value, and the filter is created with the string. This is usefull
when having generated items with wireshark internals as values.
Also rewrote some string constructions.
svn path=/trunk/; revision=27667
Simplify/generalize proto_tree_add_bits_ret_val(): ability to use other display types, ie., use
hfinfo_uint_format() or hfinfo_uint64_format() to get the proper format string.
svn path=/trunk/; revision=26674
Currently, if you call proto_tree_free on anything other than the root node of a tree
the tree will get left in an inconsistent state. This is because the parent is left pointing
to the newly freed child.
The traversal code is updated, the parent node update is currently disabled since
freeing is done for the complete tree only at this time, so there is no need to keep
the parent node consistent.
svn path=/trunk/; revision=26466
This patch implements a function for dissecting bitfields with better control
over the resulting representation than the existing proto_tree_add_bitmask()
routine. This function will be used by reworked IPMI/ATCA dissector (bug 2048).
The function is described in README.developer. In short, the differences are as
follows:
- The new function does not require a hf_XXX field for the whole bitmask. When
the bitmask includes several unrelated fields, such hf_XXX field does not make
sense.
- The new function allows better control over the way the sub-item descriptions
are added to the top-level item. For example, proto_tree_add_bitmask() function
does not add non-enumerated integers, does not use true_false_string to display
boolean.
- The new function allows to specify "fallback" text for the top-level item
which is used if no items were added to the top-level item.
svn path=/trunk/; revision=25920
Changed the tfstring to use integer variable instead of value variable. The
integer value has had its "irrelevant portions" masked out and has been bit-
shifted whereas value hasn't. This led to unpredictable results when using
a true false string for a single bit of a byte.
svn path=/trunk/; revision=25169
- Change ugly GLIB version checking statements to GLIB_CHECK_VERSION
- Remove ws_strsplit files because we no longer need to borrow GLIB2's
g_strsplit code for the no longer supported GLIB1 builds
svn path=/trunk/; revision=24829
proto.[hc]
define new APIs to allow delayed registration of protocol fields,
so that dissectors with "flexible" fields like xml, radius, diameter,
snmp do not have to load their files at startup but can do so as late as possible.
gtk/dfilter_expr_dlg.c :
have the expression dialog registering all prefixes so that all fileds appear in the dialog
tshark.c
register all prefixes when called with -G
epan/radius_dict.l
epan/dissectors/packet-radius.c
epan/dissectors/packet-radius.h
refactor registration to delay dictionary loading as long as possible
svn path=/trunk/; revision=24762
Hexadecimal and octal are unsigned. Don't let dissectors register signed
fields (FT_INT*) to be displayed in hexadecimal (including HEX_DEC and DEC_HEX)
or octal. Fix dissectors that do that mostly by changing the fields to
unsigned though in PANA it appears the fields are meant to be signed so
change those fields to be displayed in decimal.
This fixes an assertion crash in hfinfo_numeric_format() if/when someone tries
to create a filter using one of these mixed signed/unsigned fields (because
that routine does not know how to present the user with a signed value in
hex).
Also add FT_*INT64 to the "make sure it's not BASE_NONE" check.
svn path=/trunk/; revision=24643
I can see this function is used in limited places.
I'm not sure if BASE_RANGE_STRING needs to masked out
of hfinfo->display in various other functions in proto.c.
svn path=/trunk/; revision=24598
- Change apply / prepare / ... as filter to use the field's value, which
is now stored in fdata as well as cinfo. Now we don't have to reprocess
the entire packet list when using these features. This also prevents
the use of these features from overwriting custom column information.
(custom columns can now be used in apply / prepare ... as filter)
- Break col_expr and col_expr_val out into a struct that is included not only
in cinfo, but now also fdata.
- Have col_custom_set_fstr() quote FT_STRING & FT_STRINGZ when storing the
col_expr_val value (for filter creation).
svn path=/trunk/; revision=24511
- In proto_tree_set_uint and proto_tree_set_int use value adjusted for bitmask.
- Removed col_custom_set_fstr in proto_tree_set_boolean to get a correct
adjusted value in proto_tree_set_uint.
- Set a default column width shorter than COL_INFO.
svn path=/trunk/; revision=24417
type: Custom) that were backed out in SVN revision 24309.
Changes since that revision include a reworking of the handling of the
cfile/cinfo variables in epan/column-utils.c, addition of three new
functions to libwireshark.def and a bug fix to prevent a crash when no
custom columns were not in use.
Compilation verified locally on MacOS X, Linux and Windows.
svn path=/trunk/; revision=24317