aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-18 08:38:23 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-18 17:44:49 +0000
commit3ca5e3ec7d9ad8c2b1ccb0cf9a5d56a1949766fa (patch)
treef2289c6eb8694894a6a89c21fe5ce5e91b1b2178
parent8826db5823480697b73103de3434f5c662517e9a (diff)
create_dissector_handle -> new_create_dissector_handle for plugins
Was able to actually convert all calls to "new style" Change-Id: If9916a4762d410f2ad12aa5431174d7462dc7ac4 Reviewed-on: https://code.wireshark.org/review/11941 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--plugins/ethercat/packet-ethercat-datagram.c5
-rw-r--r--plugins/ethercat/packet-ioraw.c5
-rw-r--r--plugins/ethercat/packet-nv.c5
-rw-r--r--plugins/m2m/packet-m2m.c5
-rw-r--r--plugins/profinet/packet-pn-mrp.c7
-rw-r--r--plugins/profinet/packet-pn-rt.c11
-rw-r--r--plugins/tpg/packet-http.c6
-rw-r--r--plugins/wimax/msg_aas_fbck.c10
-rw-r--r--plugins/wimax/msg_arq.c15
-rw-r--r--plugins/wimax/msg_clk_cmp.c5
-rw-r--r--plugins/wimax/msg_dcd.c5
-rw-r--r--plugins/wimax/msg_dlmap.c5
-rw-r--r--plugins/wimax/msg_dreg.c10
-rw-r--r--plugins/wimax/msg_dsa.c15
-rw-r--r--plugins/wimax/msg_dsc.c10
-rw-r--r--plugins/wimax/msg_dsd.c10
-rw-r--r--plugins/wimax/msg_dsx_rvd.c5
-rw-r--r--plugins/wimax/msg_fpc.c5
-rw-r--r--plugins/wimax/msg_pkm.c10
-rw-r--r--plugins/wimax/msg_pmc.c10
-rw-r--r--plugins/wimax/msg_prc_lt_ctrl.c5
-rw-r--r--plugins/wimax/msg_reg_req.c5
-rw-r--r--plugins/wimax/msg_rep.c10
-rw-r--r--plugins/wimax/msg_res_cmd.c5
-rw-r--r--plugins/wimax/msg_rng_req.c5
-rw-r--r--plugins/wimax/msg_rng_rsp.c5
-rw-r--r--plugins/wimax/msg_sbc.c5
-rw-r--r--plugins/wimax/msg_ucd.c5
-rw-r--r--plugins/wimax/msg_ulmap.c5
29 files changed, 123 insertions, 86 deletions
diff --git a/plugins/ethercat/packet-ethercat-datagram.c b/plugins/ethercat/packet-ethercat-datagram.c
index cd7761b49d..e6e8ed3898 100644
--- a/plugins/ethercat/packet-ethercat-datagram.c
+++ b/plugins/ethercat/packet-ethercat-datagram.c
@@ -435,7 +435,7 @@ static void EcSubFormatter(tvbuff_t *tvb, gint offset, char *szText, gint nMax)
}
/* Ethercat Datagram */
-static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
tvbuff_t *next_tvb;
proto_item *ti, *aitem = NULL;
@@ -863,6 +863,7 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree
{
proto_tree_add_item(tree, hf_ecat_padding, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
}
+ return tvb_captured_length(tvb);
}
void proto_register_ecat(void)
@@ -1711,7 +1712,7 @@ void proto_reg_handoff_ecat(void)
/* Register this dissector as a sub dissector to EtherCAT frame based on
ether type. */
- ecat_handle = create_dissector_handle(dissect_ecat_datagram, proto_ecat_datagram);
+ ecat_handle = new_create_dissector_handle(dissect_ecat_datagram, proto_ecat_datagram);
dissector_add_uint("ecatf.type", 1 /* EtherCAT type */, ecat_handle);
ecat_mailbox_handle = find_dissector("ecat_mailbox");
diff --git a/plugins/ethercat/packet-ioraw.c b/plugins/ethercat/packet-ioraw.c
index e8c4c823e3..5171f802b2 100644
--- a/plugins/ethercat/packet-ioraw.c
+++ b/plugins/ethercat/packet-ioraw.c
@@ -48,7 +48,7 @@ static void IoRawSummaryFormater( char *szText, int nMax)
g_snprintf ( szText, nMax, "Raw IO Data" );
}
-static void dissect_ioraw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_ioraw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti;
proto_tree *ioraw_tree;
@@ -74,6 +74,7 @@ static void dissect_ioraw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(ioraw_tree, hf_ioraw_data, tvb, offset, ioraw_length - offset, ENC_NA);
}
+ return tvb_captured_length(tvb);
}
void proto_register_ioraw(void)
@@ -112,7 +113,7 @@ void proto_reg_handoff_ioraw(void)
{
dissector_handle_t ioraw_handle;
- ioraw_handle = create_dissector_handle(dissect_ioraw, proto_ioraw);
+ ioraw_handle = new_create_dissector_handle(dissect_ioraw, proto_ioraw);
dissector_add_uint("ecatf.type", 3, ioraw_handle);
}
diff --git a/plugins/ethercat/packet-nv.c b/plugins/ethercat/packet-nv.c
index a897051210..73080405d3 100644
--- a/plugins/ethercat/packet-nv.c
+++ b/plugins/ethercat/packet-nv.c
@@ -89,7 +89,7 @@ static void NvVarHeaderFormater(tvbuff_t *tvb, gint offset, char *szText, int nM
tvb_get_letohs(tvb, offset+4));
}
-static void dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti;
proto_tree *nv_tree, *nv_header_tree, *nv_var_tree,*nv_varheader_tree;
@@ -158,6 +158,7 @@ static void dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset+=var_length;
}
}
+ return tvb_captured_length(tvb);
}
void proto_register_nv(void)
@@ -234,7 +235,7 @@ void proto_reg_handoff_nv(void)
{
dissector_handle_t nv_handle;
- nv_handle = create_dissector_handle(dissect_nv, proto_nv);
+ nv_handle = new_create_dissector_handle(dissect_nv, proto_nv);
dissector_add_uint("ecatf.type", 4, nv_handle);
}
diff --git a/plugins/m2m/packet-m2m.c b/plugins/m2m/packet-m2m.c
index 80bea305b4..8eea8550ea 100644
--- a/plugins/m2m/packet-m2m.c
+++ b/plugins/m2m/packet-m2m.c
@@ -171,7 +171,7 @@ m2m_defragment_cleanup(void)
/* WiMax MAC to MAC protocol dissector */
-static void dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti = NULL;
proto_item *m2m_item = NULL;
@@ -409,6 +409,7 @@ static void dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tlv_count--;
}
}
+ return tvb_captured_length(tvb);
}
/* Decode and display the FCH burst */
@@ -808,7 +809,7 @@ void proto_reg_handoff_m2m(void)
{
dissector_handle_t m2m_handle;
- m2m_handle = create_dissector_handle(dissect_m2m, proto_m2m);
+ m2m_handle = new_create_dissector_handle(dissect_m2m, proto_m2m);
dissector_add_uint("ethertype", ETHERTYPE_WMX_M2M, m2m_handle);
/* find the wimax handlers */
diff --git a/plugins/profinet/packet-pn-mrp.c b/plugins/profinet/packet-pn-mrp.c
index 534f68b167..90d97202fc 100644
--- a/plugins/profinet/packet-pn-mrp.c
+++ b/plugins/profinet/packet-pn-mrp.c
@@ -405,8 +405,8 @@ dissect_PNMRP_PDU(tvbuff_t *tvb, int offset,
/* Dissect MRP packets */
-static void
-dissect_PNMRP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_PNMRP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ti = NULL;
proto_tree *mrp_tree = NULL;
@@ -425,6 +425,7 @@ dissect_PNMRP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
dissect_PNMRP_PDU(tvb, offset, pinfo, mrp_tree, ti);
+ return tvb_captured_length(tvb);
}
@@ -525,7 +526,7 @@ proto_reg_handoff_pn_mrp (void)
dissector_handle_t mrp_handle;
- mrp_handle = create_dissector_handle(dissect_PNMRP,proto_pn_mrp);
+ mrp_handle = new_create_dissector_handle(dissect_PNMRP,proto_pn_mrp);
dissector_add_uint("ethertype", ETHERTYPE_MRP, mrp_handle);
}
diff --git a/plugins/profinet/packet-pn-rt.c b/plugins/profinet/packet-pn-rt.c
index 210f9e5428..229594e81c 100644
--- a/plugins/profinet/packet-pn-rt.c
+++ b/plugins/profinet/packet-pn-rt.c
@@ -323,8 +323,6 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
return FALSE;
}
-static void
-dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/* for reasemble processing we need some inits.. */
/* Register PNIO defrag table init routine. */
@@ -464,8 +462,8 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
/*
* dissect_pn_rt - The dissector for the Soft-Real-Time protocol
*/
-static void
-dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
gint pdu_len;
gint data_len;
@@ -520,7 +518,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pdu_len = tvb_reported_length(tvb);
if (pdu_len < 6) {
dissect_pn_malformed(tvb, 0, pinfo, tree, pdu_len);
- return;
+ return 0;
}
/* build some "raw" data */
@@ -797,6 +795,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Oh, well, we don't know this; dissect it as data. */
dissect_pn_undecoded(next_tvb, 0, pinfo, tree, tvb_captured_length(next_tvb));
}
+ return tvb_captured_length(tvb);
}
@@ -995,7 +994,7 @@ proto_reg_handoff_pn_rt(void)
{
dissector_handle_t pn_rt_handle;
- pn_rt_handle = create_dissector_handle(dissect_pn_rt, proto_pn_rt);
+ pn_rt_handle = new_create_dissector_handle(dissect_pn_rt, proto_pn_rt);
dissector_add_uint("ethertype", ETHERTYPE_PROFINET, pn_rt_handle);
dissector_add_uint("udp.port", 0x8892, pn_rt_handle);
diff --git a/plugins/tpg/packet-http.c b/plugins/tpg/packet-http.c
index 4f688c6c58..24b0df9f0d 100644
--- a/plugins/tpg/packet-http.c
+++ b/plugins/tpg/packet-http.c
@@ -46,7 +46,7 @@ static int hf_http_request_uri = -1;
static dissector_handle_t http_handle;
-static void dissect_http(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree) {
+static int dissect_http(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree, void* data _U_) {
http_info_value_t* msgdata = wmem_alloc0(wmem_packet_scope(), sizeof(http_info_value_t));
tvbparse_elem_t* reqresp;
tpg_parser_data_t* tpg;
@@ -82,8 +82,8 @@ static void dissect_http(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tree* tree
}
} else {
/* no header */
- return;
}
+ return tvb_captured_length(tvb);
}
static void proto_register_http(void) {
@@ -113,7 +113,7 @@ static void proto_register_http(void) {
static void proto_reg_handoff_http(void) {
- http_handle = create_dissector_handle(dissect_http, proto_http);
+ http_handle = new_create_dissector_handle(dissect_http, proto_http);
dissector_delete_uint("tcp.port", 80, NULL);
dissector_add_uint("tcp.port", 80, http_handle);
diff --git a/plugins/wimax/msg_aas_fbck.c b/plugins/wimax/msg_aas_fbck.c
index cac19fc9e4..a5ab74eac8 100644
--- a/plugins/wimax/msg_aas_fbck.c
+++ b/plugins/wimax/msg_aas_fbck.c
@@ -94,7 +94,7 @@ static int hf_aas_fbck_rssi_value = -1;
static int hf_aas_fbck_cinr_value = -1;
-static void dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint data_type;
@@ -132,9 +132,10 @@ static void dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info
/* display the reserved fields */
proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_req_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
-static void dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len, data_type;
@@ -185,6 +186,7 @@ static void dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info
/* display the CINR Mean Value */
proto_tree_add_item(aas_fbck_tree, hf_aas_fbck_cinr_value, tvb, offset, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -338,10 +340,10 @@ proto_reg_handoff_mac_mgmt_msg_aas(void)
{
dissector_handle_t aas_handle;
- aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_fbck_req_decoder, proto_mac_mgmt_msg_aas_fbck_decoder);
+ aas_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_aas_fbck_req_decoder, proto_mac_mgmt_msg_aas_fbck_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_FBCK_REQ, aas_handle);
- aas_handle = create_dissector_handle(dissect_mac_mgmt_msg_aas_fbck_rsp_decoder, proto_mac_mgmt_msg_aas_fbck_decoder);
+ aas_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_aas_fbck_rsp_decoder, proto_mac_mgmt_msg_aas_fbck_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_AAS_FBCK_RSP, aas_handle);
}
diff --git a/plugins/wimax/msg_arq.c b/plugins/wimax/msg_arq.c
index 8f69425184..6dc23c334f 100644
--- a/plugins/wimax/msg_arq.c
+++ b/plugins/wimax/msg_arq.c
@@ -298,7 +298,7 @@ void proto_register_mac_mgmt_msg_arq_feedback(void)
}
/* Decode ARQ-Feedback messages. */
-static void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint arq_feedback_ie_count = 0;
@@ -382,10 +382,11 @@ static void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info
}
proto_item_append_text(arq_feedback_item, ", %u ARQ_feedback_IE(s)", arq_feedback_ie_count);
}
+ return tvb_captured_length(tvb);
}
/* Decode ARQ-Discard messages. */
-static void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item *arq_discard_item;
proto_tree *arq_discard_tree;
@@ -401,10 +402,11 @@ static void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info
proto_tree_add_item(arq_discard_tree, hf_arq_discard_reserved, tvb, 3, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(arq_discard_tree, hf_arq_discard_bsn, tvb, 3, 2, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Decode ARQ-Reset messages. */
-static void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
proto_item *arq_reset_item;
proto_tree *arq_reset_tree;
@@ -421,6 +423,7 @@ static void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *p
proto_tree_add_item(arq_reset_tree, hf_arq_reset_direction, tvb, 3, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(arq_reset_tree, hf_arq_reset_reserved, tvb, 3, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
void
@@ -428,13 +431,13 @@ proto_reg_handoff_mac_mgmt_msg_arq(void)
{
dissector_handle_t arq_handle;
- arq_handle = create_dissector_handle(dissect_mac_mgmt_msg_arq_feedback_decoder, proto_mac_mgmt_msg_arq_decoder);
+ arq_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_arq_feedback_decoder, proto_mac_mgmt_msg_arq_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_ARQ_FEEDBACK, arq_handle);
- arq_handle = create_dissector_handle(dissect_mac_mgmt_msg_arq_discard_decoder, proto_mac_mgmt_msg_arq_decoder);
+ arq_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_arq_discard_decoder, proto_mac_mgmt_msg_arq_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_ARQ_DISCARD, arq_handle);
- arq_handle = create_dissector_handle(dissect_mac_mgmt_msg_arq_reset_decoder, proto_mac_mgmt_msg_arq_decoder);
+ arq_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_arq_reset_decoder, proto_mac_mgmt_msg_arq_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_ARQ_RESET, arq_handle);
}
diff --git a/plugins/wimax/msg_clk_cmp.c b/plugins/wimax/msg_clk_cmp.c
index 2a586362b0..e1ef72b562 100644
--- a/plugins/wimax/msg_clk_cmp.c
+++ b/plugins/wimax/msg_clk_cmp.c
@@ -47,7 +47,7 @@ static gint hf_clk_cmp_comparison_value = -1;
/* Decode CLK_CMP messages. */
-static void dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint i;
@@ -75,6 +75,7 @@ static void dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pin
proto_tree_add_item(clk_cmp_tree, hf_clk_cmp_comparison_value, tvb, offset++, 1, ENC_BIG_ENDIAN);
}
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -143,7 +144,7 @@ proto_reg_handoff_mac_mgmt_msg_clk_cmp(void)
{
dissector_handle_t handle;
- handle = create_dissector_handle(dissect_mac_mgmt_msg_clk_cmp_decoder, proto_mac_mgmt_msg_clk_cmp_decoder);
+ handle = new_create_dissector_handle(dissect_mac_mgmt_msg_clk_cmp_decoder, proto_mac_mgmt_msg_clk_cmp_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_CLK_CMP, handle);
}
diff --git a/plugins/wimax/msg_dcd.c b/plugins/wimax/msg_dcd.c
index 443c9d7a6e..496c2d755b 100644
--- a/plugins/wimax/msg_dcd.c
+++ b/plugins/wimax/msg_dcd.c
@@ -337,7 +337,7 @@ static const value_string tfs_support[] =
/* WiMax MAC Management DCD message (table 15) dissector */
-static void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len, length;
@@ -724,6 +724,7 @@ static void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo,
offset += tlv_len;
} /* end of TLV process while loop */
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -1257,7 +1258,7 @@ void proto_reg_handoff_mac_mgmt_msg_dcd(void)
{
dissector_handle_t dcd_handle;
- dcd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dcd_decoder, proto_mac_mgmt_msg_dcd_decoder);
+ dcd_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dcd_decoder, proto_mac_mgmt_msg_dcd_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DCD, dcd_handle);
}
diff --git a/plugins/wimax/msg_dlmap.c b/plugins/wimax/msg_dlmap.c
index 241d7594e6..3d4f99cbda 100644
--- a/plugins/wimax/msg_dlmap.c
+++ b/plugins/wimax/msg_dlmap.c
@@ -2280,7 +2280,7 @@ static gint dissect_dlmap_ie(proto_tree *ie_tree, packet_info *pinfo, gint offse
}
-static void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree)
+static int dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree, void* data _U_)
{
/* 6.3.2.3.2 [2] DL-MAP table 16 */
guint offset = 0;
@@ -2329,6 +2329,7 @@ static void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo
proto_tree_add_bytes_format(dlmap_tree, hf_padding, tvb, NIBHI(nib,1), NULL, "Padding nibble");
nib++;
}
+ return tvb_captured_length(tvb);
}
gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tree)
@@ -3495,7 +3496,7 @@ void proto_reg_handoff_mac_mgmt_msg_dlmap(void)
{
dissector_handle_t dlmap_handle;
- dlmap_handle = create_dissector_handle(dissect_mac_mgmt_msg_dlmap_decoder, proto_mac_mgmt_msg_dlmap_decoder);
+ dlmap_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dlmap_decoder, proto_mac_mgmt_msg_dlmap_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DL_MAP, dlmap_handle);
}
diff --git a/plugins/wimax/msg_dreg.c b/plugins/wimax/msg_dreg.c
index 8d3fac3f2c..d561581f25 100644
--- a/plugins/wimax/msg_dreg.c
+++ b/plugins/wimax/msg_dreg.c
@@ -366,7 +366,7 @@ void proto_register_mac_mgmt_msg_dreg_cmd(void)
}
/* Decode DREG-REQ messages. */
-static void dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tlv_offset;
@@ -435,10 +435,11 @@ static void dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pi
if (!hmac_found)
proto_item_append_text(dreg_req_tree, " (HMAC Tuple is missing !)");
}
+ return tvb_captured_length(tvb);
}
/* Decode DREG-CMD messages. */
-static void dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tlv_offset;
@@ -509,6 +510,7 @@ static void dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pi
if (!hmac_found)
proto_item_append_text(dreg_cmd_tree, " (HMAC Tuple is missing !)");
}
+ return tvb_captured_length(tvb);
}
void
@@ -516,10 +518,10 @@ proto_reg_handoff_mac_mgmt_msg_dreg(void)
{
dissector_handle_t dreg_handle;
- dreg_handle = create_dissector_handle(dissect_mac_mgmt_msg_dreg_req_decoder, proto_mac_mgmt_msg_dreg_req_decoder);
+ dreg_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dreg_req_decoder, proto_mac_mgmt_msg_dreg_req_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DREG_REQ, dreg_handle);
- dreg_handle = create_dissector_handle(dissect_mac_mgmt_msg_dreg_cmd_decoder, proto_mac_mgmt_msg_dreg_cmd_decoder);
+ dreg_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dreg_cmd_decoder, proto_mac_mgmt_msg_dreg_cmd_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DREG_CMD, dreg_handle);
}
diff --git a/plugins/wimax/msg_dsa.c b/plugins/wimax/msg_dsa.c
index 9c4076a2f6..0ac50d8065 100644
--- a/plugins/wimax/msg_dsa.c
+++ b/plugins/wimax/msg_dsa.c
@@ -48,7 +48,7 @@ static gint ett_mac_mgmt_msg_dsa_ack_decoder = -1;
static gint hf_dsa_transaction_id = -1;
static gint hf_dsa_confirmation_code = -1;
-static void dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *dsa_item;
@@ -69,9 +69,10 @@ static void dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pin
/* process DSA-REQ message TLV Encode Information */
wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsa_tree);
}
+ return tvb_captured_length(tvb);
}
-static void dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *dsa_item;
@@ -95,9 +96,10 @@ static void dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pin
/* process DSA RSP message TLV Encode Information */
wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsa_tree);
}
+ return tvb_captured_length(tvb);
}
-static void dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *dsa_item;
@@ -121,6 +123,7 @@ static void dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pin
/* process DSA-REQ message TLV Encode Information */
wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsa_tree);
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -168,13 +171,13 @@ proto_reg_handoff_mac_mgmt_msg_dsa (void)
{
dissector_handle_t dsa_handle;
- dsa_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsa_req_decoder, proto_mac_mgmt_msg_dsa_decoder);
+ dsa_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsa_req_decoder, proto_mac_mgmt_msg_dsa_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSA_REQ, dsa_handle);
- dsa_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsa_rsp_decoder, proto_mac_mgmt_msg_dsa_decoder);
+ dsa_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsa_rsp_decoder, proto_mac_mgmt_msg_dsa_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSA_RSP, dsa_handle);
- dsa_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsa_ack_decoder, proto_mac_mgmt_msg_dsa_decoder);
+ dsa_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsa_ack_decoder, proto_mac_mgmt_msg_dsa_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSA_ACK, dsa_handle);
}
diff --git a/plugins/wimax/msg_dsc.c b/plugins/wimax/msg_dsc.c
index 27a84fad84..6c45ebf58f 100644
--- a/plugins/wimax/msg_dsc.c
+++ b/plugins/wimax/msg_dsc.c
@@ -49,7 +49,7 @@ static gint hf_dsc_transaction_id = -1;
static gint hf_dsc_confirmation_code = -1;
-static void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *dsc_item;
@@ -70,6 +70,7 @@ static void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pin
/* process DSC REQ message TLV Encode Information */
wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
}
+ return tvb_captured_length(tvb);
}
static int dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
@@ -99,7 +100,7 @@ static int dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinf
return tvb_captured_length(tvb);
}
-static void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *dsc_item;
@@ -123,6 +124,7 @@ static void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pin
/* process DSC ACK message TLV Encode Information */
wimax_common_tlv_encoding_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, dsc_tree);
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -172,13 +174,13 @@ proto_reg_handoff_mac_mgmt_msg_dsc(void)
{
dissector_handle_t dsc_handle;
- dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_req_decoder, proto_mac_mgmt_msg_dsc_decoder);
+ dsc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsc_req_decoder, proto_mac_mgmt_msg_dsc_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_REQ, dsc_handle);
dsc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsc_rsp_decoder, proto_mac_mgmt_msg_dsc_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_RSP, dsc_handle);
- dsc_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsc_ack_decoder, proto_mac_mgmt_msg_dsc_decoder);
+ dsc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsc_ack_decoder, proto_mac_mgmt_msg_dsc_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSC_ACK, dsc_handle);
}
diff --git a/plugins/wimax/msg_dsd.c b/plugins/wimax/msg_dsd.c
index b01f45c75f..682b6330a3 100644
--- a/plugins/wimax/msg_dsd.c
+++ b/plugins/wimax/msg_dsd.c
@@ -56,7 +56,7 @@ static gint hf_dsd_invalid_tlv = -1;
static gint hf_dsd_unknown_type = -1;
-static void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len, tlv_len, tlv_value_offset;
@@ -123,9 +123,10 @@ static void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pin
offset += (tlv_len+tlv_value_offset);
} /* end of while loop */
}
+ return tvb_captured_length(tvb);
}
-static void dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len, tlv_len, tlv_value_offset;
@@ -195,6 +196,7 @@ static void dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pin
offset += (tlv_len+tlv_value_offset);
} /* end of while loop */
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -266,10 +268,10 @@ proto_reg_handoff_mac_mgmt_msg_dsd(void)
{
dissector_handle_t dsd_handle;
- dsd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsd_req_decoder, proto_mac_mgmt_msg_dsd_decoder);
+ dsd_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsd_req_decoder, proto_mac_mgmt_msg_dsd_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSD_REQ, dsd_handle);
- dsd_handle = create_dissector_handle(dissect_mac_mgmt_msg_dsd_rsp_decoder, proto_mac_mgmt_msg_dsd_decoder);
+ dsd_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsd_rsp_decoder, proto_mac_mgmt_msg_dsd_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSD_RSP, dsd_handle);
}
diff --git a/plugins/wimax/msg_dsx_rvd.c b/plugins/wimax/msg_dsx_rvd.c
index eb65f03711..40bf31fd5a 100644
--- a/plugins/wimax/msg_dsx_rvd.c
+++ b/plugins/wimax/msg_dsx_rvd.c
@@ -43,7 +43,7 @@ static gint hf_dsx_rvd_confirmation_code = -1;
/* Decode DSX-RVD messages. */
-static void dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *dsx_rvd_item;
@@ -61,6 +61,7 @@ static void dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pin
/* display the Confirmation Code */
proto_tree_add_item(dsx_rvd_tree, hf_dsx_rvd_confirmation_code, tvb, offset, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -100,7 +101,7 @@ proto_reg_handoff_mac_mgmt_msg_dsx_rvd(void)
{
dissector_handle_t handle;
- handle = create_dissector_handle(dissect_mac_mgmt_msg_dsx_rvd_decoder, proto_mac_mgmt_msg_dsx_rvd_decoder);
+ handle = new_create_dissector_handle(dissect_mac_mgmt_msg_dsx_rvd_decoder, proto_mac_mgmt_msg_dsx_rvd_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_DSX_RVD, handle);
}
diff --git a/plugins/wimax/msg_fpc.c b/plugins/wimax/msg_fpc.c
index c96415ecca..8b7c717fed 100644
--- a/plugins/wimax/msg_fpc.c
+++ b/plugins/wimax/msg_fpc.c
@@ -48,7 +48,7 @@ static gint hf_fpc_power_measurement_frame = -1;
/* Decode FPC messages. */
-static void dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint i;
@@ -91,6 +91,7 @@ static void dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _
offset++;
}
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -159,7 +160,7 @@ proto_reg_handoff_mac_mgmt_msg_fpc(void)
{
dissector_handle_t fpc_handle;
- fpc_handle = create_dissector_handle(dissect_mac_mgmt_msg_fpc_decoder, proto_mac_mgmt_msg_fpc_decoder);
+ fpc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_fpc_decoder, proto_mac_mgmt_msg_fpc_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_FPC, fpc_handle);
}
diff --git a/plugins/wimax/msg_pkm.c b/plugins/wimax/msg_pkm.c
index ec47db4724..eebf8584ea 100644
--- a/plugins/wimax/msg_pkm.c
+++ b/plugins/wimax/msg_pkm.c
@@ -83,7 +83,7 @@ static gint hf_pkm_msg_pkm_id = -1;
/* Wimax Mac PKM-REQ Message Dissector */
-static void dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *pkm_item;
@@ -103,10 +103,11 @@ static void dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pin
/* set the offset for the TLV Encoded info */
offset++;
wimax_pkm_tlv_encoded_attributes_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, pkm_tree);
+ return tvb_captured_length(tvb);
}
/* Wimax Mac PKM-RSP Message Dissector */
-static void dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *pkm_item;
@@ -127,6 +128,7 @@ static void dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pin
offset++;
/* process the PKM TLV Encoded Attributes */
wimax_pkm_tlv_encoded_attributes_decoder(tvb_new_subset_remaining(tvb, offset), pinfo, pkm_tree);
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac PKM-REQ/RSP Messages Dissectors */
@@ -167,9 +169,9 @@ void proto_reg_handoff_mac_mgmt_msg_pkm(void)
dissector_handle_t mac_mgmt_msg_pkm_req_handle;
dissector_handle_t mac_mgmt_msg_pkm_rsp_handle;
- mac_mgmt_msg_pkm_req_handle = create_dissector_handle(dissect_mac_mgmt_msg_pkm_req_decoder, proto_mac_mgmt_msg_pkm_decoder);
+ mac_mgmt_msg_pkm_req_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_pkm_req_decoder, proto_mac_mgmt_msg_pkm_decoder);
dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_PKM_REQ, mac_mgmt_msg_pkm_req_handle );
- mac_mgmt_msg_pkm_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_pkm_rsp_decoder, proto_mac_mgmt_msg_pkm_decoder);
+ mac_mgmt_msg_pkm_rsp_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_pkm_rsp_decoder, proto_mac_mgmt_msg_pkm_decoder);
dissector_add_uint( "wmx.mgmtmsg", MAC_MGMT_MSG_PKM_RSP, mac_mgmt_msg_pkm_rsp_handle );
}
diff --git a/plugins/wimax/msg_pmc.c b/plugins/wimax/msg_pmc.c
index eae23857c9..c0241120d9 100644
--- a/plugins/wimax/msg_pmc.c
+++ b/plugins/wimax/msg_pmc.c
@@ -167,7 +167,7 @@ void proto_register_mac_mgmt_msg_pmc_rsp(void)
}
/* Decode PMC-REQ messages. */
-static void dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *pmc_req_item;
@@ -188,10 +188,11 @@ static void dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pin
/* show the Reserved bits */
proto_tree_add_item(pmc_req_tree, hf_pmc_req_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Decode PMC-RSP messages. */
-static void dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *pmc_rsp_item;
@@ -228,6 +229,7 @@ static void dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pin
proto_tree_add_float_format_value(pmc_rsp_tree, hf_pmc_rsp_offset_BS_per_MS, tvb, offset, 1, power_change, " %.2f dB", power_change);
}
}
+ return tvb_captured_length(tvb);
}
void
@@ -235,10 +237,10 @@ proto_reg_handoff_mac_mgmt_msg_pmc(void)
{
dissector_handle_t pmc_handle;
- pmc_handle = create_dissector_handle(dissect_mac_mgmt_msg_pmc_req_decoder, proto_mac_mgmt_msg_pmc_req_decoder);
+ pmc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_pmc_req_decoder, proto_mac_mgmt_msg_pmc_req_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PMC_REQ, pmc_handle);
- pmc_handle = create_dissector_handle(dissect_mac_mgmt_msg_pmc_rsp_decoder, proto_mac_mgmt_msg_pmc_rsp_decoder);
+ pmc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_pmc_rsp_decoder, proto_mac_mgmt_msg_pmc_rsp_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PMC_RSP, pmc_handle);
}
diff --git a/plugins/wimax/msg_prc_lt_ctrl.c b/plugins/wimax/msg_prc_lt_ctrl.c
index d062cabb62..66ce5697dd 100644
--- a/plugins/wimax/msg_prc_lt_ctrl.c
+++ b/plugins/wimax/msg_prc_lt_ctrl.c
@@ -52,7 +52,7 @@ static const value_string vals_turn_on[] = {
/* Decode PRC-LT-CTRL messages. */
-static void dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
guint offset = 0;
proto_item *prc_lt_ctrl_item;
@@ -73,6 +73,7 @@ static void dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info
/* display the Precoding Delay */
proto_tree_add_item(prc_lt_ctrl_tree, hf_prc_lt_ctrl_precoding_delay, tvb, offset, 1, ENC_BIG_ENDIAN);
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -129,7 +130,7 @@ proto_reg_handoff_mac_mgmt_msg_prc_lt_ctrl(void)
{
dissector_handle_t handle;
- handle = create_dissector_handle(dissect_mac_mgmt_msg_prc_lt_ctrl_decoder, proto_mac_mgmt_msg_prc_lt_ctrl_decoder);
+ handle = new_create_dissector_handle(dissect_mac_mgmt_msg_prc_lt_ctrl_decoder, proto_mac_mgmt_msg_prc_lt_ctrl_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_PRC_LT_CTRL, handle);
}
diff --git a/plugins/wimax/msg_reg_req.c b/plugins/wimax/msg_reg_req.c
index 354c874efe..648c8a6545 100644
--- a/plugins/wimax/msg_reg_req.c
+++ b/plugins/wimax/msg_reg_req.c
@@ -491,7 +491,7 @@ void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb
/* Decode REG-REQ messages. */
-static void dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tlv_offset;
@@ -623,6 +623,7 @@ static void dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pin
if (!hmac_found)
proto_item_append_text(reg_req_tree, " (HMAC Tuple is missing !)");
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -1434,7 +1435,7 @@ void proto_reg_handoff_mac_mgmt_msg_reg_req(void)
{
dissector_handle_t reg_req_handle;
- reg_req_handle = create_dissector_handle(dissect_mac_mgmt_msg_reg_req_decoder, proto_mac_mgmt_msg_reg_req_decoder);
+ reg_req_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_reg_req_decoder, proto_mac_mgmt_msg_reg_req_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REG_REQ, reg_req_handle);
}
diff --git a/plugins/wimax/msg_rep.c b/plugins/wimax/msg_rep.c
index fa9dc54d4e..ba1fc9406f 100644
--- a/plugins/wimax/msg_rep.c
+++ b/plugins/wimax/msg_rep.c
@@ -255,7 +255,7 @@ static gint hf_rep_rsp_channel_selectivity_rep_frequency_c = -1;
/* Wimax Mac REP-REQ Message Dissector */
-static void dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len;
@@ -408,10 +408,11 @@ static void dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pin
offset += tlv_len;
} /* end of TLV process while loop */
}
+ return tvb_captured_length(tvb);
}
/* Wimax Mac REP-RSP Message Dissector */
-static void dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len, length, value;
@@ -834,6 +835,7 @@ static void dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pin
offset += tlv_len;
} /* end of TLV process while loop */
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac REP-REQ Messages Dissectors */
@@ -1553,10 +1555,10 @@ proto_reg_handoff_mac_mgmt_msg_rep(void)
{
dissector_handle_t rep_handle;
- rep_handle = create_dissector_handle(dissect_mac_mgmt_msg_rep_req_decoder, proto_mac_mgmt_msg_rep_decoder);
+ rep_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_rep_req_decoder, proto_mac_mgmt_msg_rep_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REP_REQ, rep_handle);
- rep_handle = create_dissector_handle(dissect_mac_mgmt_msg_rep_rsp_decoder, proto_mac_mgmt_msg_rep_decoder);
+ rep_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_rep_rsp_decoder, proto_mac_mgmt_msg_rep_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_REP_RSP, rep_handle);
}
diff --git a/plugins/wimax/msg_res_cmd.c b/plugins/wimax/msg_res_cmd.c
index 2b3a329e53..a2b0e813b6 100644
--- a/plugins/wimax/msg_res_cmd.c
+++ b/plugins/wimax/msg_res_cmd.c
@@ -49,7 +49,7 @@ static gint hf_res_cmd_invalid_tlv = -1;
/* Wimax Mac RES-CMD Message Dissector */
-static void dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len;
@@ -108,6 +108,7 @@ static void dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pin
offset += (tlv_len+tlv_value_offset);
} /* end of TLV process while loop */
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac RES-CMD Message Dissector */
@@ -147,7 +148,7 @@ proto_reg_handoff_mac_mgmt_msg_res_cmd(void)
{
dissector_handle_t handle;
- handle = create_dissector_handle(dissect_mac_mgmt_msg_res_cmd_decoder, proto_mac_mgmt_msg_res_cmd_decoder);
+ handle = new_create_dissector_handle(dissect_mac_mgmt_msg_res_cmd_decoder, proto_mac_mgmt_msg_res_cmd_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RES_CMD, handle);
}
diff --git a/plugins/wimax/msg_rng_req.c b/plugins/wimax/msg_rng_req.c
index 22d8354ad3..834270830c 100644
--- a/plugins/wimax/msg_rng_req.c
+++ b/plugins/wimax/msg_rng_req.c
@@ -207,7 +207,7 @@ void dissect_power_saving_class(proto_tree *rng_req_tree, gint tlv_type, tvbuff_
/* Decode RNG-REQ messages. */
-static void dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tlv_offset;
@@ -327,6 +327,7 @@ static void dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pin
offset = tlv_len + tlv_offset;
} /* end of TLV process while loop */
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -623,7 +624,7 @@ void proto_reg_handoff_mac_mgmt_msg_rng_req(void)
{
dissector_handle_t rng_req_handle;
- rng_req_handle = create_dissector_handle(dissect_mac_mgmt_msg_rng_req_decoder, proto_mac_mgmt_msg_rng_req_decoder);
+ rng_req_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_rng_req_decoder, proto_mac_mgmt_msg_rng_req_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RNG_REQ, rng_req_handle);
}
diff --git a/plugins/wimax/msg_rng_rsp.c b/plugins/wimax/msg_rng_rsp.c
index e81de5986a..c1e3e755ae 100644
--- a/plugins/wimax/msg_rng_rsp.c
+++ b/plugins/wimax/msg_rng_rsp.c
@@ -262,7 +262,7 @@ static const value_string vals_rng_rsp_location_update_response[] = {
/* Decode RNG-RSP messages. */
-static void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
proto_item *ranging_status_item = NULL;
proto_item *dl_freq_override_item = NULL;
@@ -528,6 +528,7 @@ static void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pin
proto_item_append_text(rng_rsp_tree, " (Ranging status is missing!)");
}
+ return tvb_captured_length(tvb);
}
@@ -951,7 +952,7 @@ void proto_reg_handoff_mac_mgmt_msg_rng_rsp(void)
{
dissector_handle_t rng_rsp_handle;
- rng_rsp_handle = create_dissector_handle(dissect_mac_mgmt_msg_rng_rsp_decoder, proto_mac_mgmt_msg_rng_rsp_decoder);
+ rng_rsp_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_rng_rsp_decoder, proto_mac_mgmt_msg_rng_rsp_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_RNG_RSP, rng_rsp_handle);
sbc_rsp_handle = find_dissector("mac_mgmt_msg_sbc_rsp_handler");
diff --git a/plugins/wimax/msg_sbc.c b/plugins/wimax/msg_sbc.c
index 7a1d5ba816..a6b1786b8d 100644
--- a/plugins/wimax/msg_sbc.c
+++ b/plugins/wimax/msg_sbc.c
@@ -1030,7 +1030,7 @@ static void sbc_tlv_decoder(tlv_info_t* tlv_info, int ett, proto_tree* sbc_tree,
}
/* Wimax Mac SBC-REQ Message Dissector */
-static void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len;
@@ -1080,6 +1080,7 @@ static void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pin
offset += (tlv_len+tlv_value_offset);
} /* end of TLV process while loop */
}
+ return tvb_captured_length(tvb);
}
/* Wimax Mac SBC-RSP Message Dissector */
@@ -2826,7 +2827,7 @@ proto_reg_handoff_mac_mgmt_msg_sbc(void)
{
dissector_handle_t sbc_handle;
- sbc_handle = create_dissector_handle(dissect_mac_mgmt_msg_sbc_req_decoder, proto_mac_mgmt_msg_sbc_decoder);
+ sbc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_sbc_req_decoder, proto_mac_mgmt_msg_sbc_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_SBC_REQ, sbc_handle);
sbc_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_sbc_rsp_decoder, proto_mac_mgmt_msg_sbc_decoder);
diff --git a/plugins/wimax/msg_ucd.c b/plugins/wimax/msg_ucd.c
index 4dc20fe475..9216f6269c 100644
--- a/plugins/wimax/msg_ucd.c
+++ b/plugins/wimax/msg_ucd.c
@@ -217,7 +217,7 @@ static const value_string vals_yes_no_str[] =
/* UCD dissector */
-static void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint offset = 0;
guint tvb_len, length;
@@ -687,6 +687,7 @@ static void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo,
offset += tlv_len;
} /* end of TLV process while loop */
}
+ return tvb_captured_length(tvb);
}
/* Register Wimax Mac Payload Protocol and Dissector */
@@ -1253,7 +1254,7 @@ void proto_reg_handoff_mac_mgmt_msg_ucd(void)
{
dissector_handle_t ucd_handle;
- ucd_handle = create_dissector_handle(dissect_mac_mgmt_msg_ucd_decoder, proto_mac_mgmt_msg_ucd_decoder);
+ ucd_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_ucd_decoder, proto_mac_mgmt_msg_ucd_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_UCD, ucd_handle);
}
diff --git a/plugins/wimax/msg_ulmap.c b/plugins/wimax/msg_ulmap.c
index da321d90b8..4a2a519eca 100644
--- a/plugins/wimax/msg_ulmap.c
+++ b/plugins/wimax/msg_ulmap.c
@@ -2078,7 +2078,7 @@ gint dissect_ulmap_ie( proto_tree *ie_tree, packet_info* pinfo, gint offset, gin
return (nibble - offset);
}
-static void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
+static int dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* data _U_)
{
/* 6.3.2.3.4 [2] UL-MAP table 18 */
guint offset = 0;
@@ -2118,6 +2118,7 @@ static void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo
proto_tree_add_bytes_format(ulmap_tree, hf_ulmap_padding, tvb, NIBHI(nib,1), NULL, "Padding nibble");
nib++;
}
+ return tvb_captured_length(tvb);
}
/*gint wimax_decode_ulmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)*/
@@ -2958,7 +2959,7 @@ void proto_reg_handoff_mac_mgmt_msg_ulmap(void)
{
dissector_handle_t ulmap_handle;
- ulmap_handle = create_dissector_handle(dissect_mac_mgmt_msg_ulmap_decoder, proto_mac_mgmt_msg_ulmap_decoder);
+ ulmap_handle = new_create_dissector_handle(dissect_mac_mgmt_msg_ulmap_decoder, proto_mac_mgmt_msg_ulmap_decoder);
dissector_add_uint("wmx.mgmtmsg", MAC_MGMT_MSG_UL_MAP, ulmap_handle);
}