diff options
author | Anders Broman <anders.broman@ericsson.com> | 2013-06-04 20:05:16 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2013-06-04 20:05:16 +0000 |
commit | 3bfeaff546d18319c860dbb996c620289177d2f0 (patch) | |
tree | e200cd7fbefb67fd2e3bc73a1f91dd9ed6fc6631 /asn1/snmp | |
parent | 6bd6c5eed948c9c0824d53afbb32e49b831683a1 (diff) |
Add subdissection of:
- SNMPv2-MIB sysDescr
- SNMPv2-MIB::sysName
svn path=/trunk/; revision=49774
Diffstat (limited to 'asn1/snmp')
-rw-r--r-- | asn1/snmp/packet-snmp-template.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c index e06eed5eda..000fa54fbb 100644 --- a/asn1/snmp/packet-snmp-template.c +++ b/asn1/snmp/packet-snmp-template.c @@ -232,6 +232,7 @@ static int hf_snmp_gauge32_value = -1; static int hf_snmp_objectname = -1; static int hf_snmp_scalar_instance_index = -1; +static int hf_snmp_var_bind_str = -1; #include "packet-snmp-hf.c" @@ -354,6 +355,15 @@ snmp_lookup_specific_trap (guint specific_trap) return NULL; } +static int +dissect_snmp_variable_string(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_) +{ + + proto_tree_add_item(tree, hf_snmp_var_bind_str, tvb, 0, -1, ENC_ASCII|ENC_NA); + + return tvb_length(tvb); +} + /* * dissect_snmp_VarBind * this routine dissects variable bindings, looking for the oid information in our oid reporsitory @@ -2316,6 +2326,9 @@ void proto_register_snmp(void) { { &hf_snmp_scalar_instance_index, { "Scalar Instance Index", "snmp.name.index", FT_UINT64, BASE_DEC, NULL, 0, NULL, HFILL }}, + { &hf_snmp_var_bind_str, { + "Variable-binding-string", "snmp.var-bind_str", FT_STRING, BASE_NONE, + NULL, 0, NULL, HFILL }}, #include "packet-snmp-hfarr.c" @@ -2491,6 +2504,13 @@ void proto_reg_handoff_snmp(void) { data_handle = find_dissector("data"); + /* SNMPv2-MIB sysDescr "1.3.6.1.2.1.1.1.0" */ + dissector_add_string("snmp.variable_oid", "1.3.6.1.2.1.1.1.0", + new_create_dissector_handle(dissect_snmp_variable_string, proto_snmp)); + /* SNMPv2-MIB::sysName.0 (1.3.6.1.2.1.1.5.0) */ + dissector_add_string("snmp.variable_oid", "1.3.6.1.2.1.1.5.0", + new_create_dissector_handle(dissect_snmp_variable_string, proto_snmp)); + /* * Process preference settings. * |