Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

guid-utils.h
1 /* guid-utils.h
2 * Definitions for GUID handling
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 *
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11
12 #ifndef __GUID_UTILS_H__
13 #define __GUID_UTILS_H__
14
15 #include "ws_symbol_export.h"
16
17 #define GUID_LEN 16
18
19 /* Note: this might be larger than GUID_LEN, so don't overlay data in packets
20 with this. */
21 typedef struct _e_guid_t {
22 guint32 data1;
23 guint16 data2;
24 guint16 data3;
25 guint8 data4[8];
26 } e_guid_t;
27
28
29 WS_DLL_PUBLIC void guids_init(void);
30
31 /* add a GUID */
32 WS_DLL_PUBLIC void guids_add_guid(const e_guid_t *guid, const gchar *name);
33
34 /* try to get registered name for this GUID */
35 WS_DLL_PUBLIC const gchar *guids_get_guid_name(const e_guid_t *guid);
36
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);
40
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))
43
44 /* try to get registered name for this UUID */
45 #define guids_get_uuid_name(uuid) guids_get_guid_name((e_guid_t *) (uuid))
46
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))
50
51 WS_DLL_PUBLIC int guid_cmp(const e_guid_t *g1, const e_guid_t *g2);
52
53 #endif /* __GUID_UTILS_H__ */
_e_guid_t
Definition: guid-utils.h:21