diff options
Diffstat (limited to '')
-rw-r--r-- | epan/guid-utils.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/epan/guid-utils.h b/epan/guid-utils.h index 87e7c85a..d7a2d212 100644 --- a/epan/guid-utils.h +++ b/epan/guid-utils.h @@ -12,18 +12,19 @@ #ifndef __GUID_UTILS_H__ #define __GUID_UTILS_H__ +#include <stdint.h> #include "ws_symbol_export.h" -#include <wsutil/wmem/wmem.h> +#include <epan/wmem_scopes.h> #define GUID_LEN 16 /* Note: this might be larger than GUID_LEN, so don't overlay data in packets with this. */ typedef struct _e_guid_t { - guint32 data1; - guint16 data2; - guint16 data3; - guint8 data4[8]; + uint32_t data1; + uint16_t data2; + uint16_t data3; + uint8_t data4[8]; } e_guid_t; #ifdef __cplusplus @@ -33,14 +34,17 @@ extern "C" { WS_DLL_PUBLIC void guids_init(void); /* add a GUID */ -WS_DLL_PUBLIC void guids_add_guid(const e_guid_t *guid, const gchar *name); +WS_DLL_PUBLIC void guids_add_guid(const e_guid_t *guid, const char *name); + +/* remove a guid to name mapping */ +WS_DLL_PUBLIC void guids_delete_guid(const e_guid_t *guid); /* try to get registered name for this GUID */ -WS_DLL_PUBLIC const gchar *guids_get_guid_name(const e_guid_t *guid, wmem_allocator_t *scope); +WS_DLL_PUBLIC const char *guids_get_guid_name(const e_guid_t *guid, wmem_allocator_t *scope); /* resolve GUID to name (or if unknown to hex string) */ /* (if you need hex string only, use guid_to_str instead) */ -WS_DLL_PUBLIC const gchar* guids_resolve_guid_to_str(const e_guid_t *guid, wmem_allocator_t *scope); +WS_DLL_PUBLIC const char* guids_resolve_guid_to_str(const e_guid_t *guid, wmem_allocator_t *scope); /* add a UUID (dcerpc_init_uuid() will call this too) */ #define guids_add_uuid(uuid, name) guids_add_guid((const e_guid_t *) (uuid), (name)) @@ -54,7 +58,7 @@ WS_DLL_PUBLIC const gchar* guids_resolve_guid_to_str(const e_guid_t *guid, wmem_ WS_DLL_PUBLIC int guid_cmp(const e_guid_t *g1, const e_guid_t *g2); -WS_DLL_PUBLIC guint guid_hash(const e_guid_t *guid); +WS_DLL_PUBLIC unsigned guid_hash(const e_guid_t *guid); #ifdef __cplusplus } |