diff options
author | AndersBroman <anders.broman@ericsson.com> | 2015-02-04 15:55:05 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-02-04 14:57:51 +0000 |
commit | 150dd225a176eef8301d74bf841fbd465773a9a0 (patch) | |
tree | 38152f9114c557de7845b9291f4aab215a57c0e8 | |
parent | d9e82b71438e5e70cda8f1537afc3d8238487635 (diff) |
[INAP] Make INAP a new style dissector and add an OID dissector for
0.4.0.1.1.1.0.0 cs1-ssp-to-scp.
Change-Id: Ib7261ef199d7a3aedaed14e7f869af8b64c21c92
Reviewed-on: https://code.wireshark.org/review/6948
Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r-- | asn1/inap/packet-inap-template.c | 10 | ||||
-rw-r--r-- | epan/dissectors/packet-inap.c | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/asn1/inap/packet-inap-template.c b/asn1/inap/packet-inap-template.c index 050f4350f3..9d8007de69 100644 --- a/asn1/inap/packet-inap-template.c +++ b/asn1/inap/packet-inap-template.c @@ -131,8 +131,8 @@ static guint8 inap_pdu_type = 0; static guint8 inap_pdu_size = 0; -static void -dissect_inap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_inap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_) { proto_item *item=NULL; proto_tree *tree=NULL; @@ -153,7 +153,7 @@ dissect_inap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) opcode = 0; dissect_inap_ROS(TRUE, tvb, offset, &asn1_ctx, tree, -1); - + return inap_pdu_size; } /*--- proto_reg_handoff_inap ---------------------------------------*/ @@ -237,13 +237,15 @@ void proto_register_inap(void) { /* Register protocol */ proto_inap = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("inap", dissect_inap, proto_inap); + new_register_dissector("inap", dissect_inap, proto_inap); /* Register fields and subtrees */ proto_register_field_array(proto_inap, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); expert_inap = expert_register_protocol(proto_inap); expert_register_field_array(expert_inap, ei, array_length(ei)); + new_register_ber_oid_dissector("0.4.0.1.1.1.0.0", dissect_inap, proto_inap, "cs1-ssp-to-scp"); + /* Set default SSNs */ range_convert_str(&global_ssn_range, "106,241", MAX_SSN); diff --git a/epan/dissectors/packet-inap.c b/epan/dissectors/packet-inap.c index 7f8f230161..ab19cfda1d 100644 --- a/epan/dissectors/packet-inap.c +++ b/epan/dissectors/packet-inap.c @@ -9361,8 +9361,8 @@ static guint8 inap_pdu_type = 0; static guint8 inap_pdu_size = 0; -static void -dissect_inap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_inap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_) { proto_item *item=NULL; proto_tree *tree=NULL; @@ -9383,7 +9383,7 @@ dissect_inap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) opcode = 0; dissect_inap_ROS(TRUE, tvb, offset, &asn1_ctx, tree, -1); - + return inap_pdu_size; } /*--- proto_reg_handoff_inap ---------------------------------------*/ @@ -11953,13 +11953,15 @@ void proto_register_inap(void) { /* Register protocol */ proto_inap = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("inap", dissect_inap, proto_inap); + new_register_dissector("inap", dissect_inap, proto_inap); /* Register fields and subtrees */ proto_register_field_array(proto_inap, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); expert_inap = expert_register_protocol(proto_inap); expert_register_field_array(expert_inap, ei, array_length(ei)); + new_register_ber_oid_dissector("0.4.0.1.1.1.0.0", dissect_inap, proto_inap, "cs1-ssp-to-scp"); + /* Set default SSNs */ range_convert_str(&global_ssn_range, "106,241", MAX_SSN); |