summaryrefslogtreecommitdiff
path: root/plugins/wimaxasncp/wimaxasncp_dict.h
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2010-11-17 03:16:30 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2010-11-17 03:16:30 +0000
commit9aeb1dac1770c29b74b0278eda284701a2e8f731 (patch)
treef6d445ed743ea18417507361fa809342b216572a /plugins/wimaxasncp/wimaxasncp_dict.h
parent37d4ccff56398d5bfbf9418887baf3271b9fd5df (diff)
downloadwireshark-9aeb1dac1770c29b74b0278eda284701a2e8f731.tar.gz
From David Katz via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5166 :
Add a configuration parameter of the NWG version for WiMAX ASN CP dissector. The format and meaning of TLVs, as well as function types and messages changed between the different NWG versions. Added support for the version number of TLVs in the dictionary xml, its parser, and of course in the packet itself. Added support for the version number of function-types and message-types by extending the value_string structure to contain also a "since" version number. Successfully tested with a live capture and capture file, containing WiMAX ASN packets (full Network entry). Also fuzzed 500 passes successfully. The XML doesn't contain all existing NWG versions, only selected ones. This is a little tedious work to go over all TLVs of each version, so I'll add some newer versions later on. can add a short how-to of adding a new version, for others to use, if needed. svn path=/trunk/; revision=34919
Diffstat (limited to 'plugins/wimaxasncp/wimaxasncp_dict.h')
-rw-r--r--plugins/wimaxasncp/wimaxasncp_dict.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/wimaxasncp/wimaxasncp_dict.h b/plugins/wimaxasncp/wimaxasncp_dict.h
index 054cfe9336..9cd1b96f3e 100644
--- a/plugins/wimaxasncp/wimaxasncp_dict.h
+++ b/plugins/wimaxasncp/wimaxasncp_dict.h
@@ -26,6 +26,15 @@
#define _WIMAXASNCP_DICT_H_
/* -------------------------------------------------------------------------
+ * NWG versions
+ * ------------------------------------------------------------------------- */
+
+#define WIMAXASNCP_NWGVER_R10_V100 0
+#define WIMAXASNCP_NWGVER_R10_V120 1
+#define WIMAXASNCP_NWGVER_R10_V121 2
+#define WIMAXASNCP_NWGVER_NUM 3
+
+/* -------------------------------------------------------------------------
* decode types
* ------------------------------------------------------------------------- */
@@ -41,7 +50,7 @@ enum
WIMAXASNCP_TLV_ETHER,
WIMAXASNCP_TLV_ASCII_STRING,
WIMAXASNCP_TLV_FLAG0,
- WIMAXASNCP_TLV_BITFLAGS8,
+ WIMAXASNCP_TLV_BITFLAGS8,
WIMAXASNCP_TLV_BITFLAGS16,
WIMAXASNCP_TLV_BITFLAGS32,
WIMAXASNCP_TLV_ID,
@@ -67,7 +76,7 @@ enum
struct _wimaxasncp_dict_namecode_t {
gchar *name;
unsigned code;
- struct _wimaxasncp_dict_namecode_t *next;
+ struct _wimaxasncp_dict_namecode_t *next;
};
typedef struct _wimaxasncp_dict_namecode_t wimaxasncp_dict_enum_t;
@@ -77,6 +86,7 @@ typedef struct _wimaxasncp_dict_tlv_t {
gchar *name;
gchar *description;
gint decoder;
+ guint since;
int hf_root;
int hf_value;
int hf_ipv4;
@@ -110,7 +120,7 @@ extern void wimaxasncp_dict_print(
FILE *fh, wimaxasncp_dict_t *d);
extern wimaxasncp_dict_t *wimaxasncp_dict_scan(
- const gchar *system_directory, const gchar *filename, int dbg,
+ const gchar *system_directory, const gchar *filename, int dbg,
gchar **error);
extern void wimaxasncp_dict_free(