cd ../gtk ==> cd ../ui/gtk
[obnox/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
21  ** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22  ** Boston, MA  02111-1307, USA.
23  */
24
25 #ifndef _DIAM_DICT_H_
26 #define _DIAM_DICT_H_
27
28 struct _ddict_namecode_t {
29         char* name;
30         unsigned code;
31         struct _ddict_namecode_t* next; 
32 };
33
34 typedef struct _ddict_namecode_t ddict_gavp_t;
35 typedef struct _ddict_namecode_t ddict_enum_t;
36 typedef struct _ddict_namecode_t ddict_application_t;
37
38 typedef struct _ddict_vendor_t {
39         char* name;
40         char* desc;
41         unsigned code;
42         struct _ddict_vendor_t* next;   
43 } ddict_vendor_t;
44
45 typedef struct _ddict_avp_t {
46         char* name;
47         char* description;
48         char* vendor;
49         char* type;
50         unsigned code;
51         ddict_gavp_t* gavps;
52         ddict_enum_t* enums;
53         struct _ddict_avp_t* next;
54 } ddict_avp_t;
55
56 typedef struct _ddict_typedefn_t {
57         char* name;
58         char* parent;
59         struct _ddict_typedefn_t* next;
60 } ddict_typedefn_t;
61
62 typedef struct _ddict_cmd_t {
63         char* name;
64         char* vendor;
65         unsigned code;
66         struct _ddict_cmd_t* next;
67 } ddict_cmd_t;
68
69 typedef struct _ddict_xmlpi_t {
70         char* name;
71         char* key;
72         char* value;
73         struct _ddict_xmlpi_t* next;
74 } ddict_xmlpi_t;
75
76 typedef struct _ddict_t {
77         ddict_application_t* applications;
78         ddict_vendor_t* vendors;
79         ddict_cmd_t* cmds;
80         ddict_typedefn_t* typedefns;
81         ddict_avp_t* avps;
82         ddict_xmlpi_t* xmlpis;
83 } ddict_t;
84
85 extern void ddict_print(FILE* fh, ddict_t* d);
86 extern ddict_t* ddict_scan(const char* directory, const char* filename, int dbg);
87 extern void ddict_free(ddict_t* d);
88
89 #endif