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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #ifndef __GUID_UTILS_H__
27 #define __GUID_UTILS_H__
31 /* Note: this might be larger than GUID_LEN, so don't overlay data in packets
33 typedef struct _e_guid_t {
41 extern void guids_init(void);
44 extern void guids_add_guid(e_guid_t *guid, const gchar *name);
46 /* try to get registered name for this GUID */
47 extern const gchar *guids_get_guid_name(e_guid_t *guid);
49 /* resolve GUID to name (or if unknown to hex string) */
50 /* (if you need hex string only, use guid_to_str instead) */
51 extern const gchar* guids_resolve_guid_to_str(e_guid_t *guid);
53 /* add a UUID (dcerpc_init_uuid() will call this too) */
54 #define guids_add_uuid(uuid, name) guids_add_guid((e_guid_t *) (uuid), (name))
56 /* try to get registered name for this UUID */
57 #define guids_get_uuid_name(uuid) guids_get_guid_name((e_guid_t *) (uuid))
59 /* resolve UUID to name (or if unknown to hex string) */
60 /* (if you need hex string only, use guid_to_str instead) */
61 #define guids_resolve_uuid_to_str(uuid) guids_resolve_guid_to_str((e_guid_t *) (uuid))
63 #endif /* __GUID_UTILS_H__ */