Add casts to fix mac buildbots.
[metze/wireshark/wip.git] / epan / diam_dict.h
1 /*
2  ** diam_dict.h
3  ** Diameter Dictionary Import Routines
4  **
5  ** $Id$
6  **
7  ** (c) 2007, Luis E. Garcia Ontanon <luis@ontanon.org>
8  **
9  ** This library is free software; you can redistribute it and/or
10  ** modify it under the terms of the GNU Library General Public
11  ** License as published by the Free Software Foundation; either
12  ** version 2 of the License, or (at your option) any later version.
13  **
14  ** This library is distributed in the hope that it will be useful,
15  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
16  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  ** Library General Public License for more details.
18  **
19  ** You should have received a copy of the GNU Library General Public
20  ** License along with this library; if not, write to the Free Software
21  ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
23
24 #ifndef _DIAM_DICT_H_
25 #define _DIAM_DICT_H_
26
27 struct _ddict_namecode_t {
28         char* name;
29         guint code;
30         struct _ddict_namecode_t* next; 
31 };
32
33 typedef struct _ddict_namecode_t ddict_gavp_t;
34 typedef struct _ddict_namecode_t ddict_enum_t;
35 typedef struct _ddict_namecode_t ddict_application_t;
36
37 typedef struct _ddict_vendor_t {
38         char* name;
39         char* desc;
40         guint code;
41         struct _ddict_vendor_t* next;   
42 } ddict_vendor_t;
43
44 typedef struct _ddict_avp_t {
45         char* name;
46         char* description;
47         char* vendor;
48         char* type;
49         guint code;
50         ddict_gavp_t* gavps;
51         ddict_enum_t* enums;
52         struct _ddict_avp_t* next;
53 } ddict_avp_t;
54
55 typedef struct _ddict_typedefn_t {
56         char* name;
57         char* parent;
58         struct _ddict_typedefn_t* next;
59 } ddict_typedefn_t;
60
61 typedef struct _ddict_cmd_t {
62         char* name;
63         char* vendor;
64         guint code;
65         struct _ddict_cmd_t* next;
66 } ddict_cmd_t;
67
68 typedef struct _ddict_xmlpi_t {
69         char* name;
70         char* key;
71         char* value;
72         struct _ddict_xmlpi_t* next;
73 } ddict_xmlpi_t;
74
75 typedef struct _ddict_t {
76         ddict_application_t* applications;
77         ddict_vendor_t* vendors;
78         ddict_cmd_t* cmds;
79         ddict_typedefn_t* typedefns;
80         ddict_avp_t* avps;
81         ddict_xmlpi_t* xmlpis;
82 } ddict_t;
83
84 extern void ddict_print(FILE* fh, ddict_t* d);
85 extern ddict_t* ddict_scan(const char* directory, const char* filename, int dbg);
86 extern void ddict_free(ddict_t* d);
87
88 #endif