aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/snmp
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2014-10-06 15:31:47 +0200
committerStig Bjørlykke <stig@bjorlykke.org>2014-10-13 11:24:07 +0000
commit4e1b5ea866dd332294246c4800efe77431010ad8 (patch)
tree8cda568a450b29fd7bbfcbbf03d840ab9f123190 /asn1/snmp
parent94d35481b773e785c3aec31f81dea4300fdb5669 (diff)
ASN1: Register PDU-dissectors as NEW
Change-Id: I1a317b19d8076588c9305dae6287bb80cc14da64 Reviewed-on: https://code.wireshark.org/review/4494 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
Diffstat (limited to 'asn1/snmp')
-rw-r--r--asn1/snmp/packet-snmp-template.c14
-rw-r--r--asn1/snmp/snmp.cnf2
2 files changed, 7 insertions, 9 deletions
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index 00616df375..b4277e2cbe 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -2137,8 +2137,8 @@ dissect_snmp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
-static void
-dissect_smux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_smux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
proto_tree *smux_tree = NULL;
proto_item *item = NULL;
@@ -2147,12 +2147,10 @@ dissect_smux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMUX");
- if (tree) {
- item = proto_tree_add_item(tree, proto_smux, tvb, 0, -1, ENC_NA);
- smux_tree = proto_item_add_subtree(item, ett_smux);
- }
+ item = proto_tree_add_item(tree, proto_smux, tvb, 0, -1, ENC_NA);
+ smux_tree = proto_item_add_subtree(item, ett_smux);
- dissect_SMUX_PDUs_PDU(tvb, pinfo, smux_tree);
+ return dissect_SMUX_PDUs_PDU(tvb, pinfo, smux_tree, data);
}
@@ -2638,7 +2636,7 @@ proto_reg_handoff_smux(void)
{
dissector_handle_t smux_handle;
- smux_handle = create_dissector_handle(dissect_smux, proto_smux);
+ smux_handle = new_create_dissector_handle(dissect_smux, proto_smux);
dissector_add_uint("tcp.port", TCP_PORT_SMUX, smux_handle);
}
diff --git a/asn1/snmp/snmp.cnf b/asn1/snmp/snmp.cnf
index 5e899abd29..22e1ac3150 100644
--- a/asn1/snmp/snmp.cnf
+++ b/asn1/snmp/snmp.cnf
@@ -2,7 +2,7 @@
# snmp conformation file
-#.PDU
+#.PDU_NEW
SMUX-PDUs
#.NO_EMIT