diff options
author | Guy Harris <guy@alum.mit.edu> | 2007-05-27 18:33:13 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2007-05-27 18:33:13 +0000 |
commit | 01844e151ad3b5882ef36893aac6339d4ccfd0a7 (patch) | |
tree | de9cddb64f954a8a5c63aa0fe2c5e32bfac6ed06 /plugins | |
parent | d99b6c0a8b53bcfd1b857e259d4cb1632302e408 (diff) | |
download | wireshark-01844e151ad3b5882ef36893aac6339d4ccfd0a7.tar.gz wireshark-01844e151ad3b5882ef36893aac6339d4ccfd0a7.tar.bz2 wireshark-01844e151ad3b5882ef36893aac6339d4ccfd0a7.zip |
Use tvb_reported_length() to get the amount of data we should look at;
the number of bytes in the packet or subset of the packet is the
reported length, tvb_length() just gives you the amount of that data
that was actually captured.
Include <glib.h>, not <gmodule.h>, even in plugins.
Fix the version numbers in the rc files.
svn path=/trunk/; revision=21960
Diffstat (limited to 'plugins')
45 files changed, 180 insertions, 180 deletions
diff --git a/plugins/m2m/moduleinfo.nmake b/plugins/m2m/moduleinfo.nmake index 5003cd4930..bafbb1588f 100644 --- a/plugins/m2m/moduleinfo.nmake +++ b/plugins/m2m/moduleinfo.nmake @@ -6,9 +6,9 @@ PACKAGE=m2m # The version -MODULE_VERSION_MAJOR=0 -MODULE_VERSION_MINOR=0 -MODULE_VERSION_MICRO=1 +MODULE_VERSION_MAJOR=1 +MODULE_VERSION_MINOR=1 +MODULE_VERSION_MICRO=0 MODULE_VERSION_EXTRA=0 # diff --git a/plugins/m2m/packet-m2m.c b/plugins/m2m/packet-m2m.c index a61f227024..df50b7c116 100644 --- a/plugins/m2m/packet-m2m.c +++ b/plugins/m2m/packet-m2m.c @@ -36,7 +36,7 @@ #include "moduleinfo.h" #include <string.h> -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include <epan/reassemble.h> @@ -439,8 +439,8 @@ static void dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { /* we are being asked for details */ m2m_item = proto_tree_add_item(tree, proto_m2m, tvb, 0, -1, FALSE); m2m_tree = proto_item_add_subtree(m2m_item, ett_m2m); - /* get the tvb length */ - length = tvb_length(tvb); + /* get the tvb reported length */ + length = tvb_reported_length(tvb); /* add the size info */ /* proto_item_append_text(m2m_item, " (%u bytes) - Packet Sequence Number,Number of TLVs", length); diff --git a/plugins/wimax/crc_data.c b/plugins/wimax/crc_data.c index d5046d3d1e..4f30810fda 100644 --- a/plugins/wimax/crc_data.c +++ b/plugins/wimax/crc_data.c @@ -30,7 +30,7 @@ #ifdef STATIC_DATA -#include <gmodule.h> +#include <glib.h> guint32 crc32_table[256] = { 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, diff --git a/plugins/wimax/mac_hd_generic_decoder.c b/plugins/wimax/mac_hd_generic_decoder.c index 3f0b0bcc1c..acb5c825b0 100644 --- a/plugins/wimax/mac_hd_generic_decoder.c +++ b/plugins/wimax/mac_hd_generic_decoder.c @@ -1528,7 +1528,7 @@ void dissect_mac_header_generic_decoder(tvbuff_t *tvb, packet_info *pinfo, proto } #endif /* Get the frame length */ - tvb_len = tvb_length(tvb); + tvb_len = tvb_reported_length(tvb); if (tvb_len < WIMAX_MAC_HEADER_SIZE) { /* display the error message */ generic_item = proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, tvb_len, "Error: the size of Generic MAC Header tvb is too small! (%u bytes)", tvb_len); @@ -2073,8 +2073,8 @@ static gint extended_subheader_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_ col_append_sep_str(pinfo->cinfo, COL_INFO, NULL, "Ext subhdrs"); } - /* Get the tvb length */ - length = tvb_length(tvb); + /* Get the tvb reported length */ + length = tvb_reported_length(tvb); if (!length) { /* display the error message */ proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Error: extended subheader tvb is empty ! (%u bytes)", length); @@ -2214,8 +2214,8 @@ static gint arq_feedback_payload_decoder(tvbuff_t *tvb, packet_info *pinfo, prot /* reset the offset */ offset = 0; - /* Get the tvb length */ - length = tvb_length(tvb); + /* Get the tvb reported length */ + length = tvb_reported_length(tvb); if (!length) { /* display the error message */ proto_tree_add_protocol_format(tree, proto_mac_header_generic_decoder, tvb, offset, length, "Error: ARQ feedback payload tvb is empty ! (%u bytes)", length); diff --git a/plugins/wimax/mac_hd_type1_decoder.c b/plugins/wimax/mac_hd_type1_decoder.c index 148364c626..c18733d926 100644 --- a/plugins/wimax/mac_hd_type1_decoder.c +++ b/plugins/wimax/mac_hd_type1_decoder.c @@ -43,7 +43,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> @@ -457,8 +457,8 @@ void dissect_mac_header_type_1_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_ if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display the MAC Type I Header message */ ti = proto_tree_add_protocol_format(tree, proto_mac_header_type_1_decoder, tvb, offset, tvb_len, "Mac Type I Header (%u bytes)", WIMAX_MAC_HEADER_SIZE); /* add subtree */ diff --git a/plugins/wimax/mac_hd_type2_decoder.c b/plugins/wimax/mac_hd_type2_decoder.c index 1e7caaa0c6..37e2622e81 100644 --- a/plugins/wimax/mac_hd_type2_decoder.c +++ b/plugins/wimax/mac_hd_type2_decoder.c @@ -43,7 +43,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> @@ -982,8 +982,8 @@ void dissect_mac_header_type_2_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_ if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display the MAC Type II Header message */ ti = proto_tree_add_protocol_format(tree, proto_mac_header_type_2_decoder, tvb, offset, tvb_len, "Mac Type II Header (6 bytes)"); /* add subtree */ diff --git a/plugins/wimax/mac_mgmt_msg_decoder.c b/plugins/wimax/mac_mgmt_msg_decoder.c index 560bebcbe8..289b3ec776 100644 --- a/plugins/wimax/mac_mgmt_msg_decoder.c +++ b/plugins/wimax/mac_mgmt_msg_decoder.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "wimax_mac.h" @@ -280,8 +280,8 @@ void dissect_mac_mgmt_msg_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); if(!tvb_len) { /* display the error message */ diff --git a/plugins/wimax/moduleinfo.nmake b/plugins/wimax/moduleinfo.nmake index 5003cd4930..bafbb1588f 100644 --- a/plugins/wimax/moduleinfo.nmake +++ b/plugins/wimax/moduleinfo.nmake @@ -6,9 +6,9 @@ PACKAGE=m2m # The version -MODULE_VERSION_MAJOR=0 -MODULE_VERSION_MINOR=0 -MODULE_VERSION_MICRO=1 +MODULE_VERSION_MAJOR=1 +MODULE_VERSION_MINOR=1 +MODULE_VERSION_MICRO=0 MODULE_VERSION_EXTRA=0 # diff --git a/plugins/wimax/msg_aas_beam.c b/plugins/wimax/msg_aas_beam.c index 3e0ab5e9c6..adbccb3cdb 100644 --- a/plugins/wimax/msg_aas_beam.c +++ b/plugins/wimax/msg_aas_beam.c @@ -34,7 +34,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include "wimax_mac.h" @@ -234,8 +234,8 @@ void dissect_mac_mgmt_msg_aas_beam_select_decoder(tvbuff_t *tvb, packet_info *pi /* ensure the message type is AAS-BEAM-SELECT */ if(payload_type != MAC_MGMT_MSG_AAS_BEAM_SELECT) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, tvb_len, "AAS Beam Select (AAS-BEAM-SELECT) (%u bytes)", tvb_len); /* add subtree */ @@ -267,8 +267,8 @@ static void dissect_mac_mgmt_msg_aas_beam_req_decoder(tvbuff_t *tvb, packet_info /* ensure the message type is AAS-BEAM-REQ */ if(payload_type != MAC_MGMT_MSG_AAS_BEAM_REQ) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, tvb_len, "AAS Beam Request (AAS-BEAM-REQ) (%u bytes)", tvb_len); /* add subtree */ @@ -312,8 +312,8 @@ static void dissect_mac_mgmt_msg_aas_beam_rsp_decoder(tvbuff_t *tvb, packet_info /* ensure the message type is AAS-BEAM-RSP */ if(payload_type != MAC_MGMT_MSG_AAS_BEAM_RSP) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ aas_beam_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_beam_decoder, tvb, offset, tvb_len, "AAS Beam Response (AAS-BEAM-RSP) (%u bytes)", tvb_len); /* add subtree */ diff --git a/plugins/wimax/msg_aas_fbck.c b/plugins/wimax/msg_aas_fbck.c index f3a0248b62..288de92043 100644 --- a/plugins/wimax/msg_aas_fbck.c +++ b/plugins/wimax/msg_aas_fbck.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include "wimax_mac.h" @@ -269,8 +269,8 @@ void dissect_mac_mgmt_msg_aas_fbck_req_decoder(tvbuff_t *tvb, packet_info *pinfo /* ensure the message type is AAS-FBCK-REQ */ if(payload_type != MAC_MGMT_MSG_AAS_FBCK_REQ) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ aas_fbck_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_fbck_decoder, tvb, offset, tvb_len, "AAS Channel Feedback Request (AAS-FBCK-REQ) (%u bytes)", tvb_len); /* add subtree */ @@ -318,8 +318,8 @@ void dissect_mac_mgmt_msg_aas_fbck_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo /* ensure the message type is AAS-FBCK-RSP */ if(payload_type != MAC_MGMT_MSG_AAS_FBCK_RSP) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ aas_fbck_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_aas_fbck_decoder, tvb, offset, tvb_len, "AAS Channel Feedback Response (AAS-FBCK-RSP) (%u bytes)", tvb_len); /* add subtree */ diff --git a/plugins/wimax/msg_arq.c b/plugins/wimax/msg_arq.c index 722b281a66..0b00609395 100644 --- a/plugins/wimax/msg_arq.c +++ b/plugins/wimax/msg_arq.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -371,8 +371,8 @@ void dissect_mac_mgmt_msg_arq_feedback_decoder(tvbuff_t *tvb, packet_info *pinfo if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type ARQ-Feedback */ arq_feedback_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_feedback_decoder, tvb, offset, tvb_len, "MAC Management Message, ARQ-Feedback (33)"); /* add MAC ARQ Feedback subtree */ @@ -458,8 +458,8 @@ void dissect_mac_mgmt_msg_arq_discard_decoder(tvbuff_t *tvb, packet_info *pinfo if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type ARQ-Discard */ arq_discard_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_discard_decoder, tvb, 0, tvb_len, "MAC Management Message, ARQ-Discard (34)"); /* add MAC ARQ Discard subtree */ @@ -490,8 +490,8 @@ void dissect_mac_mgmt_msg_arq_reset_decoder(tvbuff_t *tvb, packet_info *pinfo _U if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type ARQ-Reset */ arq_reset_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_arq_reset_decoder, tvb, 0, tvb_len, "MAC Management Message, ARQ-Reset (35)"); /* add MAC ARQ Reset subtree */ diff --git a/plugins/wimax/msg_clk_cmp.c b/plugins/wimax/msg_clk_cmp.c index 905167083d..398d616d95 100644 --- a/plugins/wimax/msg_clk_cmp.c +++ b/plugins/wimax/msg_clk_cmp.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "wimax_mac.h" @@ -140,8 +140,8 @@ void dissect_mac_mgmt_msg_clk_cmp_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type CLK_CMP */ clk_cmp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_clk_cmp_decoder, tvb, offset, tvb_len, "Clock Comparision (CLK-CMP) (%u bytes)", tvb_len); /* add MAC CLK_CMP subtree */ diff --git a/plugins/wimax/msg_dcd.c b/plugins/wimax/msg_dcd.c index be745359b4..95b3a06877 100644 --- a/plugins/wimax/msg_dcd.c +++ b/plugins/wimax/msg_dcd.c @@ -38,7 +38,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "wimax_tlv.h" @@ -886,8 +886,8 @@ void dissect_mac_mgmt_msg_dcd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t if(tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type DCD */ dcd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dcd_decoder, tvb, offset, tvb_len, "Downlink Channel Descriptor (DCD) (%u bytes)", tvb_len); /* add MAC DCD subtree */ diff --git a/plugins/wimax/msg_dlmap.c b/plugins/wimax/msg_dlmap.c index e5be7abb9a..67d0413ffb 100644 --- a/plugins/wimax/msg_dlmap.c +++ b/plugins/wimax/msg_dlmap.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -2453,7 +2453,7 @@ void dissect_mac_mgmt_msg_dlmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto proto_tree *dlmap_tree = NULL; proto_tree *ie_tree = NULL; proto_tree *phy_tree = NULL; - gint tvb_len = tvb_length(tvb); + gint tvb_len = tvb_reported_length(tvb); const guint8 *bufptr = tvb_get_ptr(tvb, offset, tvb_len); UNREFERENCED_PARAMETER(pinfo); @@ -2514,7 +2514,7 @@ gint wimax_decode_dlmapc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *base_tre gint ulmap_appended; guint length, lennib, pad; guint mac_len, dl_ie_count; - guint tvb_len = tvb_length(tvb); + guint tvb_len = tvb_reported_length(tvb); const guint8 * bufptr = tvb_get_ptr(tvb, offset, tvb_len); guint nib = 0; guint32 mac_crc, calculated_crc; @@ -2615,7 +2615,7 @@ gint wimax_decode_sub_dl_ul_map(tvbuff_t *tvb, packet_info *pinfo, proto_tree *b gint i, numie; guint16 calculated_crc; - gint length = tvb_length(tvb); + gint length = tvb_reported_length(tvb); const guint8 * bufptr = tvb_get_ptr(tvb, offset, length); gint nib = 0; gint lennib = BYTE_TO_NIB(length); @@ -2703,7 +2703,7 @@ gint wimax_decode_dlmap_reduced_aas(tvbuff_t *tvb, packet_info *pinfo, proto_tre proto_item *generic_item = NULL; gint ulmap_appended; gint length; - gint tvb_len = tvb_length(tvb); + gint tvb_len = tvb_reported_length(tvb); const guint8 * bufptr = tvb_get_ptr(tvb, offset, tvb_len); gint bit = 0; guint data, pad, mult; diff --git a/plugins/wimax/msg_dreg.c b/plugins/wimax/msg_dreg.c index a3bb32752f..c6c6484feb 100644 --- a/plugins/wimax/msg_dreg.c +++ b/plugins/wimax/msg_dreg.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -333,8 +333,8 @@ static void dissect_dreg_tlv(proto_tree *dreg_tree, gint tlv_type, tvbuff_t *tvb guint tvb_len; /*guint tlv_len;*/ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); switch (tlv_type) { case DREG_PAGING_INFO: @@ -419,8 +419,8 @@ void dissect_mac_mgmt_msg_dreg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pr if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type DREG-REQ */ dreg_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dreg_req_decoder, tvb, 0, tvb_len, "MAC Management Message, DREG-REQ (49)"); /* add MAC DREG REQ subtree */ @@ -505,8 +505,8 @@ void dissect_mac_mgmt_msg_dreg_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, pr if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type DREG-CMD */ dreg_cmd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dreg_cmd_decoder, tvb, 0, tvb_len, "MAC Management Message, DREG-CMD (29)"); /* add MAC DREG CMD subtree */ diff --git a/plugins/wimax/msg_dsa.c b/plugins/wimax/msg_dsa.c index 0bb9c9d6e1..280b187184 100644 --- a/plugins/wimax/msg_dsa.c +++ b/plugins/wimax/msg_dsa.c @@ -36,7 +36,7 @@ #define DEBUG */ -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include "wimax_tlv.h" #include "wimax_mac.h" @@ -147,8 +147,8 @@ void dissect_mac_mgmt_msg_dsa_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSA REQ */ if(payload_type != MAC_MGMT_MSG_DSA_REQ) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsa_msgs[payload_type - MAC_MGMT_MSG_DSA_REQ], tvb_len); /* add MAC DSx subtree */ @@ -181,8 +181,8 @@ void dissect_mac_mgmt_msg_dsa_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSA RSP */ if(payload_type != MAC_MGMT_MSG_DSA_RSP) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsa_msgs[payload_type - MAC_MGMT_MSG_DSA_REQ], tvb_len); /* add MAC DSx subtree */ @@ -219,8 +219,8 @@ void dissect_mac_mgmt_msg_dsa_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSA ACK */ if(payload_type != MAC_MGMT_MSG_DSA_ACK) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsa_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsa_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsa_msgs[payload_type - MAC_MGMT_MSG_DSA_REQ], tvb_len); /* add MAC DSx subtree */ diff --git a/plugins/wimax/msg_dsc.c b/plugins/wimax/msg_dsc.c index 2a8c1eb970..0723030609 100644 --- a/plugins/wimax/msg_dsc.c +++ b/plugins/wimax/msg_dsc.c @@ -36,7 +36,7 @@ #define DEBUG */ -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include "wimax_tlv.h" #include "wimax_mac.h" @@ -144,8 +144,8 @@ void dissect_mac_mgmt_msg_dsc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSC REQ/RSP/ACK */ if(payload_type != MAC_MGMT_MSG_DSC_REQ) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsc_msgs[payload_type - MAC_MGMT_MSG_DSC_REQ], tvb_len); /* add MAC DSx subtree */ @@ -181,8 +181,8 @@ void dissect_mac_mgmt_msg_dsc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSC REQ/RSP/ACK */ if(payload_type != MAC_MGMT_MSG_DSC_RSP) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsc_msgs[payload_type - MAC_MGMT_MSG_DSC_REQ], tvb_len); /* add MAC DSx subtree */ @@ -222,8 +222,8 @@ void dissect_mac_mgmt_msg_dsc_ack_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSC REQ/RSP/ACK */ if((payload_type < MAC_MGMT_MSG_DSC_REQ) || (payload_type > MAC_MGMT_MSG_DSC_ACK)) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsc_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsc_msgs[payload_type - MAC_MGMT_MSG_DSC_REQ], tvb_len); /* add MAC DSx subtree */ diff --git a/plugins/wimax/msg_dsd.c b/plugins/wimax/msg_dsd.c index db698b2b86..1bc2ace73c 100644 --- a/plugins/wimax/msg_dsd.c +++ b/plugins/wimax/msg_dsd.c @@ -36,7 +36,7 @@ #define DEBUG */ -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include "wimax_tlv.h" #include "wimax_mac.h" @@ -152,8 +152,8 @@ void dissect_mac_mgmt_msg_dsd_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSD REQ/RSP/ACK */ if(payload_type != MAC_MGMT_MSG_DSD_REQ) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsd_msgs[payload_type - MAC_MGMT_MSG_DSD_REQ], tvb_len); /* add MAC DSx subtree */ @@ -236,8 +236,8 @@ void dissect_mac_mgmt_msg_dsd_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro /* ensure the message type is DSD REQ/RSP/ACK */ if(payload_type != MAC_MGMT_MSG_DSD_RSP) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsd_decoder, tvb, offset, tvb_len, "%s (%u bytes)", dsd_msgs[payload_type - MAC_MGMT_MSG_DSD_REQ], tvb_len); /* add MAC DSx subtree */ diff --git a/plugins/wimax/msg_dsx_rvd.c b/plugins/wimax/msg_dsx_rvd.c index 04a6445137..a61cc90100 100644 --- a/plugins/wimax/msg_dsx_rvd.c +++ b/plugins/wimax/msg_dsx_rvd.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include "wimax_mac.h" @@ -101,8 +101,8 @@ void dissect_mac_mgmt_msg_dsx_rvd_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, /* ensure the message type is DSX-RVD */ if(payload_type != MAC_MGMT_MSG_DSX_RVD) return; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC message type */ dsx_rvd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_dsx_rvd_decoder, tvb, offset, tvb_len, "DSx Received (DSX-RVD) (%u bytes)", tvb_len); /* add MAC DSx subtree */ diff --git a/plugins/wimax/msg_fpc.c b/plugins/wimax/msg_fpc.c index b9f8948f5a..46d888aa10 100644 --- a/plugins/wimax/msg_fpc.c +++ b/plugins/wimax/msg_fpc.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -150,8 +150,8 @@ void dissect_mac_mgmt_msg_fpc_decoder(tvbuff_t *tvb, packet_info *pinfo _U_, pro if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type FPC */ fpc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_fpc_decoder, tvb, 0, tvb_len, "MAC Management Message, FPC (38)"); /* add MAC FPC subtree */ diff --git a/plugins/wimax/msg_pkm.c b/plugins/wimax/msg_pkm.c index e148b70b75..25138a429d 100644 --- a/plugins/wimax/msg_pkm.c +++ b/plugins/wimax/msg_pkm.c @@ -38,7 +38,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "wimax_tlv.h" @@ -154,8 +154,8 @@ void dissect_mac_mgmt_msg_pkm_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if(tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type PKM-REQ */ pkm_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pkm_decoder, tvb, offset, tvb_len, "Privacy Key Management Request (PKM-REQ) (%u bytes)", tvb_len); /* add MAC PKM subtree */ @@ -196,8 +196,8 @@ void dissect_mac_mgmt_msg_pkm_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if(tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type PKM-RSP */ pkm_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pkm_decoder, tvb, offset, tvb_len, "Privacy Key Management Response (PKM-RSP) (%u bytes)", tvb_len); /* add MAC PKM subtree */ diff --git a/plugins/wimax/msg_pmc.c b/plugins/wimax/msg_pmc.c index ffc3f8fd50..31fa62cdf7 100644 --- a/plugins/wimax/msg_pmc.c +++ b/plugins/wimax/msg_pmc.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -216,8 +216,8 @@ void dissect_mac_mgmt_msg_pmc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type PMC-REQ */ pmc_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pmc_req_decoder, tvb, 0, tvb_len, "MAC Management Message, PMC-REQ (63)"); /* add MAC PMC REQ subtree */ @@ -259,8 +259,8 @@ void dissect_mac_mgmt_msg_pmc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type PMC-RSP */ pmc_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_pmc_rsp_decoder, tvb, 0, tvb_len, "MAC Management Message, PMC-RSP (64)"); /* add MAC PMC RSP subtree */ diff --git a/plugins/wimax/msg_prc_lt_ctrl.c b/plugins/wimax/msg_prc_lt_ctrl.c index 790bc52bff..054a58b008 100644 --- a/plugins/wimax/msg_prc_lt_ctrl.c +++ b/plugins/wimax/msg_prc_lt_ctrl.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -137,8 +137,8 @@ void dissect_mac_mgmt_msg_prc_lt_ctrl_decoder(tvbuff_t *tvb, packet_info *pinfo if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type PRC-LT-CTRL */ prc_lt_ctrl_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_prc_lt_ctrl_decoder, tvb, 0, tvb_len, "MAC Management Message, PRC-LT-CTRL (65)"); diff --git a/plugins/wimax/msg_reg_req.c b/plugins/wimax/msg_reg_req.c index 0f5dfd9f13..06f7d08d73 100644 --- a/plugins/wimax/msg_reg_req.c +++ b/plugins/wimax/msg_reg_req.c @@ -36,7 +36,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -924,8 +924,8 @@ void dissect_extended_tlv(proto_tree *reg_req_tree, gint tlv_type, tvbuff_t *tvb guint length; guint nblocks; - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* get the TLV information */ init_tlv_info(&tlv_info, tvb, offset); @@ -1242,8 +1242,8 @@ void dissect_mac_mgmt_msg_reg_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type REG-REQ */ reg_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_reg_req_decoder, tvb, offset, tvb_len, "MAC Management Message, REG-REQ (6)"); /* add MAC REG-REQ subtree */ diff --git a/plugins/wimax/msg_reg_rsp.c b/plugins/wimax/msg_reg_rsp.c index aad834ce46..886fd5bde9 100644 --- a/plugins/wimax/msg_reg_rsp.c +++ b/plugins/wimax/msg_reg_rsp.c @@ -38,7 +38,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "wimax_tlv.h" @@ -201,8 +201,8 @@ void dissect_mac_mgmt_msg_reg_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type REG-RSP */ reg_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_reg_rsp_decoder, tvb, offset, tvb_len, "MAC Management Message, REG-RSP (7)"); /* add MAC REG-RSP subtree */ diff --git a/plugins/wimax/msg_rep.c b/plugins/wimax/msg_rep.c index a06f13b1e9..c033703087 100644 --- a/plugins/wimax/msg_rep.c +++ b/plugins/wimax/msg_rep.c @@ -38,7 +38,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "wimax_tlv.h" @@ -1007,8 +1007,8 @@ void dissect_mac_mgmt_msg_rep_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if(tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type REP-REQ */ rep_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, tvb_len, "Report Request (REP-REQ) (%u bytes)", tvb_len); /* add MAC REP-REQ subtree */ @@ -1181,8 +1181,8 @@ void dissect_mac_mgmt_msg_rep_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if(tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type REP-RSP */ rep_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rep_decoder, tvb, offset, tvb_len, "Report Response (REP-RSP) (%u bytes)", tvb_len); /* add MAC REP-RSP subtree */ diff --git a/plugins/wimax/msg_res_cmd.c b/plugins/wimax/msg_res_cmd.c index 3d8660af43..1d73a83458 100644 --- a/plugins/wimax/msg_res_cmd.c +++ b/plugins/wimax/msg_res_cmd.c @@ -38,7 +38,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "wimax_tlv.h" @@ -116,8 +116,8 @@ void dissect_mac_mgmt_msg_res_cmd_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if(tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type RES-CMD */ res_cmd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_res_cmd_decoder, tvb, offset, tvb_len, "Reset Command (RES-CMD) (%u bytes)", tvb_len); /* add MAC RES-CMD subtree */ diff --git a/plugins/wimax/msg_rng_req.c b/plugins/wimax/msg_rng_req.c index 8ff68595d0..3f18c7f3b6 100644 --- a/plugins/wimax/msg_rng_req.c +++ b/plugins/wimax/msg_rng_req.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -514,8 +514,8 @@ void dissect_mac_mgmt_msg_rng_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type RNG-REQ */ rng_req_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rng_req_decoder, tvb, offset, tvb_len, "MAC Management Message, RNG-REQ (4)"); /* add MAC RNG-REQ subtree */ diff --git a/plugins/wimax/msg_rng_rsp.c b/plugins/wimax/msg_rng_rsp.c index 517ff83804..845e160c3f 100644 --- a/plugins/wimax/msg_rng_rsp.c +++ b/plugins/wimax/msg_rng_rsp.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -730,8 +730,8 @@ void dissect_mac_mgmt_msg_rng_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type RNG-RSP */ rng_rsp_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_rng_rsp_decoder, tvb, offset, tvb_len, "MAC Management Message, RNG-RSP (5)"); /* add MAC RNG-RSP subtree */ diff --git a/plugins/wimax/msg_sbc.c b/plugins/wimax/msg_sbc.c index 69f709f0ea..e02addb41c 100644 --- a/plugins/wimax/msg_sbc.c +++ b/plugins/wimax/msg_sbc.c @@ -38,7 +38,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "wimax_tlv.h" @@ -2229,8 +2229,8 @@ void dissect_mac_mgmt_msg_sbc_req_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type SBC-REQ */ sbc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, tvb_len, "SS Basic Capability Request (SBC-REQ) (%u bytes)", tvb_len); /* add MAC SBC subtree */ @@ -2790,8 +2790,8 @@ void dissect_mac_mgmt_msg_sbc_rsp_decoder(tvbuff_t *tvb, packet_info *pinfo, pro if (tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type SBC-RSP */ sbc_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_sbc_decoder, tvb, offset, tvb_len, "SS Basic Capability Response (SBC-RSP) (%u bytes)", tvb_len); /* add MAC SBC subtree */ diff --git a/plugins/wimax/msg_ucd.c b/plugins/wimax/msg_ucd.c index b725fd4221..cde80bb403 100644 --- a/plugins/wimax/msg_ucd.c +++ b/plugins/wimax/msg_ucd.c @@ -36,7 +36,7 @@ #define DEBUG */ -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include "wimax_tlv.h" #include "wimax_mac.h" @@ -702,8 +702,8 @@ void dissect_mac_mgmt_msg_ucd_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t if(tree) { /* we are being asked for details */ - /* Get the tvb length */ - tvb_len = tvb_length(tvb); + /* Get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display MAC payload type UCD */ ucd_item = proto_tree_add_protocol_format(tree, proto_mac_mgmt_msg_ucd_decoder, tvb, offset, tvb_len, "Uplink Channel Descriptor (UCD) (%u bytes)", tvb_len); /* add MAC UCD subtree */ diff --git a/plugins/wimax/msg_ulmap.c b/plugins/wimax/msg_ulmap.c index aa112a2708..3289811c23 100644 --- a/plugins/wimax/msg_ulmap.c +++ b/plugins/wimax/msg_ulmap.c @@ -34,7 +34,7 @@ #include "moduleinfo.h" -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -2269,7 +2269,7 @@ void dissect_mac_mgmt_msg_ulmap_decoder(tvbuff_t *tvb, packet_info *pinfo, proto guint tvb_len; const guint8 *bufptr; - tvb_len = tvb_length(tvb); + tvb_len = tvb_reported_length(tvb); bufptr = tvb_get_ptr(tvb, offset, tvb_len); UNREFERENCED_PARAMETER(pinfo); diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c index 7cac119a02..fa78768dbc 100644 --- a/plugins/wimax/packet-wmx.c +++ b/plugins/wimax/packet-wmx.c @@ -35,7 +35,7 @@ #include "moduleinfo.h" #include <string.h> -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include <epan/address.h> diff --git a/plugins/wimax/wimax_cdma_code_decoder.c b/plugins/wimax/wimax_cdma_code_decoder.c index 6f49bb6688..51c10bf59f 100644 --- a/plugins/wimax/wimax_cdma_code_decoder.c +++ b/plugins/wimax/wimax_cdma_code_decoder.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> @@ -112,8 +112,8 @@ static void dissect_wimax_cdma_code_decoder(tvbuff_t *tvb, packet_info *pinfo, p } if (tree) { /* we are being asked for details */ - /* get the tvb length */ - length = tvb_length(tvb); + /* get the tvb reported length */ + length = tvb_reported_length(tvb); /* display CDMA dissector info */ cdma_item = proto_tree_add_protocol_format(tree, proto_wimax_cdma_code_decoder, tvb, offset, length, "CDMA Code Attribute (%u bytes)", length); /* add CDMA Code subtree */ diff --git a/plugins/wimax/wimax_compact_dlmap_ie_decoder.c b/plugins/wimax/wimax_compact_dlmap_ie_decoder.c index 769eb971cb..76c080e2c2 100644 --- a/plugins/wimax/wimax_compact_dlmap_ie_decoder.c +++ b/plugins/wimax/wimax_compact_dlmap_ie_decoder.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" diff --git a/plugins/wimax/wimax_compact_ulmap_ie_decoder.c b/plugins/wimax/wimax_compact_ulmap_ie_decoder.c index c44088ebcd..8b2ca7b1ec 100644 --- a/plugins/wimax/wimax_compact_ulmap_ie_decoder.c +++ b/plugins/wimax/wimax_compact_ulmap_ie_decoder.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" diff --git a/plugins/wimax/wimax_fch_decoder.c b/plugins/wimax/wimax_fch_decoder.c index 0f63fa108e..adbbee1c71 100644 --- a/plugins/wimax/wimax_fch_decoder.c +++ b/plugins/wimax/wimax_fch_decoder.c @@ -33,7 +33,7 @@ #endif #include <string.h> -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> diff --git a/plugins/wimax/wimax_ffb_decoder.c b/plugins/wimax/wimax_ffb_decoder.c index 66244460b6..f54c786745 100644 --- a/plugins/wimax/wimax_ffb_decoder.c +++ b/plugins/wimax/wimax_ffb_decoder.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> @@ -114,8 +114,8 @@ static void dissect_wimax_ffb_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t } if (tree) { /* we are being asked for details */ - /* get the tvb length */ - length = tvb_length(tvb); + /* get the tvb reported length */ + length = tvb_reported_length(tvb); /* display Fast Feedback Burst dissector info */ ffb_item = proto_tree_add_protocol_format(tree, proto_wimax_ffb_decoder, tvb, offset, length, "Fast Feedback Burst (%u bytes)", length); /* add Fast Feedback Burst subtree */ diff --git a/plugins/wimax/wimax_hack_decoder.c b/plugins/wimax/wimax_hack_decoder.c index 66b819e8a9..00e22c1a80 100644 --- a/plugins/wimax/wimax_hack_decoder.c +++ b/plugins/wimax/wimax_hack_decoder.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> @@ -126,8 +126,8 @@ static void dissect_wimax_hack_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_ } if (tree) { /* we are being asked for details */ - /* get the tvb length */ - length = tvb_length(tvb); + /* get the tvb reported length */ + length = tvb_reported_length(tvb); /* display HARQ ACK Burst dissector info */ hack_item = proto_tree_add_protocol_format(tree, proto_wimax_hack_decoder, tvb, offset, length, "HARQ ACK Burst (%u bytes)", length); /* add HARQ ACK Burst subtree */ diff --git a/plugins/wimax/wimax_harq_map_decoder.c b/plugins/wimax/wimax_harq_map_decoder.c index 995b66b25e..48f12c89ce 100644 --- a/plugins/wimax/wimax_harq_map_decoder.c +++ b/plugins/wimax/wimax_harq_map_decoder.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -131,8 +131,8 @@ void dissector_wimax_harq_map_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t guint32 harq_map_msg_crc, calculated_crc; guint32 first_24bits; - /* check the tvb length */ - tvb_len = tvb_length(tvb); + /* check the tvb reported length */ + tvb_len = tvb_reported_length(tvb); if(!tvb_len) { /* do nothing if tvb is empty */ return; diff --git a/plugins/wimax/wimax_pdu_decoder.c b/plugins/wimax/wimax_pdu_decoder.c index 4dc5e9f1b4..c22f80c0f0 100644 --- a/plugins/wimax/wimax_pdu_decoder.c +++ b/plugins/wimax/wimax_pdu_decoder.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> #include "crc.h" @@ -131,7 +131,7 @@ static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t #endif /* parsing the PDU burst */ - for(offset = 0; offset < tvb_length(tvb); ) + for(offset = 0; offset < tvb_reported_length(tvb); ) { if (offset == 0) { @@ -142,7 +142,7 @@ static void dissect_wimax_pdu_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_t first_gmh = FALSE; } /* get the length of the remainder */ - length = tvb_length_remaining(tvb, offset); + length = tvb_reported_length_remaining(tvb, offset); /* get the first byte at offset */ first_byte = tvb_get_guint8(tvb, offset); /* check for padding */ diff --git a/plugins/wimax/wimax_phy_attributes_decoder.c b/plugins/wimax/wimax_phy_attributes_decoder.c index 5fe9817741..755b4c7fda 100644 --- a/plugins/wimax/wimax_phy_attributes_decoder.c +++ b/plugins/wimax/wimax_phy_attributes_decoder.c @@ -32,7 +32,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> @@ -156,8 +156,8 @@ static void dissect_wimax_phy_attributes_decoder(tvbuff_t *tvb, packet_info *pin } if (tree) { /* we are being asked for details */ - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* display PDU Burst Physical Attributes dissector info */ phy_item = proto_tree_add_protocol_format(tree, proto_wimax_phy_attributes_decoder, tvb, offset, tvb_len, "PDU Burst Physical Attributes (%u bytes)", tvb_len); /* add PDU Burst Physical Attributes subtree */ diff --git a/plugins/wimax/wimax_tlv.h b/plugins/wimax/wimax_tlv.h index 9377c57b1f..5228edb73b 100644 --- a/plugins/wimax/wimax_tlv.h +++ b/plugins/wimax/wimax_tlv.h @@ -28,7 +28,7 @@ #ifndef _WIMAX_TLV_H_ #define _WIMAX_TLV_H_ -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #define WIMAX_TLV_EXTENDED_LENGTH_MASK 0x80 diff --git a/plugins/wimax/wimax_utils.c b/plugins/wimax/wimax_utils.c index 4080c4c5ac..8246a30792 100644 --- a/plugins/wimax/wimax_utils.c +++ b/plugins/wimax/wimax_utils.c @@ -34,7 +34,7 @@ #include "config.h" #endif -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> #include "wimax_tlv.h" #include "wimax_mac.h" @@ -1710,8 +1710,8 @@ void wimax_error_parameter_set_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_ proto_tree *tlv_tree = NULL; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); offset = 0; /* display error parameter information */ ceps_item = proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, tvb_len, "Error Parameter Set (%u bytes)", tvb_len); @@ -1798,8 +1798,8 @@ void wimax_convengence_service_parameter_encoding_rules_decoder(guint sfe_type, if((sfe_type < SFE_CSPER_ATM) || (sfe_type > SFE_CSPER_PACKET_IP_802_3_ECRTP_COMPRESSION)) return; /* invalid CS Parameter Encodings */ - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); offset = 0; /* display SFE information */ csper_item = proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, offset, tvb_len, "Convergence Service Parameter Encoding Rules (%u bytes)", tvb_len); @@ -2171,8 +2171,8 @@ void wimax_service_flow_encodings_decoder(tvbuff_t *tvb, packet_info *pinfo, pro proto_tree *tlv_tree = NULL; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); #ifdef DEBUG /* for debug only */ /* display dissector information */ proto_tree_add_protocol_format(tree, proto_wimax_utility_decoders, tvb, 0, tvb_len, "WiMax Service Flow Encodings (%u bytes)", tvb_len); @@ -2617,8 +2617,8 @@ void wimax_security_negotiation_parameters_decoder(tvbuff_t *tvb, packet_info *p proto_tree *tlv_tree = NULL; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* do nothing if the TLV fields is not exist */ if(!tvb_len) return; @@ -2738,8 +2738,8 @@ void wimax_cryptographic_suite_list_decoder(tvbuff_t *tvb, packet_info *pinfo, p proto_tree *tlv_tree = NULL; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* do nothing if the TLV fields is not exist */ if(!tvb_len) return; @@ -2811,8 +2811,8 @@ void wimax_pkm_tlv_encoded_attributes_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tlv_tree = NULL; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* do nothing if the TLV fields is not exist */ if(!tvb_len) return; @@ -3038,8 +3038,8 @@ void wimax_tek_parameters_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree proto_tree *tlv_tree = NULL; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* do nothing if the TLV fields is not exist */ if(!tvb_len) return; @@ -3125,8 +3125,8 @@ void wimax_pkm_configuration_settings_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tlv_tree; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* do nothing if the TLV fields is not exist */ if(!tvb_len) return; @@ -3220,8 +3220,8 @@ void wimax_sa_descriptor_decoder(tvbuff_t *tvb, packet_info *pinfo, proto_tree * proto_tree *tlv_tree = NULL; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* do nothing if the TLV fields is not exist */ if(!tvb_len) return; @@ -3306,8 +3306,8 @@ void wimax_security_capabilities_decoder(tvbuff_t *tvb, packet_info *pinfo, prot proto_tree *tlv_tree = NULL; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* do nothing if the TLV fields is not exist */ if(!tvb_len) return; @@ -3378,8 +3378,8 @@ void wimax_vendor_specific_information_decoder(tvbuff_t *tvb, packet_info *pinfo gint tlv_type; tlv_info_t tlv_info; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* do nothing if the TLV fields is not exist */ if(!tvb_len) return; @@ -3468,8 +3468,8 @@ guint wimax_common_tlv_encoding_decoder(tvbuff_t *tvb, packet_info *pinfo, proto tlv_info_t tlv_info; gfloat current_power; - /* get the tvb length */ - tvb_len = tvb_length(tvb); + /* get the tvb reported length */ + tvb_len = tvb_reported_length(tvb); /* do nothing if the TLV fields is not exist */ if(!tvb_len) return 0; diff --git a/plugins/wimax/wimax_utils.h b/plugins/wimax/wimax_utils.h index 8ea7528fa6..cfdb4d1bc4 100644 --- a/plugins/wimax/wimax_utils.h +++ b/plugins/wimax/wimax_utils.h @@ -28,7 +28,7 @@ #ifndef WIMAX_UTILS_H #define WIMAX_UTILS_H -#include <gmodule.h> +#include <glib.h> #include <epan/packet.h> extern void proto_register_wimax_utility_decoders(void); |