aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-03 12:57:58 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-03 12:57:58 +0000
commit149de99d6866105dc07b9ec180d4ce0db3b777e1 (patch)
tree6533efa45f0acb10d741ffce1f0cfafb658d7c25 /asn1
parent0dc80637daa1990f5b091e33a9b2da0f9e8802e5 (diff)
Have rose_ctx_t passed into subdissectors instead of using pinfo->private_data.
svn path=/trunk/; revision=53061
Diffstat (limited to 'asn1')
-rw-r--r--asn1/h450/packet-h450-template.c18
-rw-r--r--asn1/isdn-sup/packet-isdn-sup-template.c18
-rw-r--r--asn1/q932-ros/packet-q932-ros-template.c4
-rw-r--r--asn1/q932/packet-q932-template.c3
-rw-r--r--asn1/qsig/packet-qsig-template.c18
-rw-r--r--asn1/ros/ros-err.cnf4
-rw-r--r--asn1/ros/ros-inv.cnf4
-rw-r--r--asn1/ros/ros-res.cnf4
8 files changed, 36 insertions, 37 deletions
diff --git a/asn1/h450/packet-h450-template.c b/asn1/h450/packet-h450-template.c
index cd0ab0a2e0..003546e9ef 100644
--- a/asn1/h450/packet-h450-template.c
+++ b/asn1/h450/packet-h450-template.c
@@ -111,16 +111,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;
@@ -153,16 +153,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;
@@ -195,16 +195,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/asn1/isdn-sup/packet-isdn-sup-template.c b/asn1/isdn-sup/packet-isdn-sup-template.c
index 8354f72d0d..ed0f6b3567 100644
--- a/asn1/isdn-sup/packet-isdn-sup-template.c
+++ b/asn1/isdn-sup/packet-isdn-sup-template.c
@@ -134,9 +134,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;
@@ -144,7 +144,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;
@@ -182,9 +182,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;
@@ -192,7 +192,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;
@@ -229,9 +229,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;
@@ -239,7 +239,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/asn1/q932-ros/packet-q932-ros-template.c b/asn1/q932-ros/packet-q932-ros-template.c
index 071c34b5ae..190d553a68 100644
--- a/asn1/q932-ros/packet-q932-ros-template.c
+++ b/asn1/q932-ros/packet-q932-ros-template.c
@@ -62,8 +62,8 @@ static tvbuff_t *arg_next_tvb, *res_next_tvb, *err_next_tvb;
#include "packet-q932-ros-fn.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/asn1/q932/packet-q932-template.c b/asn1/q932/packet-q932-template.c
index ab22f07751..3ee787e61f 100644
--- a/asn1/q932/packet-q932-template.c
+++ b/asn1/q932/packet-q932-template.c
@@ -170,8 +170,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 */
diff --git a/asn1/qsig/packet-qsig-template.c b/asn1/qsig/packet-qsig-template.c
index ed47e62d8d..67069b29a7 100644
--- a/asn1/qsig/packet-qsig-template.c
+++ b/asn1/qsig/packet-qsig-template.c
@@ -372,9 +372,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;
@@ -382,7 +382,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;
@@ -428,9 +428,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;
@@ -438,7 +438,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;
@@ -479,9 +479,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;
@@ -489,7 +489,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;
diff --git a/asn1/ros/ros-err.cnf b/asn1/ros/ros-err.cnf
index f880c2531e..d913f77fc0 100644
--- a/asn1/ros/ros-err.cnf
+++ b/asn1/ros/ros-err.cnf
@@ -39,8 +39,8 @@
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/asn1/ros/ros-inv.cnf b/asn1/ros/ros-inv.cnf
index ec3497bbd2..a31cd581a0 100644
--- a/asn1/ros/ros-inv.cnf
+++ b/asn1/ros/ros-inv.cnf
@@ -40,8 +40,8 @@
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);
}
diff --git a/asn1/ros/ros-res.cnf b/asn1/ros/ros-res.cnf
index a09d589f95..4f079f49f5 100644
--- a/asn1/ros/ros-res.cnf
+++ b/asn1/ros/ros-res.cnf
@@ -41,8 +41,8 @@
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);
}