Commit Graph

430 Commits

Author SHA1 Message Date
Ronnie Sahlberg 4f3db1a1a8 Change printing of all BASE_OCT values to use the alternate form
%#o instead of %o

This means that the value will be printed with a leading 0, which is the 
standard way to denominate that a value is in base octal.



svn path=/trunk/; revision=32241
2010-03-19 02:05:18 +00:00
Jaap Keuter 7be36221d8 Fix for bug 4563:
Always have a tvb when adding a tree item.

svn path=/trunk/; revision=32146
2010-03-08 21:04:47 +00:00
Guy Harris 500eb99cd9 Add a third date format, ABSOLUTE_TIME_DOY_UTC, to show UTC with the
date as YYYY/DDD, where DDD is a 1-origin day of year.  Move the formats
to a "time_fmt.h" file, included by the headers that use it.  Have
abs_time_to_str() and abs_time_secs_to_str() take the date format value,
rather than a Boolean "show this as UTC" flag, as an argument.  Document
the ABSOLUTE_TIME_ formats a bit better.  Use that format in the CCSDS
and VCDU dissectors, rather than having those dissectors do the
formatting themselves.

svn path=/trunk/; revision=32034
2010-02-27 19:01:27 +00:00
Gerasimos Dimitriadis 6fd1cec787 From Jakub Zawadzki:
Remove prepare_bits_string from proto.c; Use
equivalent function decode_bits_in_field in to_str.c

svn path=/trunk/; revision=31665
2010-01-25 18:26:47 +00:00
Gerasimos Dimitriadis acd35de1f4 Minor simplification in length calculation of proto_tree_add_bits
and _format_value

svn path=/trunk/; revision=31640
2010-01-24 12:08:14 +00:00
Gerasimos Dimitriadis 383f6a65dc Add _format_value variants of the proto_tree_add_bits function
for different header field types; now possible to add bits item
for FT_FLOAT and FT_INT types.

svn path=/trunk/; revision=31633
2010-01-23 16:17:17 +00:00
Gerasimos Dimitriadis 88835212b1 Use true/false strings instead of actual numeric values when adding a boolean
field as a bits item and no custom strings are defined.

svn path=/trunk/; revision=31375
2009-12-28 21:20:27 +00:00
Guy Harris 8e236e55de For fields of type FT_ABSOLUTE_TIME, have the "display" value be one of
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
2009-12-19 03:17:44 +00:00
Guy Harris a4b7135ce3 Rename BASE_STRUCTURE_RESET to BASE_DISPLAY_E_MASK, to clarify that it's
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
2009-12-12 03:15:28 +00:00
Guy Harris 4fde145bd2 Add an argument to abs_time_to_str() and abs_time_secs_to_str()
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
2009-12-10 22:19:29 +00:00
Stig Bjørlykke 185488655e No need to do string compare for FT_PROTOCOL.
svn path=/trunk/; revision=31018
2009-11-19 16:12:08 +00:00
Stig Bjørlykke a1c8cdcc7c Added support for some missing custom column types:
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
2009-11-19 13:29:57 +00:00
Stig Bjørlykke b510b97ff1 Return FALSE from proto_tracking_interesting_fields() when no tree.
svn path=/trunk/; revision=30533
2009-10-12 08:19:30 +00:00
Stig Bjørlykke ec95db36a7 Check for valid tree in proto_get_finfo_ptr_array() and
proto_tracking_interesting_fields().

This fixes a crash when using Lua script without packet list coloring.

svn path=/trunk/; revision=30532
2009-10-12 08:16:50 +00:00
Kovarththanan Rajaratnam 996e27dbc7 Set INITIAL_NUM_PROTOCOL_HFINFO to a more sensible value, e.g. 1500. Currently it is set to 200 even though we have way more protocols in Wireshark:
$ ./tshark -G protocols | wc -l
1066

svn path=/trunk/; revision=30501
2009-10-11 09:35:34 +00:00
Kovarththanan Rajaratnam ee9ea561d2 As pointed out by Bill [1] we leak some header_field_info structs on shutdown. This change plugs that mem leak.
[1] http://www.wireshark.org/lists/wireshark-dev/200910/msg00074.html

