aboutsummaryrefslogtreecommitdiffstats
path: root/epan/guid-utils.h
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2006-08-16 23:13:26 +0000
committerUlf Lamping <ulf.lamping@web.de>2006-08-16 23:13:26 +0000
commitde0594b9a5acc545acfd64e44cd2a9f2e4e84938 (patch)
treeb47bcb6f1e5e5d8bf3acb1c878934e71759ae5e3 /epan/guid-utils.h
parenteb7c653073081e10f0e7be97c5420f0884b28a1f (diff)
various UUID/GUID based changes.
I think I've changed all corresponding appearances from FT_STRING to FT_GUID, so assert the FT_ type as it should only be a FT_GUID now. Add a generic implementation in guid_utils.h to have a way to store data about GUID to name resolving (something like value_string for e.g. int). It might be better to have a single registry for all GUID's of all dissectors and implement the GUID name resolving into the proto_tree_add... functions. svn path=/trunk/; revision=18935
Diffstat (limited to 'epan/guid-utils.h')
-rw-r--r--epan/guid-utils.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/epan/guid-utils.h b/epan/guid-utils.h
index 8161e2b5cd..75e1cb463e 100644
--- a/epan/guid-utils.h
+++ b/epan/guid-utils.h
@@ -39,4 +39,23 @@ typedef struct _e_guid_t {
guint8 data4[8];
} e_guid_t;
+
+/* GUID "registry" */
+typedef struct _guid_key {
+ e_guid_t guid;
+} guid_key;
+
+typedef struct _guid_value {
+ const gchar *name;
+} guid_value;
+
+
+extern GHashTable *guids_new(void);
+
+/* add a GUID (don't forget to init the GHashTable) */
+extern void guids_add_guid(GHashTable *guids, e_guid_t *guid, gchar *name, void *private_data);
+
+/* try to get registered name for this guid */
+extern const gchar *guids_get_guid_name(GHashTable *guids, e_guid_t *guid);
+
#endif /* __GUID_UTILS_H__ */