aboutsummaryrefslogtreecommitdiffstats
path: root/epan/oids.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2011-01-20 20:04:39 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2011-01-20 20:04:39 +0000
commit9e1d1e0e1338397a279fc4bc01038d9864a31a2f (patch)
treeb5489c68c2d9ea0b6634782d1a63343efdbbc3de /epan/oids.c
parentfc7b0c019bc36207b5f952ae2aa010b5eb5c2fc2 (diff)
Allow presentation of Gauge32 values larger than 0x7FFFFFFF.
svn path=/trunk/; revision=35599
Diffstat (limited to 'epan/oids.c')
-rw-r--r--epan/oids.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/epan/oids.c b/epan/oids.c
index 7da2e5ccb5..893488d201 100644
--- a/epan/oids.c
+++ b/epan/oids.c
@@ -54,17 +54,24 @@ static gboolean oids_init_done = FALSE;
static int debuglevel = 0;
+/*
+ * From SNMPv2-SMI and X.690
+ *
+ * Counter32 ::= [APPLICATION 1] IMPLICIT INTEGER (0..4294967295)
+ * Gauge32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295)
+ * Unsigned32 ::= [APPLICATION 2] IMPLICIT INTEGER (0..4294967295) (alias of Gauge32)
+ * TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295)
+ *
+ * If the BER encoding should not have the top bit set as to not become a negative number
+ * the BER encoding may take 5 octets to encode.
+ */
+
static const oid_value_type_t integer_type = { FT_INT32, BASE_DEC, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, 1, 4, OID_KEY_TYPE_INTEGER, 1};
static const oid_value_type_t bytes_type = { FT_BYTES, BASE_NONE, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, 0, -1, OID_KEY_TYPE_BYTES, 0};
static const oid_value_type_t oid_type = { FT_OID, BASE_NONE, BER_CLASS_UNI, BER_UNI_TAG_OID, 1, -1, OID_KEY_TYPE_OID, 0};
static const oid_value_type_t ipv4_type = { FT_IPv4, BASE_NONE, BER_CLASS_APP, 0, 4, 4, OID_KEY_TYPE_IPADDR, 4};
static const oid_value_type_t counter32_type = { FT_UINT64, BASE_DEC, BER_CLASS_APP, 1, 1, 5, OID_KEY_TYPE_INTEGER, 1};
-static const oid_value_type_t unsigned32_type = { FT_UINT32, BASE_DEC, BER_CLASS_APP, 2, 1, 4, OID_KEY_TYPE_INTEGER, 1};
-/*static const oid_value_type_t timeticks_type = { FT_UINT32, BASE_DEC, BER_CLASS_APP, 3, 1, 4, OID_KEY_TYPE_INTEGER, 1};
- * TimeTicks ::= [APPLICATION 3] IMPLICIT INTEGER (0..4294967295)
- * If the BER encoding should not have the top bit set as to not become a negative number
- * the ber encoding may take 5 octets to encode.
- */
+static const oid_value_type_t unsigned32_type = { FT_UINT64, BASE_DEC, BER_CLASS_APP, 2, 1, 5, OID_KEY_TYPE_INTEGER, 1};
static const oid_value_type_t timeticks_type = { FT_UINT64, BASE_DEC, BER_CLASS_APP, 3, 1, 5, OID_KEY_TYPE_INTEGER, 1};
static const oid_value_type_t opaque_type = { FT_BYTES, BASE_NONE, BER_CLASS_APP, 4, 1, 4, OID_KEY_TYPE_BYTES, 0};
static const oid_value_type_t nsap_type = { FT_BYTES, BASE_NONE, BER_CLASS_APP, 5, 0, -1, OID_KEY_TYPE_NSAP, 0};