svn path=/trunk/; revision=30500
2009-10-11 09:18:51 +00:00
Kovarththanan Rajaratnam 34e05c76f7 Replace g_malloc + memset with g_new0
svn path=/trunk/; revision=30499
2009-10-11 09:02:04 +00:00
Kovarththanan Rajaratnam ca53b00b7e Set tree_is_expanded to NULL after freeing it
svn path=/trunk/; revision=30498
2009-10-11 08:57:08 +00:00
Kovarththanan Rajaratnam b998cb04de Use the slice allocator if GLIB_CHECK_VERSION > (2,10,0)
svn path=/trunk/; revision=30497
2009-10-11 08:52:34 +00:00
Jaap Keuter ee2043792f Tighten header field checks.
svn path=/trunk/; revision=30410
2009-10-08 21:26:26 +00:00
Kovarththanan Rajaratnam e981de7a99 Don't attempt to fill custom columns if we don't have a valid column expression.
svn path=/trunk/; revision=30407
2009-10-08 16:35:58 +00:00
Stig Bjørlykke 5bc9611d56 Removed a redundant prototype.
Made wrs_count_bitshift static.

svn path=/trunk/; revision=30387
2009-10-07 08:37:18 +00:00
Bill Meier bf85ecb308 Rename hfinfo.ref_count to hfinfo.ref_type since that's now how it's used.
svn path=/trunk/; revision=30216
2009-09-30 14:02:49 +00:00
Stig Bjørlykke ad14865ce0 Removed unused variable 'hfinfo' in proto_tree_set_time().
svn path=/trunk/; revision=30197
2009-09-29 19:16:52 +00:00
Kovarththanan Rajaratnam 778fe81f72 (Trivial) White space changes
svn path=/trunk/; revision=30095
2009-09-23 16:27:37 +00:00
Bill Meier 5bbec764db (Trivial) Rework a comment slightly.
svn path=/trunk/; revision=30080
2009-09-22 20:17:31 +00:00
Kovarththanan Rajaratnam 56b8d36e03 Introduce a few FT_XXX lengths defines and use those instead of hard coding constants
svn path=/trunk/; revision=29846
2009-09-10 18:22:33 +00:00
Gerald Combs c238175acf Move the infinite loop check from proto_tree_add_node to
TRY_TO_FAKE_THIS_ITEM. Partial fix for bug 3986.

svn path=/trunk/; revision=29811
2009-09-08 22:56:55 +00:00
Kovarththanan Rajaratnam d2db67480c Use g_strlcpy when possible
svn path=/trunk/; revision=29808
2009-09-08 20:06:52 +00:00
Anders Broman c6d4c80371 From : Didier Gautheron
speed up a little proto_custom_set.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3972

svn path=/trunk/; revision=29789
2009-09-08 10:33:15 +00:00
Kovarththanan Rajaratnam 571e69fdfa We don't currently fake fields if they are referenced indirectly through some other fields (currently only FT_PROTOCOL's can be indirectly referenced) . However, there doesn't seem to be any reason for this restriction. We already have proto_tree_set_fake_protocols() to disable 'faking' if any clients requires this. So, this changelist removes this restriction on indirectly referenced fields.
svn path=/trunk/; revision=29742
2009-09-06 11:30:41 +00:00
Kovarththanan Rajaratnam 820ce62af5 This fix was supposed to be in r29731 which some how only contained whitespace changes.
svn path=/trunk/; revision=29732
2009-09-06 07:33:07 +00:00
Kovarththanan Rajaratnam 9c512f7cb4 Introduce TRY_TO_FAKE_THIS_REPR which is an optimization similar to the existing TRY_TO_FAKE_THIS_ITEM. The purpose of TRY_TO_FAKE_THIS_REPR is to avoid generating the string representation for the protocol item. There is no point in doing this if the protocol tree isn't visible. In this case the result will be discarded any way.
svn path=/trunk/; revision=29731
2009-09-06 07:24:54 +00:00
Kovarththanan Rajaratnam 4df25480b7 The frame dissector disables the TRY_TO_FAKE_THIS_ITEM() optimization by marking the protocol tree as permamently visible. It only needs to disable the optimization temporarily while it creates the protocol item it intends to use proto_item_append_string() on
svn path=/trunk/; revision=29730
2009-09-06 06:33:13 +00:00
Kovarththanan Rajaratnam 17f010119a From Jakub Zawadzki via. Bug 3330:
* 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
2009-09-01 18:16:55 +00:00
Kovarththanan Rajaratnam 8cba530c81 From Richard Brodie via. Bug 3913:
Free ptr array allocated through proto_find_finfo()

