(Trivial) Fix spellling in a comment.
[metze/wireshark/wip.git] / epan / guid-utils.h
1 /* guid-utils.h
2  * Definitions for GUID handling
3  *
4  * $Id$
5  *
6  * Wireshark - Network traffic analyzer
7  * By Gerald Combs <gerald@wireshark.org>
8  *
9  * Copyright 1998 Gerald Combs
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25
26 #ifndef __GUID_UTILS_H__
27 #define __GUID_UTILS_H__
28
29 #include "ws_symbol_export.h"
30
31 #define GUID_LEN        16
32
33 /* Note: this might be larger than GUID_LEN, so don't overlay data in packets
34    with this. */
35 typedef struct _e_guid_t {
36     guint32 data1;
37     guint16 data2;
38     guint16 data3;
39     guint8  data4[8];
40 } e_guid_t;
41
42
43 WS_DLL_PUBLIC void guids_init(void);
44
45 /* add a GUID */
46 WS_DLL_PUBLIC void guids_add_guid(const e_guid_t *guid, const gchar *name);
47
48 /* try to get registered name for this GUID */
49 WS_DLL_PUBLIC const gchar *guids_get_guid_name(const e_guid_t *guid);
50
51 /* resolve GUID to name (or if unknown to hex string) */
52 /* (if you need hex string only, use guid_to_ep_str instead) */
53 WS_DLL_PUBLIC const gchar* guids_resolve_guid_to_str(const e_guid_t *guid);
54
55 /* add a UUID (dcerpc_init_uuid() will call this too) */
56 #define guids_add_uuid(uuid, name) guids_add_guid((const e_guid_t *) (uuid), (name))
57
58 /* try to get registered name for this UUID */
59 #define guids_get_uuid_name(uuid) guids_get_guid_name((e_guid_t *) (uuid))
60
61 /* resolve UUID to name (or if unknown to hex string) */
62 /* (if you need hex string only, use guid_to_ep_str instead) */
63 #define guids_resolve_uuid_to_str(uuid) guids_resolve_guid_to_str((e_guid_t *) (uuid))
64
65 #endif /* __GUID_UTILS_H__ */