aboutsummaryrefslogtreecommitdiffstats
path: root/epan/diam_dict.h
blob: 83b3a73d3e6a64a22722721ca448416282cfdd8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/*
 ** diam_dict.h
 ** Diameter Dictionary Import Routines
 **
 ** $Id$
 **
 ** (c) 2007, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
 **
 ** This library is free software; you can redistribute it and/or
 ** modify it under the terms of the GNU Library General Public
 ** License as published by the Free Software Foundation; either
 ** version 2 of the License, or (at your option) any later version.
 **
 ** This library is distributed in the hope that it will be useful,
 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 ** Library General Public License for more details.
 **
 ** You should have received a copy of the GNU Library General Public
 ** License along with this library; if not, write to the
 ** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 ** Boston, MA  02111-1307, USA.
 */

#ifndef _DIAM_DICT_H_
#define _DIAM_DICT_H_

struct _ddict_namecode_t {
	char* name;
	unsigned code;
	struct _ddict_namecode_t* next;	
};

typedef struct _ddict_namecode_t ddict_gavp_t;
typedef struct _ddict_namecode_t ddict_enum_t;
typedef struct _ddict_namecode_t ddict_application_t;

typedef struct _ddict_vendor_t {
	char* name;
	char* desc;
	unsigned code;
	struct _ddict_vendor_t* next;	
} ddict_vendor_t;

typedef struct _ddict_avp_t {
	char* name;
	char* description;
	char* vendor;
	char* type;
	unsigned code;
	ddict_gavp_t* gavps;
	ddict_enum_t* enums;
	struct _ddict_avp_t* next;
} ddict_avp_t;

typedef struct _ddict_typedefn_t {
	char* name;
	char* parent;
	struct _ddict_typedefn_t* next;
} ddict_typedefn_t;

typedef struct _ddict_cmd_t {
	char* name;
	char* vendor;
	unsigned code;
	struct _ddict_cmd_t* next;
} ddict_cmd_t;

typedef struct _ddict_xmlpi_t {
	char* name;
	char* key;
	char* value;
	struct _ddict_xmlpi_t* next;
} ddict_xmlpi_t;

typedef struct _ddict_t {
	ddict_application_t* applications;
	ddict_vendor_t* vendors;
	ddict_cmd_t* cmds;
	ddict_typedefn_t* typedefns;
	ddict_avp_t* avps;
	ddict_xmlpi_t* xmlpis;
} ddict_t;

extern void ddict_print(FILE* fh, ddict_t* d);
extern ddict_t* ddict_scan(const char* directory, const char* filename, int dbg);
extern void ddict_free(ddict_t* d);

#endif