diff options
author | Michael Mann <mmann78@netscape.net> | 2013-11-03 12:57:58 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-11-03 12:57:58 +0000 |
commit | 149de99d6866105dc07b9ec180d4ce0db3b777e1 (patch) | |
tree | 6533efa45f0acb10d741ffce1f0cfafb658d7c25 /epan | |
parent | 0dc80637daa1990f5b091e33a9b2da0f9e8802e5 (diff) |
Have rose_ctx_t passed into subdissectors instead of using pinfo->private_data.
svn path=/trunk/; revision=53061
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-h450-ros.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-h450.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-isdn-sup.c | 18 | ||||
-rw-r--r-- | epan/dissectors/packet-q932-ros.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-q932.c | 7 | ||||
-rw-r--r-- | epan/dissectors/packet-qsig.c | 18 |
6 files changed, 44 insertions, 45 deletions
diff --git a/epan/dissectors/packet-h450-ros.c b/epan/dissectors/packet-h450-ros.c index a8eba4b11f..d4afcbab30 100644 --- a/epan/dissectors/packet-h450-ros.c +++ b/epan/dissectors/packet-h450-ros.c @@ -244,8 +244,8 @@ dissect_h450_ros_Invoke(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, if (!arg_next_tvb) { /* empty argument */ arg_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0); } - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree); + + call_dissector_with_data((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree, actx->rose_ctx); if (!arg_handle) { expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } @@ -328,8 +328,8 @@ dissect_h450_ros_ReturnResult(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act if (!res_next_tvb) { /* empty result */ res_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0); } - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); + + call_dissector_with_data((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree, actx->rose_ctx); if (!res_handle) { expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } @@ -397,8 +397,8 @@ dissect_h450_ros_ReturnError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx if (!err_next_tvb) { /* empty error */ err_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0); } - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); + + call_dissector_with_data((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree, actx->rose_ctx); if (!err_handle) { expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } diff --git a/epan/dissectors/packet-h450.c b/epan/dissectors/packet-h450.c index 5eb3a5083e..01cb501f50 100644 --- a/epan/dissectors/packet-h450.c +++ b/epan/dissectors/packet-h450.c @@ -4705,16 +4705,16 @@ static const h450_err_t *get_err(gint32 errcode) { /*--- dissect_h450_arg ------------------------------------------------------*/ static int -dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { proto_item *hidden_item; int offset; - rose_ctx_t *rctx; + rose_ctx_t *rctx = get_rose_ctx(data); gint32 opcode; const h450_op_t *op_ptr; const gchar *p; offset = 0; - rctx = get_rose_ctx(pinfo->private_data); + DISSECTOR_ASSERT(rctx); if (rctx->d.pdu != 1) /* invoke */ return offset; @@ -4747,16 +4747,16 @@ dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data /*--- dissect_h450_res ------------------------------------------------------*/ static int -dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { proto_item *hidden_item; int offset; - rose_ctx_t *rctx; + rose_ctx_t *rctx = get_rose_ctx(data); gint32 opcode; const h450_op_t *op_ptr; const gchar *p; offset = 0; - rctx = get_rose_ctx(pinfo->private_data); + DISSECTOR_ASSERT(rctx); if (rctx->d.pdu != 2) /* returnResult */ return offset; @@ -4789,16 +4789,16 @@ dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data /*--- dissect_h450_err ------------------------------------------------------*/ static int -dissect_h450_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +dissect_h450_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { proto_item *hidden_item; int offset; - rose_ctx_t *rctx; + rose_ctx_t *rctx = get_rose_ctx(data); gint32 errcode; const h450_err_t *err_ptr; const gchar *p; offset = 0; - rctx = get_rose_ctx(pinfo->private_data); + DISSECTOR_ASSERT(rctx); if (rctx->d.pdu != 3) /* returnError */ return offset; diff --git a/epan/dissectors/packet-isdn-sup.c b/epan/dissectors/packet-isdn-sup.c index 66d2328f6d..7e3b96caf6 100644 --- a/epan/dissectors/packet-isdn-sup.c +++ b/epan/dissectors/packet-isdn-sup.c @@ -2614,9 +2614,9 @@ static const isdn_sup_err_t *get_err(gint32 errcode) { /*--- dissect_isdn_sup_arg ------------------------------------------------------*/ static int -dissect_isdn_sup_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +dissect_isdn_sup_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { int offset; - rose_ctx_t *rctx; + rose_ctx_t *rctx = get_rose_ctx(data); gint32 opcode = 0; const gchar *p; const isdn_sup_op_t *op_ptr; @@ -2624,7 +2624,7 @@ dissect_isdn_sup_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * proto_tree *isdn_sup_tree; offset = 0; - rctx = get_rose_ctx(pinfo->private_data); + DISSECTOR_ASSERT(rctx); if (rctx->d.pdu != 1) /* invoke */ return offset; @@ -2662,9 +2662,9 @@ dissect_isdn_sup_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * /*--- dissect_isdn_sup_res -------------------------------------------------------*/ static int -dissect_isdn_sup_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +dissect_isdn_sup_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { gint offset; - rose_ctx_t *rctx; + rose_ctx_t *rctx = get_rose_ctx(data); gint32 opcode = 0; const gchar *p; const isdn_sup_op_t *op_ptr; @@ -2672,7 +2672,7 @@ dissect_isdn_sup_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * proto_tree *isdn_sup_tree; offset = 0; - rctx = get_rose_ctx(pinfo->private_data); + DISSECTOR_ASSERT(rctx); if (rctx->d.pdu != 2) /* returnResult */ return offset; @@ -2709,9 +2709,9 @@ dissect_isdn_sup_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * /*--- dissect_isdn_sup_err ------------------------------------------------------*/ static int -dissect_isdn_sup_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +dissect_isdn_sup_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { int offset; - rose_ctx_t *rctx; + rose_ctx_t *rctx = get_rose_ctx(data); gint32 errcode; const isdn_sup_err_t *err_ptr; const gchar *p; @@ -2719,7 +2719,7 @@ dissect_isdn_sup_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * proto_tree *isdn_sup_tree; offset = 0; - rctx = get_rose_ctx(pinfo->private_data); + DISSECTOR_ASSERT(rctx); if (rctx->d.pdu != 3) /* returnError */ return offset; diff --git a/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c index ccf205a7b2..3adb8bb5b6 100644 --- a/epan/dissectors/packet-q932-ros.c +++ b/epan/dissectors/packet-q932-ros.c @@ -309,8 +309,8 @@ dissect_q932_ros_Invoke(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset if (!arg_next_tvb) { /* empty argument */ arg_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0); } - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree); + + call_dissector_with_data((arg_handle)?arg_handle:data_handle, arg_next_tvb, actx->pinfo, tree, actx->rose_ctx); if (!arg_handle) { expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } @@ -403,8 +403,8 @@ dissect_q932_ros_ReturnResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int if (!res_next_tvb) { /* empty result */ res_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0); } - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree); + + call_dissector_with_data((res_handle)?res_handle:data_handle, res_next_tvb, actx->pinfo, tree, actx->rose_ctx); if (!res_handle) { expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } @@ -482,8 +482,8 @@ dissect_q932_ros_ReturnError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o if (!err_next_tvb) { /* empty error */ err_next_tvb = tvb_new_subset(tvb, (actx->encoding==ASN1_ENC_PER)?offset>>3:offset, 0, 0); } - actx->pinfo->private_data = actx->rose_ctx; - call_dissector((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree); + + call_dissector_with_data((err_handle)?err_handle:data_handle, err_next_tvb, actx->pinfo, tree, actx->rose_ctx); if (!err_handle) { expert_add_info_format(actx->pinfo, tree, &ei_ros_undecoded, "Undecoded %s", descr); } @@ -680,8 +680,8 @@ static int dissect_ROS_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree #line 63 "../../asn1/q932-ros/packet-q932-ros-template.c" /*--- dissect_q932_ros -----------------------------------------------------*/ -static int dissect_q932_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - rose_ctx_tmp = get_rose_ctx(pinfo->private_data); +static int dissect_q932_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { + rose_ctx_tmp = get_rose_ctx(data); DISSECTOR_ASSERT(rose_ctx_tmp); return dissect_ROS_PDU(tvb, pinfo, tree, NULL); } diff --git a/epan/dissectors/packet-q932.c b/epan/dissectors/packet-q932.c index 9b1387f130..e2ebb1b915 100644 --- a/epan/dissectors/packet-q932.c +++ b/epan/dissectors/packet-q932.c @@ -684,8 +684,7 @@ dissect_q932_facility_ie(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr case 3 : /* returnError */ case 4 : /* reject */ q932_rose_ctx.apdu_depth = 1; - pinfo->private_data = &q932_rose_ctx; - call_dissector(q932_ros_handle, next_tvb, pinfo, tree); + call_dissector_with_data(q932_ros_handle, next_tvb, pinfo, tree, &q932_rose_ctx); break; /* DSE APDU */ case 12 : /* begin */ @@ -966,7 +965,7 @@ void proto_register_q932(void) { "AddressInformation", HFILL }}, /*--- End of included file: packet-q932-hfarr.c ---*/ -#line 303 "../../asn1/q932/packet-q932-template.c" +#line 302 "../../asn1/q932/packet-q932-template.c" }; /* List of subtrees */ @@ -991,7 +990,7 @@ void proto_register_q932(void) { &ett_q932_NetworkFacilityExtension_U, /*--- End of included file: packet-q932-ettarr.c ---*/ -#line 310 "../../asn1/q932/packet-q932-template.c" +#line 309 "../../asn1/q932/packet-q932-template.c" }; module_t *q932_module; diff --git a/epan/dissectors/packet-qsig.c b/epan/dissectors/packet-qsig.c index 2771b0cfa5..5baa7f339c 100644 --- a/epan/dissectors/packet-qsig.c +++ b/epan/dissectors/packet-qsig.c @@ -12380,9 +12380,9 @@ static const qsig_err_t *get_err(gint32 errcode) { /*--- dissect_qsig_arg ------------------------------------------------------*/ static int -dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { int offset; - rose_ctx_t *rctx; + rose_ctx_t *rctx = get_rose_ctx(data); gint32 opcode = 0, service; const qsig_op_t *op_ptr; const gchar *p; @@ -12390,7 +12390,7 @@ dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data proto_tree *qsig_tree; offset = 0; - rctx = get_rose_ctx(pinfo->private_data); + DISSECTOR_ASSERT(rctx); if (rctx->d.pdu != 1) /* invoke */ return offset; @@ -12436,9 +12436,9 @@ dissect_qsig_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data /*--- dissect_qsig_res -------------------------------------------------------*/ static int -dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { gint offset; - rose_ctx_t *rctx; + rose_ctx_t *rctx = get_rose_ctx(data); gint32 opcode, service; const qsig_op_t *op_ptr; const gchar *p; @@ -12446,7 +12446,7 @@ dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data proto_tree *qsig_tree; offset = 0; - rctx = get_rose_ctx(pinfo->private_data); + DISSECTOR_ASSERT(rctx); if (rctx->d.pdu != 2) /* returnResult */ return offset; @@ -12487,9 +12487,9 @@ dissect_qsig_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data /*--- dissect_qsig_err ------------------------------------------------------*/ static int -dissect_qsig_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { +dissect_qsig_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { int offset; - rose_ctx_t *rctx; + rose_ctx_t *rctx = get_rose_ctx(data); gint32 errcode; const qsig_err_t *err_ptr; const gchar *p; @@ -12497,7 +12497,7 @@ dissect_qsig_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data proto_tree *qsig_tree; offset = 0; - rctx = get_rose_ctx(pinfo->private_data); + DISSECTOR_ASSERT(rctx); if (rctx->d.pdu != 3) /* returnError */ return offset; |