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
This commit is contained in:
Guy Harris 2007-05-27 18:33:13 +00:00
parent d99b6c0a8b
commit 01844e151a
45 changed files with 180 additions and 180 deletions

View File

@ -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
#

View File

@ -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);

View File

@ -30,7 +30,7 @@
#ifdef STATIC_DATA
#include <gmodule.h>
#include <glib.h>
guint32 crc32_table[256] = {
0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9,

View File

@ -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);

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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
#

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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;

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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)");

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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 */

View File

@ -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);

View File

@ -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>

View File

@ -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 */

View File

@ -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"

View File

@ -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"

View File

@ -33,7 +33,7 @@
#endif
#include <string.h>
#include <gmodule.h>
#include <glib.h>
#include <epan/packet.h>
#include <epan/prefs.h>

View File

@ -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 */

View File

@ -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 */

View File

@ -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;

View File

@ -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 */

View File

@ -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 */

View File

@ -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

View File

@ -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;

View File

@ -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);