summaryrefslogtreecommitdiff
path: root/epan/diam_dict.h
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2007-07-16 05:41:58 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2007-07-16 05:41:58 +0000
commitb0bd83c868af357fffc971157f4bae2b7060073d (patch)
treec12038bb459ae85ba796785b962a8246fb23747d /epan/diam_dict.h
parent4ec27a3f421ccd8723256ec1ee1c0c9d86790311 (diff)
downloadwireshark-b0bd83c868af357fffc971157f4bae2b7060073d.tar.gz
Rewrite of the diameter dissector to use the dictionary for creating hfids, drop libxml dependency.
The work is still incomplete (anything but strings and numbers appears as bytes) but I want others to start testing it. TODO: builders and decoders for: - (ntp) timestamps - addresses - diameteruris - diameteridentities - ipfilterrules - qosfilterrules - mipregistrationrequests svn path=/trunk/; revision=22318
Diffstat (limited to 'epan/diam_dict.h')
-rw-r--r--epan/diam_dict.h81
1 files changed, 81 insertions, 0 deletions
diff --git a/epan/diam_dict.h b/epan/diam_dict.h
new file mode 100644
index 0000000000..8e49bd9b26
--- /dev/null
+++ b/epan/diam_dict.h
@@ -0,0 +1,81 @@
+/*
+ ** 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_t {
+ ddict_application_t* applications;
+ ddict_vendor_t* vendors;
+ ddict_cmd_t* cmds;
+ ddict_typedefn_t* typedefns;
+ ddict_avp_t* avps;
+} ddict_t;
+
+extern void ddict_print(FILE* fh, ddict_t* d);
+extern ddict_t* ddict_scan(const char* directory, const char* filename);
+extern void ddict_free(ddict_t* d);
+
+#endif