diff options
author | Guy Harris <guy@alum.mit.edu> | 2002-05-11 18:58:02 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2002-05-11 18:58:02 +0000 |
commit | 0bcf2de0d94117c55ecdf109992ec1b9a3634e57 (patch) | |
tree | 739275caf1f64b3300b2547aeea2926683299a5d /prefs.h | |
parent | e694a0fbe2be2ab8816323f642ddfaed3bfde304 (diff) |
Add a mechanism for registering "obsolete" preference modules, so that
if a dissector had preferences at one point but no longer does, it can
register that fact, so that the old preferences in the preference file
are silently ignored.
Use that mechanism in the NCP dissector.
svn path=/trunk/; revision=5446
Diffstat (limited to 'prefs.h')
-rw-r--r-- | prefs.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,7 +1,7 @@ /* prefs.h * Definitions for preference handling routines * - * $Id: prefs.h,v 1.37 2002/01/13 20:35:08 guy Exp $ + * $Id: prefs.h,v 1.38 2002/05/11 18:58:02 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -106,7 +106,16 @@ typedef void (*module_cb)(module_t *module, gpointer user_data); extern module_t *prefs_register_protocol(int id, void (*apply_cb)(void)); /* + * Register that a protocol used to have preferences but no longer does, + * by creating an "obsolete" module for it. + */ +extern module_t *prefs_register_protocol_obsolete(int id); + +/* * Call a callback function, with a specified argument, for each module. + * Ignores "obsolete" modules; their sole purpose is to allow old + * preferences for dissectors that no longer have preferences to be + * silently ignored in preference files. */ extern void prefs_module_foreach(module_cb callback, gpointer user_data); |