aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2009-12-11 17:35:10 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2009-12-11 17:35:10 +0000
commit6af0e4e0023dd512f95eb7e9f21d5c4f169a000c (patch)
tree272cdea8dc3a69bcbf4676bd9fafee118f9e3f6e
parentba0c85ba088388162dff9d82c065ec195b8447b8 (diff)
From Richard Pecl:
Adding prefs_register_protocol_subtree to libwireshark.def svn path=/trunk/; revision=31246
-rw-r--r--doc/README.developer16
-rw-r--r--epan/libwireshark.def1
2 files changed, 17 insertions, 0 deletions
diff --git a/doc/README.developer b/doc/README.developer
index d3fb0e53b6..fd6147ed22 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -961,6 +961,16 @@ proto_register_PROTOABBREV(void)
PROTOABBREV_module = prefs_register_protocol(proto_PROTOABBREV,
proto_reg_handoff_PROTOABBREV);
+/* Register preferences module under preferences subtree.
+ Use this function instead of prefs_register_protocol if you want to group
+ preferences of several protocols under one preferences subtree.
+ Argument subtree identifies grouping tree node name, several subnodes can be
+ specified usign slash '/' (e.g. "OSI/X.500" - protocol preferences will be
+ accessible under Protocols->OSI->X.500-><PROTOSHORTNAME> preferences node.
+*/
+ PROTOABBREV_module = prefs_register_protocol_subtree(const char *subtree,
+ proto_PROTOABBREV, proto_reg_handoff_PROTOABBREV);
+
/* Register a sample preference */
prefs_register_bool_preference(PROTOABBREV_module, "show_hex",
"Display numbers in Hex",
@@ -3387,11 +3397,17 @@ to a configuration dialog.
You must register the module with the preferences routine with -
module_t *prefs_register_protocol(proto_id, void (*apply_cb)(void))
+ or
+ module_t *prefs_register_protocol_subtree(const char *subtree, int id,
+ void (*apply_cb)(void));
+
Where: proto_id - the value returned by "proto_register_protocol()" when
the protocol was registered.
apply_cb - Callback routine that is called when preferences are
applied. It may be NULL, which inhibits the callback.
+ subtree - grouping preferences tree node name (several protocols can
+ be grouped under one preferences subtree)
Then you can register the fields that can be configured by the user with these
routines -
diff --git a/epan/libwireshark.def b/epan/libwireshark.def
index a7e1be7bb0..e9cf02bcf8 100644
--- a/epan/libwireshark.def
+++ b/epan/libwireshark.def
@@ -667,6 +667,7 @@ prefs_register_enum_preference
prefs_register_modules
prefs_register_obsolete_preference
prefs_register_protocol
+prefs_register_protocol_subtree
prefs_register_range_preference
prefs_register_static_text_preference
prefs_register_string_preference