2007-07-16 05:41:58 +00:00
|
|
|
/*
|
|
|
|
** diam_dict.h
|
|
|
|
** Diameter Dictionary Import Routines
|
|
|
|
**
|
2008-08-05 21:03:46 +00:00
|
|
|
** (c) 2007, Luis E. Garcia Ontanon <luis@ontanon.org>
|
2007-07-16 05:41:58 +00:00
|
|
|
**
|
|
|
|
** 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
|
2013-04-16 00:00:09 +00:00
|
|
|
** License along with this library; if not, write to the Free Software
|
|
|
|
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2007-07-16 05:41:58 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _DIAM_DICT_H_
|
|
|
|
#define _DIAM_DICT_H_
|
|
|
|
|
|
|
|
struct _ddict_namecode_t {
|
|
|
|
char* name;
|
2013-01-04 05:22:43 +00:00
|
|
|
guint code;
|
2013-10-06 17:04:18 +00:00
|
|
|
struct _ddict_namecode_t* next;
|
2007-07-16 05:41:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
2013-01-04 05:22:43 +00:00
|
|
|
guint code;
|
2013-10-06 17:04:18 +00:00
|
|
|
struct _ddict_vendor_t* next;
|
2007-07-16 05:41:58 +00:00
|
|
|
} ddict_vendor_t;
|
|
|
|
|
|
|
|
typedef struct _ddict_avp_t {
|
|
|
|
char* name;
|
|
|
|
char* description;
|
|
|
|
char* vendor;
|
|
|
|
char* type;
|
2013-01-04 05:22:43 +00:00
|
|
|
guint code;
|
2007-07-16 05:41:58 +00:00
|
|
|
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;
|
2013-01-04 05:22:43 +00:00
|
|
|
guint code;
|
2007-07-16 05:41:58 +00:00
|
|
|
struct _ddict_cmd_t* next;
|
|
|
|
} ddict_cmd_t;
|
|
|
|
|
2007-07-20 00:15:17 +00:00
|
|
|
typedef struct _ddict_xmlpi_t {
|
|
|
|
char* name;
|
|
|
|
char* key;
|
|
|
|
char* value;
|
|
|
|
struct _ddict_xmlpi_t* next;
|
|
|
|
} ddict_xmlpi_t;
|
|
|
|
|
2007-07-16 05:41:58 +00:00
|
|
|
typedef struct _ddict_t {
|
|
|
|
ddict_application_t* applications;
|
|
|
|
ddict_vendor_t* vendors;
|
|
|
|
ddict_cmd_t* cmds;
|
|
|
|
ddict_typedefn_t* typedefns;
|
|
|
|
ddict_avp_t* avps;
|
2007-07-20 00:15:17 +00:00
|
|
|
ddict_xmlpi_t* xmlpis;
|
2007-07-16 05:41:58 +00:00
|
|
|
} ddict_t;
|
|
|
|
|
|
|
|
extern void ddict_print(FILE* fh, ddict_t* d);
|
2007-07-17 22:19:54 +00:00
|
|
|
extern ddict_t* ddict_scan(const char* directory, const char* filename, int dbg);
|
2007-07-16 05:41:58 +00:00
|
|
|
extern void ddict_free(ddict_t* d);
|
|
|
|
|
|
|
|
#endif
|