2 * Definitions for GUID handling
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef __GUID_UTILS_H__
13 #define __GUID_UTILS_H__
15 #include "ws_symbol_export.h"
19 /* Note: this might be larger than GUID_LEN, so don't overlay data in packets
21 typedef struct _e_guid_t {
29 WS_DLL_PUBLIC void guids_init(void);
32 WS_DLL_PUBLIC void guids_add_guid(const e_guid_t *guid, const gchar *name);
34 /* try to get registered name for this GUID */
35 WS_DLL_PUBLIC const gchar *guids_get_guid_name(const e_guid_t *guid);
37 /* resolve GUID to name (or if unknown to hex string) */
38 /* (if you need hex string only, use guid_to_str instead) */
39 WS_DLL_PUBLIC const gchar* guids_resolve_guid_to_str(const e_guid_t *guid);
41 /* add a UUID (dcerpc_init_uuid() will call this too) */
42 #define guids_add_uuid(uuid, name) guids_add_guid((const e_guid_t *) (uuid), (name))
44 /* try to get registered name for this UUID */
45 #define guids_get_uuid_name(uuid) guids_get_guid_name((e_guid_t *) (uuid))
47 /* resolve UUID to name (or if unknown to hex string) */
48 /* (if you need hex string only, use guid_to_str instead) */
49 #define guids_resolve_uuid_to_str(uuid) guids_resolve_guid_to_str((e_guid_t *) (uuid))
51 WS_DLL_PUBLIC int guid_cmp(const e_guid_t *g1, const e_guid_t *g2);
53 #endif /* __GUID_UTILS_H__ */