2 * Definitions for GUID handling
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
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.
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.
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.
26 #ifndef __GUID_UTILS_H__
27 #define __GUID_UTILS_H__
29 #include "ws_symbol_export.h"
33 /* Note: this might be larger than GUID_LEN, so don't overlay data in packets
35 typedef struct _e_guid_t
{
43 WS_DLL_PUBLIC
void guids_init(void);
46 WS_DLL_PUBLIC
void guids_add_guid(e_guid_t
*guid
, const gchar
*name
);
48 /* try to get registered name for this GUID */
49 WS_DLL_PUBLIC
const gchar
*guids_get_guid_name(e_guid_t
*guid
);
51 /* resolve GUID to name (or if unknown to hex string) */
52 /* (if you need hex string only, use guid_to_str instead) */
53 WS_DLL_PUBLIC
const gchar
* guids_resolve_guid_to_str(e_guid_t
*guid
);
55 /* add a UUID (dcerpc_init_uuid() will call this too) */
56 #define guids_add_uuid(uuid, name) guids_add_guid((e_guid_t *) (uuid), (name))
58 /* try to get registered name for this UUID */
59 #define guids_get_uuid_name(uuid) guids_get_guid_name((e_guid_t *) (uuid))
61 /* resolve UUID to name (or if unknown to hex string) */
62 /* (if you need hex string only, use guid_to_str instead) */
63 #define guids_resolve_uuid_to_str(uuid) guids_resolve_guid_to_str((e_guid_t *) (uuid))
65 extern int guid_cmp(const e_guid_t
*g1
, const e_guid_t
*g2
);
67 #endif /* __GUID_UTILS_H__ */