diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2014-10-06 15:31:47 +0200 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2014-10-13 11:24:07 +0000 |
commit | 4e1b5ea866dd332294246c4800efe77431010ad8 (patch) | |
tree | 8cda568a450b29fd7bbfcbbf03d840ab9f123190 /epan/dissectors/packet-credssp.c | |
parent | 94d35481b773e785c3aec31f81dea4300fdb5669 (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 'epan/dissectors/packet-credssp.c')
-rw-r--r-- | epan/dissectors/packet-credssp.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/epan/dissectors/packet-credssp.c b/epan/dissectors/packet-credssp.c index 6ab4d96389..3ccb7b349f 100644 --- a/epan/dissectors/packet-credssp.c +++ b/epan/dissectors/packet-credssp.c @@ -323,10 +323,12 @@ dissect_credssp_TSRequest(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offs /*--- PDUs ---*/ -static void dissect_TSRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) { +static int dissect_TSRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_, void *data _U_) { + int offset = 0; asn1_ctx_t asn1_ctx; asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo); - dissect_credssp_TSRequest(FALSE, tvb, 0, &asn1_ctx, tree, hf_credssp_TSRequest_PDU); + offset = dissect_credssp_TSRequest(FALSE, tvb, offset, &asn1_ctx, tree, hf_credssp_TSRequest_PDU); + return offset; } @@ -336,8 +338,8 @@ static void dissect_TSRequest_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro /* * Dissect CredSSP PDUs */ -static void -dissect_credssp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) +static int +dissect_credssp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data) { proto_item *item=NULL; proto_tree *tree=NULL; @@ -350,7 +352,7 @@ dissect_credssp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) col_clear(pinfo->cinfo, COL_INFO); creds_type = -1; - dissect_TSRequest_PDU(tvb, pinfo, tree); + return dissect_TSRequest_PDU(tvb, pinfo, tree, data); } static gboolean @@ -394,7 +396,7 @@ dissect_credssp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data); } - dissect_credssp(tvb, pinfo, parent_tree); + dissect_credssp(tvb, pinfo, parent_tree, NULL); return TRUE; } } @@ -536,7 +538,7 @@ void proto_register_credssp(void) { /* Register protocol */ proto_credssp = proto_register_protocol(PNAME, PSNAME, PFNAME); - register_dissector("credssp", dissect_credssp, proto_credssp); + new_register_dissector("credssp", dissect_credssp, proto_credssp); /* Register fields and subtrees */ proto_register_field_array(proto_credssp, hf, array_length(hf)); |