svn path=/trunk/; revision=29654
2009-09-01 17:09:36 +00:00
Kovarththanan Rajaratnam cd49063473 Revert r29614 until I figure out why buildbot doesn't like it
svn path=/trunk/; revision=29615
2009-08-29 07:53:48 +00:00
Kovarththanan Rajaratnam cc948586bf Use G_STRINGIFY/G_PASTE
svn path=/trunk/; revision=29614
2009-08-29 06:42:23 +00:00
Jörg Mayer 4d8506486f After asking on the list and receiving no feedback, I'll
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
2009-08-28 09:38:34 +00:00
Anders Broman 32e7cddf70 From Didier Gautheron:
move custom col set from  proto_tree_set_xxx() to
epan_dissect_fill_in_columns().
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3930

I'v added the new functions to the .h files.

svn path=/trunk/; revision=29551
2009-08-25 21:10:35 +00:00
Kovarththanan Rajaratnam da1e555499 Don't dereference pointer before checking for NULL
svn path=/trunk/; revision=29503
2009-08-21 23:02:59 +00:00
Kovarththanan Rajaratnam 8a3f4f53eb Delay TRY_TO_FAKE_THIS_ITEM() in proto_tree_add_bits_ret_val() until we know it is safe.
Thanks to Martin for pointing this out in r29493.

svn path=/trunk/; revision=29494
2009-08-21 17:11:02 +00:00
Martin Mathieson 044aabb9ea Don't try TRY_TO_FAKE_THIS_ITEM in proto_tree_add_bits_ret_val(), as otherwise
the side effect 'return_value' getting set doesn't happen.

svn path=/trunk/; revision=29493
2009-08-21 15:16:27 +00:00
Kovarththanan Rajaratnam 27f7d88c84 Also fake empty field_info's by gracefully handling NULL field_info pointer elsewhere.
svn path=/trunk/; revision=29490
2009-08-21 11:03:30 +00:00
Kovarththanan Rajaratnam 0f6b75b7ea Move TRY_TO_FAKE_THIS_ITEM to all public proto_xxx methods. Currently we rely on our internal (static) helper functions to do the faking. However, when they fake a protocol tree, they usually return a valid tree (although a dummy tree it is still a valid one). This means that we end up calling proto_tree_set_representation + friends on it for no reason. By moving TRY_TO_FAKE_THIS_ITEM to the public proto_xxx methods we're able to bail immediately (when we're allowed to do so).
svn path=/trunk/; revision=29480
2009-08-19 19:08:34 +00:00
Kovarththanan Rajaratnam 460eacaae1 Move the NULL pointer 'tree' check under TRY_TO_FAKE_THIS_ITEMs umbrella
svn path=/trunk/; revision=29453
2009-08-17 11:21:33 +00:00
Kovarththanan Rajaratnam 69babcb4a6 Don't do PROTO_REGISTRAR_GET_NTH twice.
svn path=/trunk/; revision=29452
2009-08-17 11:13:36 +00:00
Kovarththanan Rajaratnam da97c3e2b6 This should have been part of r29428. This patch forces proto_field_is_referenced() to respect the fake_protocols flag set by Protocol Hierarchy stats tap.
svn path=/trunk/; revision=29429
2009-08-15 08:38:50 +00:00
Kovarththanan Rajaratnam 9eec025c49 DISSECTOR_ASSERT on FT_PCRE in construct_match_selected_string().
svn path=/trunk/; revision=29396
2009-08-12 18:24:49 +00:00
Kovarththanan Rajaratnam 261a8406bc TRY_TO_FAKE_THIS_ITEM now fakes FT_PROTOCOL per default. If there are any users (e.g. proto_hier_stats.c, others?) that relies on FT_PROTOCOL nodes being created they'll now need to call the newly introduced epan_dissect_fake_protocols() to disable this optimization.
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
2009-08-11 18:08:03 +00:00
Kovarththanan Rajaratnam 083729e02c Add PTREE_FINFO and use PITEM_FINFO when possible.
svn path=/trunk/; revision=29355
2009-08-09 17:57:31 +00:00
Kovarththanan Rajaratnam 3512e485ca Add PNODE_FINFO. We've been using PITEM_FINFO on proto_node's. This works because proto_item is typedefed to proto_node. We shouldn't rely on this since this is an implementation detail.
svn path=/trunk/; revision=29354
2009-08-09 17:33:23 +00:00
Bill Meier dd2a488581 g_error() if registering a subtree item type already registered (or not initialized to -1).
svn path=/trunk/; revision=29352
2009-08-09 15:49:02 +00:00
Anders Broman ded297677f From Kovarththanan Rajaratnam:
Precompile custom columns filters.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3767

svn path=/trunk/; revision=29174
2009-07-23 05:48:39 +00:00
Stig Bjørlykke 221225e0f3 From Kovarththanan Rajaratnam via bug 3719:
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
2009-07-18 20:10:14 +00:00
Stig Bjørlykke 3ebdfb7c9c From Kovarththanan Rajaratnam:
Add "text" abbrev + tighten FT_FRAMENUM checks.

svn path=/trunk/; revision=29100
2009-07-15 08:56:12 +00:00
Stig Bjørlykke 3f53109d7e Added some casts for true_false_string's.
svn path=/trunk/; revision=28992
2009-07-07 16:04:26 +00:00
Jeff Morriss ac43decf1c ptvcursor_add_text_with_subtree(): Don't crash if called with a NULL tree.
Also fix up some indenting.

svn path=/trunk/; revision=28712
2009-06-12 14:32:32 +00:00
Stig Bjørlykke f6826c9c02 Fix a small indent issue in a comment.
svn path=/trunk/; revision=28693
2009-06-11 10:10:42 +00:00
Sebastien Tandel 52cc5fb1e8 python binding for wireshark (first commit)
* ability to write dissectors with python for wireshark.
        documentation (http://wiki.wireshark.org/Python)


svn path=/trunk/; revision=28529
2009-05-29 21:10:40 +00:00
Bill Meier d349ab0061 proto.c: proto_registrar_dump...() fixes/changes:
- 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
2009-04-22 19:50:34 +00:00
Gerald Combs f0eeb0bdf1 More size_t fixes. Use a string buffer in range.c.
svn path=/trunk/; revision=27999
2009-04-08 16:50:20 +00:00
Bill Meier 1e66f1a63f From Jakub Zawadzki: g_snprintf() & etc since glib 1.3.12
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
2009-03-22 15:31:44 +00:00
Stig Bjørlykke 62f60df6b4 From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it.

svn path=/trunk/; revision=27718
2009-03-13 22:06:48 +00:00
Stig Bjørlykke c16347358f From Jakub Zawadzki (bug3330):
Initialize hfinfo->display for FT_PROTOCOL.

svn path=/trunk/; revision=27711
2009-03-12 20:35:43 +00:00
Stig Bjørlykke 628f229936 Removed support for FT_UINT64/BASE_NONE/VALS combination.
svn path=/trunk/; revision=27671
2009-03-09 08:45:01 +00:00
Stig Bjørlykke de14669997 Added FT_INT*/FT_UINT* with BASE_NONE and a value string as a valid combination.
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
2009-03-09 00:24:21 +00:00
Jaap Keuter d27c92e496 Add posibility to mark protocol as private. This prevents inadvertent Wiki access.
svn path=/trunk/; revision=27533
2009-02-24 17:24:03 +00:00
Gerald Combs 6d04f793f0 Back out r27047 and r27053.
svn path=/trunk/; revision=27062
2008-12-19 17:39:52 +00:00
Martin Mathieson 3633774826 Make proto_tree_add_bytes_format() (unused) behave as expected.
Was identical to proto_tree_add_bytes_format_value().

svn path=/trunk/; revision=27047
2008-12-18 17:08:26 +00:00
Bill Meier a668ca6bc5 Fix trivial spelling error
svn path=/trunk/; revision=27004
2008-12-15 17:05:41 +00:00
Tomas Kukosa 99295ee0d2 put the SCTP PPI for current DATA chunk into packet_info (and ppid array renamed to ppids)
svn path=/trunk/; revision=26958
2008-12-10 11:04:36 +00:00
Jaap Keuter e12599f5c9 Tighten field array check to avoid printing problems.
svn path=/trunk/; revision=26849
2008-11-26 07:25:18 +00:00
Jaap Keuter 54899df0c8 From Michael McCartney:
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
2008-11-03 07:32:55 +00:00
Stig Bjørlykke 5e5a674e76 Show both short and long protocol name in the Filter Expression dialog.
svn path=/trunk/; revision=26537
2008-10-24 07:48:09 +00:00
Jaap Keuter 0fde67dd54 From Andrew Narver:
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
2008-10-15 20:02:15 +00:00
Stig Bjørlykke 6012a91ebb Added an option to syntax check only a single field name.
svn path=/trunk/; revision=26405
2008-10-10 17:00:38 +00:00
Stig Bjørlykke d84791245b As reported by Chidambaram Arunachalam in bug 2893:
Handle RVALS correctly in proto_tree_set_(u)int and label_fill_(u)int

svn path=/trunk/; revision=26257
2008-09-23 23:58:23 +00:00
Anders Broman da85c3dfab From Alexey Neyman :
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
2008-08-04 20:41:43 +00:00
Anders Broman baf9959afa From Alexey Neyman:
Fix proto_tree_add_*_format_value() operation on bitfields.

svn path=/trunk/; revision=25888
2008-08-01 10:16:52 +00:00
Anders Broman 876e751069 From Alexey Neyman :
Implement BASE_CUSTOM display type

svn path=/trunk/; revision=25870
2008-07-30 12:30:02 +00:00
Jeff Morriss acd338f422 Remove the (long deprecated) proto_tree_add_*_hidden() functions
svn path=/trunk/; revision=25820
2008-07-24 15:35:29 +00:00
Guy Harris 094911ef4f Rename arguments not to collide with function names, to avoid warnings
from -Wshadow, as noted by John Smith.

svn path=/trunk/; revision=25540
2008-06-23 20:15:30 +00:00
Jaap Keuter bfcdda1353 ptvcursor_subtree_set_item() does not need to be exported.
svn path=/trunk/; revision=25441
2008-06-11 18:16:04 +00:00
Stephen Fisher eedcd98bd2 Fix for bug #2480: Custom column, wrong display of 802.11 Sleep mode status
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
2008-04-25 05:16:23 +00:00
Richard van der Hoff bcfb45de67 fields passed into proto_tree_add_bits_* should have bits==0
svn path=/trunk/; revision=25074
2008-04-16 09:49:39 +00:00
Anders Broman 63c5c71cf8 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24859
2008-04-09 05:36:08 +00:00
Stephen Fisher 726a1caaf1 - Remove GLIB1 code
- 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
2008-04-07 05:22:54 +00:00
Luis Ontanon a476c85e21 typo initializators -> initializers
svn path=/trunk/; revision=24763
2008-04-03 22:18:08 +00:00
Luis Ontanon 906d2f3cbb http://www.wireshark.org/lists/wireshark-dev/200803/msg00308.html
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
2008-04-03 22:13:52 +00:00
Jeff Morriss 689e8bd855 From http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1539 :
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
2008-03-15 22:41:57 +00:00
Martin Mathieson 8605cec511 Fix for bug 2328.
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
2008-03-10 15:36:44 +00:00
Jeff Morriss 5ca9e9cbe8 Fix http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2009 : if the dissector told us how to format the representation of an item then indicate if we truncated it (we were already doing this if we formatted the representation). Do the same for FT_BYTES.
svn path=/trunk/; revision=24593
2008-03-09 14:50:14 +00:00
Stephen Fisher 56226b49b8 Custom column updates:
- 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
2008-03-01 05:16:45 +00:00
Stig Bjørlykke 545fdf0586 Added support for FT_IPv4, FT_GUID and FT_OID in custom columns.
svn path=/trunk/; revision=24455
2008-02-24 20:57:34 +00:00
Stig Bjørlykke a50f232cac Print integer values according to hfinfo->display.
svn path=/trunk/; revision=24420
2008-02-22 13:27:46 +00:00
Stig Bjørlykke 20ed60cf1f Added FT_ABSOLUTE_TIME and FT_RELATIVE_TIME to custom columns.
svn path=/trunk/; revision=24419
2008-02-22 12:28:41 +00:00
Stig Bjørlykke 33524cdd48 Some custom column enhancements:
Use the value_string if defined for integer and boolean values.

svn path=/trunk/; revision=24418
2008-02-22 12:06:29 +00:00
Stig Bjørlykke 67aa6856de Some custom column fixes:
- 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
2008-02-22 11:32:36 +00:00
Stephen Fisher 2a8e74cedc Add ability to make more field types into custom columns: FT_ETHER & FT_BYTES.
Also change display of FT_STRING(Z) to turn non-printable characters into
backslash + number values. 


svn path=/trunk/; revision=24415
2008-02-22 03:44:08 +00:00