Use tvb_new_subset_remaining() rather than tvb_new_subset();

#include <styring.h> not req'd (in a few cases);
Minor reformating & whitespace cleanup.

svn path=/trunk/; revision=41374
This commit is contained in:
Bill Meier 2012-03-06 16:58:09 +00:00
parent 9cfb5a1ea8
commit 87cf82e056
21 changed files with 2980 additions and 2771 deletions

View File

@ -60,9 +60,9 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *ti;
proto_tree *atmtcp_tree;
guint offset=0;
gint32 length;
tvbuff_t *next_tvb;
guint offset = 0;
gint32 length;
tvbuff_t *next_tvb;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMTCP");
@ -77,7 +77,7 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(atmtcp_tree, hf_atmtcp_vpi, tvb, offset, 2, ENC_NA);
}
offset += 2;
if (tree) {
/* VCI */
@ -102,7 +102,7 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += 4;
/* Data (for the moment...) */
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, tree);
return tvb_length(tvb);
}
@ -143,7 +143,7 @@ proto_register_atmtcp(void)
atmtcp_module = prefs_register_protocol(proto_atmtcp, proto_reg_handoff_atmtcp);
prefs_register_uint_preference(atmtcp_module, "tcp.port", "ATMTCP TCP Port",
prefs_register_uint_preference(atmtcp_module, "tcp.port", "ATMTCP TCP Port",
"ATMTCP TCP port if other than the default",
10, &global_atmtcp_tcp_port);
}

View File

@ -28,18 +28,17 @@
#endif
#include <glib.h>
#include <string.h>
#include <epan/bitswap.h>
#include <epan/packet.h>
#include <epan/bitswap.h>
#include <epan/asn1.h> /* needed for packet-gsm_map.h */
#include "packet-cell_broadcast.h"
#include "packet-gsm_map.h"
static int dissect_bmc_cbs_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static int dissect_bmc_cbs_message (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static int dissect_bmc_schedule_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static int dissect_bmc_cbs41_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static int dissect_bmc_cbs41_message (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
static int proto_bmc = -1;
static int hf_bmc_message_type = -1;
@ -88,13 +87,13 @@ static gint ett_bmc_message_description = -1;
static int
dissect_bmc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
guint8 message_type;
guint8 *p_rev, *reversing_buffer;
gint offset = 0;
gint i, len;
guint8 message_type;
guint8 *p_rev, *reversing_buffer;
gint offset = 0;
gint i, len;
proto_item *ti;
proto_tree *bmc_tree;
tvbuff_t *bit_reversed_tvb;
tvbuff_t *bit_reversed_tvb;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BMC");
col_clear(pinfo->cinfo, COL_INFO);
@ -143,7 +142,7 @@ static int
dissect_bmc_cbs_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
tvbuff_t *cell_broadcast_tvb;
gint offset=1;
gint offset = 1;
dissect_cbs_message_identifier(tvb, tree, offset);
offset += 2;
@ -154,7 +153,7 @@ dissect_bmc_cbs_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
dissect_cbs_data_coding_scheme(tvb, pinfo, tree, offset);
offset += 1;
cell_broadcast_tvb = tvb_new_subset(tvb, offset, -1, -1);
cell_broadcast_tvb = tvb_new_subset_remaining(tvb, offset);
dissect_umts_cell_broadcast_message(cell_broadcast_tvb, pinfo, tree);
offset = tvb_length(cell_broadcast_tvb);
@ -164,14 +163,14 @@ dissect_bmc_cbs_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
static int
dissect_bmc_schedule_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
gint offset=1, i, saved_offset;
guint8 new_message_bitmap_len;
guint8 length_of_cbs_schedule_period;
guint8 message_description_type;
guint8 future_extension_bitmap;
guint8 length_of_serial_number_list;
guint8 entry;
guint8 mask, bit;
gint offset = 1, i, saved_offset;
guint8 new_message_bitmap_len;
guint8 length_of_cbs_schedule_period;
guint8 message_description_type;
guint8 future_extension_bitmap;
guint8 length_of_serial_number_list;
guint8 entry;
guint8 mask, bit;
proto_tree *message_description_tree;
proto_item *ti;
@ -197,7 +196,12 @@ dissect_bmc_schedule_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
for (i=0; i<new_message_bitmap_len; i++) {
for(mask=1; bit<=length_of_cbs_schedule_period; mask<<=1, bit++) {
message_description_type = tvb_get_guint8(tvb,offset);
proto_tree_add_uint_format(message_description_tree, hf_bmc_message_description_type, tvb, offset, 1, message_description_type, "Message %d Message Description Type: %s (%d)", bit, val_to_str(message_description_type, message_description_type_vals,"Unknown"), message_description_type);
proto_tree_add_uint_format(message_description_tree, hf_bmc_message_description_type,
tvb, offset, 1, message_description_type,
"Message %d Message Description Type: %s (%d)",
bit,
val_to_str(message_description_type, message_description_type_vals,"Unknown"),
message_description_type);
offset += 1;
if ((message_description_type==1) || (message_description_type==5)) {
@ -205,7 +209,8 @@ dissect_bmc_schedule_message(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
offset += 2;
}
else if ((message_description_type==0) || (message_description_type==4)) {
proto_tree_add_item(message_description_tree, hf_bmc_offset_to_ctch_bs_index_of_first_transmission, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(message_description_tree, hf_bmc_offset_to_ctch_bs_index_of_first_transmission,
tvb, offset, 1, ENC_BIG_ENDIAN);
offset += 1;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -39,20 +39,20 @@ static gint ett_etherip = -1;
static dissector_handle_t eth_withoutfcs_handle;
#ifndef offsetof
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
#endif
/*
* RFC 3378: EtherIP: Tunneling Ethernet Frames in IP Datagrams
*
* Bits 0-3: Protocol version
* Bits 4-15: Reserved for future use
* Bits 0-3: Protocol version
* Bits 4-15: Reserved for future use
*/
struct etheriphdr {
guint8 ver; /* version/reserved */
guint8 pad; /* required padding byte */
guint8 ver; /* version/reserved */
guint8 pad; /* required padding byte */
};
#define ETHERIP_VERS_MASK 0x0f
@ -78,8 +78,8 @@ dissect_etherip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_protocol_format(tree, proto_etherip, tvb, 0,
sizeof(etheriph),
"EtherIP, Version %d",
etheriph.ver
);
etheriph.ver
);
etherip_tree = proto_item_add_subtree(ti, ett_etherip);
proto_tree_add_uint(etherip_tree, hf_etherip_ver, tvb,
@ -88,7 +88,7 @@ dissect_etherip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* Set the tvbuff for the payload after the header */
next_tvb = tvb_new_subset(tvb, sizeof(etheriph), -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, sizeof(etheriph));
call_dissector(eth_withoutfcs_handle, next_tvb, pinfo, tree);
}
@ -98,15 +98,15 @@ proto_register_etherip(void)
{
static hf_register_info hf_etherip[] = {
{ &hf_etherip_ver,
{ "Version", "etherip.ver", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
{ "Version", "etherip.ver", FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL }},
};
static gint *ett[] = {
&ett_etherip,
};
proto_etherip = proto_register_protocol("Ethernet over IP",
"ETHERIP", "etherip");
"ETHERIP", "etherip");
proto_register_field_array(proto_etherip, hf_etherip, array_length(hf_etherip));
proto_register_subtree_array(ett, array_length(ett));

View File

@ -56,24 +56,24 @@ static gint ett_gmrp_attribute = -1;*/
static dissector_handle_t data_handle;
/* Constant definitions */
#define GARP_DEFAULT_PROTOCOL_ID 0x0001
#define GARP_END_OF_MARK 0x00
#define GARP_DEFAULT_PROTOCOL_ID 0x0001
#define GARP_END_OF_MARK 0x00
#define GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP 0x01
#define GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT 0x02
#define GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP 0x01
#define GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT 0x02
#define GMRP_SERVICE_REQUIREMENT_FORWARD_ALL 0x00
#define GMRP_SERVICE_REQUIREMENT_FORWARD_ALL_UNREGISTERED 0x01
#define GMRP_SERVICE_REQUIREMENT_FORWARD_ALL 0x00
#define GMRP_SERVICE_REQUIREMENT_FORWARD_ALL_UNREGISTERED 0x01
static const value_string attribute_type_vals[] = {
{ GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP ,"Group Membership" },
{ GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT ,"Service Requirement" },
{ 0, NULL }
{ GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP ,"Group Membership" },
{ GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT ,"Service Requirement" },
{ 0, NULL }
};
/* The length of GMRP LeaveAll attribute should be 2 octets (one for length
* and the other for event) */
#define GMRP_LENGTH_LEAVEALL (sizeof(guint8)+sizeof(guint8))
#define GMRP_LENGTH_LEAVEALL (sizeof(guint8)+sizeof(guint8))
/* The length of GMRP attribute other than LeaveAll should be:
*
@ -82,28 +82,28 @@ static const value_string attribute_type_vals[] = {
* 3 bytes for Service Requirement (1 for length, 1 for event, 1 for attribute value)
*
*/
#define GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+(6*sizeof(guint8)))
#define GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+sizeof(guint8))
#define GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+(6*sizeof(guint8)))
#define GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL (sizeof(guint8)+sizeof(guint8)+sizeof(guint8))
/* Packet offset definitions */
#define GARP_PROTOCOL_ID 0
#define GARP_PROTOCOL_ID 0
/* Event definitions */
#define GMRP_EVENT_LEAVEALL 0
#define GMRP_EVENT_JOINEMPTY 1
#define GMRP_EVENT_JOININ 2
#define GMRP_EVENT_LEAVEEMPTY 3
#define GMRP_EVENT_LEAVEIN 4
#define GMRP_EVENT_EMPTY 5
#define GMRP_EVENT_LEAVEALL 0
#define GMRP_EVENT_JOINEMPTY 1
#define GMRP_EVENT_JOININ 2
#define GMRP_EVENT_LEAVEEMPTY 3
#define GMRP_EVENT_LEAVEIN 4
#define GMRP_EVENT_EMPTY 5
static const value_string event_vals[] = {
{ GMRP_EVENT_LEAVEALL, "Leave All" },
{ GMRP_EVENT_JOINEMPTY, "Join Empty" },
{ GMRP_EVENT_JOININ, "Join In" },
{ GMRP_EVENT_LEAVEEMPTY, "Leave Empty" },
{ GMRP_EVENT_LEAVEIN, "Leave In" },
{ GMRP_EVENT_EMPTY, "Empty" },
{ 0, NULL }
{ GMRP_EVENT_LEAVEALL, "Leave All" },
{ GMRP_EVENT_JOINEMPTY, "Join Empty" },
{ GMRP_EVENT_JOININ, "Join In" },
{ GMRP_EVENT_LEAVEEMPTY, "Leave Empty" },
{ GMRP_EVENT_LEAVEIN, "Leave In" },
{ GMRP_EVENT_EMPTY, "Empty" },
{ 0, NULL }
};
@ -115,7 +115,7 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *gmrp_tree;
guint16 protocol_id;
guint8 octet;
guint8 attribute_type;
guint8 attribute_type;
int msg_index, attr_index, offset = 0, length = tvb_reported_length(tvb);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "GMRP");
@ -124,212 +124,213 @@ dissect_gmrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (tree)
{
ti = proto_tree_add_item(tree, proto_gmrp, tvb, 0, length, ENC_NA);
ti = proto_tree_add_item(tree, proto_gmrp, tvb, 0, -1, ENC_NA);
gmrp_tree = proto_item_add_subtree(ti, ett_gmrp);
gmrp_tree = proto_item_add_subtree(ti, ett_gmrp);
/* Read in GARP protocol ID */
protocol_id = tvb_get_ntohs(tvb, GARP_PROTOCOL_ID);
/* Read in GARP protocol ID */
protocol_id = tvb_get_ntohs(tvb, GARP_PROTOCOL_ID);
proto_tree_add_uint_format(gmrp_tree, hf_gmrp_proto_id, tvb,
GARP_PROTOCOL_ID, sizeof(guint16),
protocol_id,
"Protocol Identifier: 0x%04x (%s)",
protocol_id,
protocol_id == GARP_DEFAULT_PROTOCOL_ID ?
"GARP Multicast Registration Protocol" :
"Unknown Protocol");
proto_tree_add_uint_format(gmrp_tree, hf_gmrp_proto_id, tvb,
GARP_PROTOCOL_ID, sizeof(guint16),
protocol_id,
"Protocol Identifier: 0x%04x (%s)",
protocol_id,
protocol_id == GARP_DEFAULT_PROTOCOL_ID ?
"GARP Multicast Registration Protocol" :
"Unknown Protocol");
/* Currently only one protocol ID is supported */
if (protocol_id != GARP_DEFAULT_PROTOCOL_ID)
{
proto_tree_add_text(gmrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16),
" (Warning: this version of Wireshark only knows about protocol id = 1)");
call_dissector(data_handle,
tvb_new_subset(tvb, GARP_PROTOCOL_ID + sizeof(guint16), -1, -1),
pinfo, tree);
return;
}
/* Currently only one protocol ID is supported */
if (protocol_id != GARP_DEFAULT_PROTOCOL_ID)
{
proto_tree_add_text(gmrp_tree, tvb, GARP_PROTOCOL_ID, sizeof(guint16),
" (Warning: this version of Wireshark only knows about protocol id = 1)");
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, GARP_PROTOCOL_ID + sizeof(guint16)),
pinfo, tree);
return;
}
offset += sizeof(guint16);
length -= sizeof(guint16);
offset += sizeof(guint16);
length -= sizeof(guint16);
msg_index = 0;
msg_index = 0;
/* Begin to parse GARP messages */
while (length)
{
proto_item *msg_item;
int msg_start = offset;
/* Begin to parse GARP messages */
while (length)
{
proto_item *msg_item;
int msg_start = offset;
/* Read in attribute type. */
attribute_type = octet = tvb_get_guint8(tvb, offset);
/* Read in attribute type. */
attribute_type = octet = tvb_get_guint8(tvb, offset);
/* Check for end of mark */
if (octet == GARP_END_OF_MARK)
{
/* End of GARP PDU */
if (msg_index)
{
proto_tree_add_text(gmrp_tree, tvb, offset, sizeof(guint8),
"End of pdu");
break;
}
else
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
}
/* Check for end of mark */
if (octet == GARP_END_OF_MARK)
{
/* End of GARP PDU */
if (msg_index)
{
proto_tree_add_text(gmrp_tree, tvb, offset, sizeof(guint8),
"End of pdu");
break;
}
else
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
}
offset += sizeof(guint8);
length -= sizeof(guint8);
offset += sizeof(guint8);
length -= sizeof(guint8);
msg_item = proto_tree_add_text(gmrp_tree, tvb, msg_start, -1,
"Message %d", msg_index + 1);
msg_item = proto_tree_add_text(gmrp_tree, tvb, msg_start, -1,
"Message %d", msg_index + 1);
proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_type, tvb,
msg_start, sizeof(guint8), octet);
proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_type, tvb,
msg_start, sizeof(guint8), octet);
/* GMRP supports Group Membership and Service Requirement as attribute types */
if ( (octet != GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP) && (octet != GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT) )
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset), pinfo,
tree);
return;
}
/* GMRP supports Group Membership and Service Requirement as attribute types */
if ( (octet != GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP) && (octet != GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT) )
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset), pinfo,
tree);
return;
}
attr_index = 0;
attr_index = 0;
while (length)
{
int attr_start = offset;
proto_item *attr_item;
while (length)
{
int attr_start = offset;
proto_item *attr_item;
/* Read in attribute length. */
octet = tvb_get_guint8(tvb, offset);
/* Read in attribute length. */
octet = tvb_get_guint8(tvb, offset);
/* Check for end of mark */
if (octet == GARP_END_OF_MARK)
{
/* If at least one message has been already read,
* check for another end of mark.
*/
if (attr_index)
{
proto_tree_add_text(gmrp_tree, tvb, offset,
sizeof(guint8), " End of mark");
/* Check for end of mark */
if (octet == GARP_END_OF_MARK)
{
/* If at least one message has been already read,
* check for another end of mark.
*/
if (attr_index)
{
proto_tree_add_text(gmrp_tree, tvb, offset,
sizeof(guint8), " End of mark");
offset += sizeof(guint8);
length -= sizeof(guint8);
offset += sizeof(guint8);
length -= sizeof(guint8);
proto_item_set_len(msg_item, offset - msg_start);
break;
}
else
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
}
else
{
guint8 event;
proto_item_set_len(msg_item, offset - msg_start);
break;
}
else
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
}
else
{
guint8 event;
offset += sizeof(guint8);
length -= sizeof(guint8);
offset += sizeof(guint8);
length -= sizeof(guint8);
attr_item = proto_tree_add_text(gmrp_tree, tvb,
attr_start, -1, " Attribute %d", attr_index + 1);
attr_item = proto_tree_add_text(gmrp_tree, tvb,
attr_start, -1, " Attribute %d", attr_index + 1);
proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_length,
tvb, attr_start, sizeof(guint8), octet);
proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_length,
tvb, attr_start, sizeof(guint8), octet);
/* Read in attribute event */
event = tvb_get_guint8(tvb, offset);
/* Read in attribute event */
event = tvb_get_guint8(tvb, offset);
proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_event,
tvb, offset, sizeof(guint8), event);
proto_tree_add_uint(gmrp_tree, hf_gmrp_attribute_event,
tvb, offset, sizeof(guint8), event);
offset += sizeof(guint8);
length -= sizeof(guint8);
offset += sizeof(guint8);
length -= sizeof(guint8);
switch (event) {
switch (event) {
case GMRP_EVENT_LEAVEALL:
if (octet != GMRP_LENGTH_LEAVEALL)
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
break;
case GMRP_EVENT_LEAVEALL:
if (octet != GMRP_LENGTH_LEAVEALL)
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
break;
case GMRP_EVENT_JOINEMPTY:
case GMRP_EVENT_JOININ:
case GMRP_EVENT_LEAVEEMPTY:
case GMRP_EVENT_LEAVEIN:
case GMRP_EVENT_EMPTY:
if ( (octet != GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL) && (octet != GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL) )
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
case GMRP_EVENT_JOINEMPTY:
case GMRP_EVENT_JOININ:
case GMRP_EVENT_LEAVEEMPTY:
case GMRP_EVENT_LEAVEIN:
case GMRP_EVENT_EMPTY:
if ( (octet != GMRP_GROUP_MEMBERSHIP_NON_LEAVEALL) &&
(octet != GMRP_SERVICE_REQUIREMENT_NON_LEAVEALL) )
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
/* Show attribute value */
/* Show attribute value */
if ( GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP == attribute_type )
{
/* Group Membership */
proto_tree_add_item(gmrp_tree, hf_gmrp_attribute_value_group_membership,
tvb, offset, (6*sizeof(guint8)), ENC_NA);
if ( GMRP_ATTRIBUTE_TYPE_GROUP_MEMBERSHIP == attribute_type )
{
/* Group Membership */
proto_tree_add_item(gmrp_tree, hf_gmrp_attribute_value_group_membership,
tvb, offset, (6*sizeof(guint8)), ENC_NA);
offset += 6*sizeof(guint8);
length -= 6*sizeof(guint8);
}
else
if ( GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT == attribute_type )
{
/* Service Requirement */
proto_tree_add_item(gmrp_tree, hf_gmrp_attribute_value_service_requirement,
tvb, offset, sizeof(guint8), ENC_BIG_ENDIAN);
offset += 6*sizeof(guint8);
length -= 6*sizeof(guint8);
}
else
if ( GMRP_ATTRIBUTE_TYPE_SERVICE_REQUIREMENT == attribute_type )
{
/* Service Requirement */
proto_tree_add_item(gmrp_tree, hf_gmrp_attribute_value_service_requirement,
tvb, offset, sizeof(guint8), ENC_BIG_ENDIAN);
offset += sizeof(guint8);
length -= sizeof(guint8);
}
else
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
offset += sizeof(guint8);
length -= sizeof(guint8);
}
else
{
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
break;
break;
default:
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
}
default:
call_dissector(data_handle,
tvb_new_subset_remaining(tvb, offset),
pinfo, tree);
return;
}
}
proto_item_set_len(attr_item, offset - attr_start);
proto_item_set_len(attr_item, offset - attr_start);
attr_index++;
}
attr_index++;
}
msg_index++;
}
msg_index++;
}
}
}
@ -340,41 +341,41 @@ void
proto_register_gmrp(void)
{
static hf_register_info hf[] = {
{ &hf_gmrp_proto_id,
{ "Protocol ID", "gmrp.protocol_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_type,
{ "Type", "gmrp.attribute_type",
FT_UINT8, BASE_HEX, VALS(attribute_type_vals), 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_length,
{ "Length", "gmrp.attribute_length",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_event,
{ "Event", "gmrp.attribute_event",
FT_UINT8, BASE_DEC, VALS(event_vals), 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_value_group_membership,
{ "Value", "gmrp.attribute_value_group_membership",
FT_ETHER, BASE_NONE, NULL, 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_value_service_requirement,
{ "Value", "gmrp.attribute_value_service_requirement",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL , HFILL }
}
{ &hf_gmrp_proto_id,
{ "Protocol ID", "gmrp.protocol_id",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_type,
{ "Type", "gmrp.attribute_type",
FT_UINT8, BASE_HEX, VALS(attribute_type_vals), 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_length,
{ "Length", "gmrp.attribute_length",
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_event,
{ "Event", "gmrp.attribute_event",
FT_UINT8, BASE_DEC, VALS(event_vals), 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_value_group_membership,
{ "Value", "gmrp.attribute_value_group_membership",
FT_ETHER, BASE_NONE, NULL, 0x0,
NULL , HFILL }
},
{ &hf_gmrp_attribute_value_service_requirement,
{ "Value", "gmrp.attribute_value_service_requirement",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL , HFILL }
}
};
static gint *ett[] = {
&ett_gmrp
&ett_gmrp
};
/* Register the protocol name and description for GMRP */
@ -391,5 +392,5 @@ proto_register_gmrp(void)
void
proto_reg_handoff_gmrp(void){
data_handle = find_dissector("data");
data_handle = find_dissector("data");
}

View File

@ -1075,7 +1075,7 @@ static const value_string rpl_option_vals[] = {
static int
dissect_contained_icmpv6(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
{
gboolean save_in_error_pkt;
gboolean save_in_error_pkt;
tvbuff_t *next_tvb;
/* Save the current value of the "we're inside an error packet"
@ -1121,11 +1121,11 @@ static conversation_t *_find_or_create_conversation(packet_info *pinfo)
/* ======================================================================= */
static icmp_transaction_t *transaction_start(packet_info *pinfo, proto_tree *tree, guint32 *key)
{
conversation_t *conversation;
conversation_t *conversation;
icmpv6_conv_info_t *icmpv6_info;
icmp_transaction_t *icmpv6_trans;
emem_tree_key_t icmpv6_key[2];
proto_item *it;
emem_tree_key_t icmpv6_key[2];
proto_item *it;
/* Handle the conversation tracking */
conversation = _find_or_create_conversation(pinfo);
@ -1173,12 +1173,12 @@ static icmp_transaction_t *transaction_start(packet_info *pinfo, proto_tree *tre
/* ======================================================================= */
static icmp_transaction_t *transaction_end(packet_info *pinfo, proto_tree *tree, guint32 *key)
{
conversation_t *conversation;
conversation_t *conversation;
icmpv6_conv_info_t *icmpv6_info;
icmp_transaction_t *icmpv6_trans;
emem_tree_key_t icmpv6_key[2];
proto_item *it;
nstime_t ns;
emem_tree_key_t icmpv6_key[2];
proto_item *it;
nstime_t ns;
conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst,
pinfo->ptype, 0, 0, 0);
@ -1230,9 +1230,9 @@ dissect_icmpv6_nd_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
{
proto_tree *icmp6opt_tree, *flag_tree;
proto_item *ti, *ti_opt, *ti_opt_len;
guint8 opt_type;
int opt_len;
int opt_offset;
guint8 opt_type;
int opt_len;
int opt_offset;
while ((int)tvb_reported_length(tvb) > offset) {
/* there are more options */
@ -2144,9 +2144,9 @@ dissect_icmpv6_rpl_opt(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
{
proto_tree *icmp6opt_tree, *flag_tree;
proto_item *ti, *ti_opt, *ti_opt_len;
guint8 opt_type;
int opt_len;
int opt_offset;
guint8 opt_type;
int opt_len;
int opt_offset;
while ((int)tvb_reported_length(tvb) > offset) {
/* there are more options */
@ -2717,7 +2717,7 @@ dissect_nodeinfo(tvbuff_t *tvb, int ni_offset, packet_info *pinfo _U_, proto_tre
{
proto_tree *flag_tree;
proto_item *ti;
guint16 qtype;
guint16 qtype;
/* Qtype */
proto_tree_add_item(tree, hf_icmpv6_ni_qtype, tvb, ni_offset, 2, ENC_BIG_ENDIAN);
@ -2824,7 +2824,7 @@ static int
dissect_rrenum(tvbuff_t *tvb, int rr_offset, packet_info *pinfo _U_, proto_tree *tree, guint8 icmp6_type _U_, guint8 icmp6_code)
{
proto_tree *flag_tree, *mp_tree, *up_tree, *rm_tree;
proto_item *ti, *ti_mp, *ti_up, *ti_rm;
proto_item *ti, *ti_mp, *ti_up, *ti_rm;
/* Sequence Number */
proto_tree_add_item(tree, hf_icmpv6_rr_sequencenumber, tvb, rr_offset, 4, ENC_BIG_ENDIAN);
@ -3031,7 +3031,7 @@ dissect_mldrv2( tvbuff_t *tvb, guint32 offset, packet_info *pinfo _U_, proto_tre
{
proto_tree *mar_tree;
proto_item *ti_mar;
int mldr_offset = offset;
int mldr_offset = offset;
/* Reserved */
proto_tree_add_item(tree, hf_icmpv6_reserved, tvb, mldr_offset, 2, ENC_NA );
@ -3095,17 +3095,17 @@ dissect_mldrv2( tvbuff_t *tvb, guint32 offset, packet_info *pinfo _U_, proto_tre
static int
dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *icmp6_tree = NULL, *flag_tree = NULL;
proto_item *ti = NULL, *hidden_item, *checksum_item = NULL, *code_item = NULL, *ti_flag = NULL;
const char *code_name = NULL;
guint length = 0, reported_length;
vec_t cksum_vec[4];
guint32 phdr[2];
guint16 cksum, computed_cksum;
int offset;
tvbuff_t *next_tvb;
guint8 icmp6_type, icmp6_code;
icmp_transaction_t *trans = NULL;
proto_tree *icmp6_tree = NULL, *flag_tree = NULL;
proto_item *ti = NULL, *hidden_item, *checksum_item = NULL, *code_item = NULL, *ti_flag = NULL;
const char *code_name = NULL;
guint length = 0, reported_length;
vec_t cksum_vec[4];
guint32 phdr[2];
guint16 cksum, computed_cksum;
int offset;
tvbuff_t *next_tvb;
guint8 icmp6_type, icmp6_code;
icmp_transaction_t *trans = NULL;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICMPv6");
col_clear(pinfo->cinfo, COL_INFO);
@ -3262,15 +3262,15 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
trans = transaction_end(pinfo, icmp6_tree, conv_key);
}
}
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
offset += call_dissector(data_handle, next_tvb, pinfo, icmp6_tree);
}
}
if (1) { /* There are expert infos buried in here so always execute */
/* decode... */
/* FIXME: The following messages MUST have a TTL^WHop-Limit of 255:
133-137, 141-142, 148-149. Detect this and add expert items. */
/* FIXME: The following messages MUST have a TTL^WHop-Limit of 255:
133-137, 141-142, 148-149. Detect this and add expert items. */
switch (icmp6_type) {
case ICMP6_DST_UNREACH: /* Destination Unreachable (1) */
case ICMP6_TIME_EXCEEDED: /* Time Exceeded (3) */

View File

@ -398,9 +398,9 @@ static gboolean ieee802154_extend_auth = TRUE;
static void
dissect_ieee802154_fcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet, guint *offset)
{
guint16 fcf;
proto_tree *field_tree;
proto_item *ti;
guint16 fcf;
proto_tree *field_tree;
proto_item *ti;
/* Get the FCF field. */
fcf = tvb_get_letohs(tvb, *offset);
@ -458,13 +458,13 @@ dissect_ieee802154_fcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee
static void
dissect_ieee802154_nonask_phy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *ieee802154_tree = NULL;
proto_item *proto_root = NULL;
proto_tree *ieee802154_tree = NULL;
proto_item *proto_root = NULL;
guint offset=0;
guint32 preamble;
guint8 sfd,phr;
tvbuff_t* mac;
guint offset = 0;
guint32 preamble;
guint8 sfd,phr;
tvbuff_t* mac;
/* Create the protocol tree. */
if (tree) {
@ -1279,8 +1279,8 @@ dissect_ieee802154_fcs:
static void
dissect_ieee802154_superframe(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset)
{
proto_tree *field_tree = NULL;
proto_item *ti;
proto_tree *field_tree = NULL;
proto_item *ti;
guint16 superframe;
/* Parse the superframe spec. */
@ -1320,9 +1320,9 @@ dissect_ieee802154_superframe(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
static void
dissect_ieee802154_gtsinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset)
{
proto_tree *field_tree = NULL;
proto_tree *subtree = NULL;
proto_item *ti;
proto_tree *field_tree = NULL;
proto_tree *subtree = NULL;
proto_item *ti;
guint8 gts_spec;
guint8 gts_count;
@ -1410,8 +1410,8 @@ dissect_ieee802154_gtsinfo(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
static void
dissect_ieee802154_pendaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, guint *offset)
{
proto_tree *subtree = NULL;
proto_item *ti;
proto_tree *subtree = NULL;
proto_item *ti;
guint8 pend_spec;
guint8 pend_num16;
guint8 pend_num64;
@ -1457,9 +1457,9 @@ dissect_ieee802154_pendaddr(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
static void
dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
proto_tree *subtree = NULL;
proto_item * ti;
guint8 capability;
proto_tree *subtree = NULL;
proto_item * ti;
guint8 capability;
/* Create a subtree for this command frame. */
if (tree) {
@ -1485,7 +1485,7 @@ dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > 1) {
call_dissector(data_handle, tvb_new_subset(tvb, 1, -1, -1), pinfo, tree);
call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
} /* dissect_ieee802154_assoc_req */
@ -1507,11 +1507,11 @@ dissect_ieee802154_assoc_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
static void
dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
proto_tree *subtree = NULL;
proto_item *ti;
guint16 short_addr;
guint8 status;
guint offset = 0;
proto_tree *subtree = NULL;
proto_item *ti;
guint16 short_addr;
guint8 status;
guint offset = 0;
/* Create a subtree for this command frame. */
if (tree) {
@ -1563,7 +1563,7 @@ dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > offset) {
call_dissector(data_handle, tvb_new_subset(tvb, offset, -1, -1), pinfo, tree);
call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
} /* dissect_ieee802154_assoc_rsp */
@ -1584,9 +1584,9 @@ dissect_ieee802154_assoc_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
static void
dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
proto_tree *subtree = NULL;
proto_item *ti;
guint8 reason;
proto_tree *subtree = NULL;
proto_item *ti;
guint8 reason;
/* Create a subtree for this command frame. */
if (tree) {
@ -1624,7 +1624,7 @@ dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > 1) {
call_dissector(data_handle, tvb_new_subset(tvb, 1, -1, -1), pinfo, tree);
call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
} /* dissect_ieee802154_disassoc */
@ -1646,13 +1646,13 @@ dissect_ieee802154_disassoc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_ieee802154_realign(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
proto_tree *subtree = NULL;
proto_item *ti;
guint16 pan_id;
guint16 coord_addr;
guint8 channel;
guint16 short_addr;
guint offset = 0;
proto_tree *subtree = NULL;
proto_item *ti;
guint16 pan_id;
guint16 coord_addr;
guint8 channel;
guint16 short_addr;
guint offset = 0;
/* Create a subtree for this command frame. */
if (tree) {
@ -1707,7 +1707,7 @@ dissect_ieee802154_realign(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > offset) {
call_dissector(data_handle, tvb_new_subset(tvb, offset, -1, -1), pinfo, tree);
call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo, tree);
}
} /* dissect_ieee802154_realign */
@ -1733,12 +1733,12 @@ dissect_ieee802154_realign(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
static void
dissect_ieee802154_gtsreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, ieee802154_packet *packet)
{
proto_tree *subtree = NULL;
proto_item *ti;
guint8 characteristics;
guint8 length;
guint8 direction;
guint8 type;
proto_tree *subtree = NULL;
proto_item *ti;
guint8 characteristics;
guint8 length;
guint8 direction;
guint8 type;
/* Create a subtree for this command frame. */
if (tree) {
@ -1766,7 +1766,7 @@ dissect_ieee802154_gtsreq(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
/* Call the data dissector for any leftover bytes. */
if (tvb_length(tvb) > 1) {
call_dissector(data_handle, tvb_new_subset(tvb, 1, -1, -1), pinfo, tree);
call_dissector(data_handle, tvb_new_subset_remaining(tvb, 1), pinfo, tree);
}
} /* dissect_ieee802154_gtsreq */
@ -2093,9 +2093,9 @@ static gboolean
ccm_cbc_mac(const gchar *key _U_, const gchar *iv _U_, const gchar *a _U_, gint a_len _U_, const gchar *m _U_, gint m_len _U_, gchar *mic _U_)
{
#ifdef HAVE_LIBGCRYPT
gcry_cipher_hd_t cipher_hd;
guint i = 0;
unsigned char block[16];
gcry_cipher_hd_t cipher_hd;
guint i = 0;
unsigned char block[16];
/* Open the cipher. */
if (gcry_cipher_open(&cipher_hd, GCRY_CIPHER_AES128, GCRY_CIPHER_MODE_CBC, GCRY_CIPHER_CBC_MAC)) return FALSE;
@ -2234,9 +2234,9 @@ gboolean ieee802154_long_addr_equal(gconstpointer a, gconstpointer b)
ieee802154_map_rec *ieee802154_addr_update(ieee802154_map_tab_t *au_ieee802154_map,
guint16 short_addr, guint16 pan, guint64 long_addr, const char *proto, guint fnum)
{
ieee802154_short_addr addr16;
ieee802154_map_rec *p_map_rec;
gpointer old_key;
ieee802154_short_addr addr16;
ieee802154_map_rec *p_map_rec;
gpointer old_key;
/* Look up short address hash */
addr16.pan = pan;
@ -2301,8 +2301,8 @@ ieee802154_map_rec *ieee802154_addr_update(ieee802154_map_tab_t *au_ieee802154_m
*/
gboolean ieee802154_short_addr_invalidate(guint16 short_addr, guint16 pan, guint fnum)
{
ieee802154_short_addr addr16;
ieee802154_map_rec *map_rec;
ieee802154_short_addr addr16;
ieee802154_map_rec *map_rec;
addr16.pan = pan;
addr16.addr = short_addr;
@ -2786,13 +2786,13 @@ void proto_register_ieee802154(void)
*/
void proto_reg_handoff_ieee802154(void)
{
static gboolean prefs_initialized = FALSE;
static gboolean prefs_initialized = FALSE;
static dissector_handle_t ieee802154_handle;
static dissector_handle_t ieee802154_nonask_phy_handle;
static dissector_handle_t ieee802154_nofcs_handle;
static unsigned int old_ieee802154_ethertype;
GByteArray *bytes;
gboolean res;
static unsigned int old_ieee802154_ethertype;
GByteArray *bytes;
gboolean res;
if (!prefs_initialized){
/* Get the dissector handles. */

View File

@ -37,16 +37,16 @@ static dissector_handle_t esp_handle;
static dissector_handle_t isakmp_handle;
/*
* UDP Encapsulation of IPsec Packets
* UDP Encapsulation of IPsec Packets
* draft-ietf-ipsec-udp-encaps-06.txt
*/
static void
dissect_udpencap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
tvbuff_t *next_tvb;
tvbuff_t *next_tvb;
proto_tree *udpencap_tree = NULL;
proto_item *ti = NULL;
guint32 spi;
proto_item *ti = NULL;
guint32 spi;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "UDPENCAP");
col_clear(pinfo->cinfo, COL_INFO);
@ -67,16 +67,16 @@ dissect_udpencap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (spi == 0) {
col_set_str(pinfo->cinfo, COL_INFO, "ISAKMP");
if (tree) {
proto_tree_add_text(udpencap_tree, tvb, 0, sizeof(spi),
"Non-ESP Marker");
proto_item_set_len(ti, sizeof(spi));
proto_tree_add_text(udpencap_tree, tvb, 0, sizeof(spi),
"Non-ESP Marker");
proto_item_set_len(ti, sizeof(spi));
}
next_tvb = tvb_new_subset(tvb, sizeof(spi), -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, sizeof(spi));
call_dissector(isakmp_handle, next_tvb, pinfo, tree);
} else {
col_set_str(pinfo->cinfo, COL_INFO, "ESP");
if (tree)
proto_item_set_len(ti, 0);
proto_item_set_len(ti, 0);
call_dissector(esp_handle, tvb, pinfo, tree);
}
}
@ -90,7 +90,7 @@ proto_register_udpencap(void)
};
proto_udpencap = proto_register_protocol(
"UDP Encapsulation of IPsec Packets", "UDPENCAP", "udpencap");
"UDP Encapsulation of IPsec Packets", "UDPENCAP", "udpencap");
proto_register_subtree_array(ett, array_length(ett));
}

View File

@ -181,7 +181,7 @@ dissect_packetid(tvbuff_t *buffer, int offset, proto_tree *tree)
{
guint32 packetid;
packetid = tvb_get_bits8(buffer, offset * 8 + 16, 8) << 14;
packetid = tvb_get_bits8(buffer, offset * 8 + 16, 8) << 14;
packetid += tvb_get_bits8(buffer, offset * 8 + 8, 8) << 6;
packetid += tvb_get_bits8(buffer, offset * 8, 8) & 63;
if(offset == 0 && tree != NULL)
@ -537,8 +537,8 @@ dissect_knet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *message_ti;
proto_tree *message_tree;
tvbuff_t *next_tvb;
gboolean bytes_left;
tvbuff_t *next_tvb;
gboolean bytes_left;
int offset;
int length;
@ -613,7 +613,7 @@ dissect_knet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(tvb_get_bits8(tvb, 1, 1) == 1) /* If Reliable flag is 1 */
offset += dissect_reliable_message_index_base(tvb, 3, datagram_tree); /* Calculate RMIB */
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
while(bytes_left)
{
@ -637,7 +637,7 @@ dissect_knet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += length; /* Move the offset the amount of the payload */
next_tvb = tvb_new_subset(next_tvb, offset, -1, -1); /* Prepare the next tvb for the next message */
next_tvb = tvb_new_subset_remaining(next_tvb, offset); /* Prepare the next tvb for the next message */
}
else bytes_left = FALSE; /* We dont have any bytes left to process... Hopefully */

View File

@ -82,10 +82,10 @@ static dissector_handle_t data_handle;
static int
dissect_lisp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
gint offset = 0;
guint8 flags;
guint8 ip_ver;
tvbuff_t *next_tvb;
gint offset = 0;
guint8 flags;
guint8 ip_ver;
tvbuff_t *next_tvb;
proto_item *ti;
proto_item *tif;
proto_tree *lisp_data_tree;
@ -180,7 +180,7 @@ dissect_lisp_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Check if there is stuff left in the buffer, and return if not */
/* Determine if encapsulated packet is IPv4 or IPv6, and call dissector */
next_tvb = tvb_new_subset(tvb, LISP_DATA_HEADER_LEN, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, LISP_DATA_HEADER_LEN);
ip_ver = tvb_get_bits8(next_tvb, 0, 4);
switch (ip_ver) {
case 4:

View File

@ -161,12 +161,12 @@ const value_string lisp_typevals[] = {
static int
dissect_lisp_locator(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_mapping_tree)
{
gint offset = 0;
guint8 prio, weight, m_prio, m_weight;
guint16 flags, loc_afi;
guint32 locator_v4;
struct e_in6_addr locator_v6;
tvbuff_t *next_tvb;
gint offset = 0;
guint8 prio, weight, m_prio, m_weight;
guint16 flags, loc_afi;
guint32 locator_v4;
struct e_in6_addr locator_v6;
tvbuff_t *next_tvb;
prio = tvb_get_guint8(tvb, offset); offset += 1;
weight = tvb_get_guint8(tvb, offset); offset += 1;
@ -200,7 +200,7 @@ dissect_lisp_locator(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_mapping
break;
default:
proto_tree_add_text(lisp_mapping_tree, tvb, 0, 2, "Unexpected AFI, cannot decode");
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_mapping_tree);
}
@ -228,18 +228,19 @@ dissect_lisp_locator(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_mapping
static int
dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree, guint8 rec_cnt)
{
int i;
gint offset = 0;
gint mapver_offset = 0;
guint32 ttl;
guint8 loc_cnt;
guint8 prefix_mask, flags, act;
guint16 prefix_afi;
guint32 prefix_v4;
struct e_in6_addr prefix_v6;
proto_item *tir;
proto_tree *lisp_mapping_tree;
tvbuff_t *next_tvb;
int i;
gint offset = 0;
gint mapver_offset = 0;
guint32 ttl;
guint8 loc_cnt;
guint8 prefix_mask, flags, act;
guint16 prefix_afi;
guint32 prefix_v4;
struct e_in6_addr prefix_v6;
proto_item *tir;
proto_tree *lisp_mapping_tree;
tvbuff_t *next_tvb;
const char *lisp_actions[] = {
"No-Action",
"Natively-Forward",
@ -288,7 +289,7 @@ dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree, g
break;
default:
proto_tree_add_text(lisp_tree, tvb, 0, 2, "Unexpected AFI, cannot decode");
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
return offset;
}
@ -306,7 +307,7 @@ dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree, g
tvbuff_t *loc_tvb;
int len = 0;
loc_tvb = tvb_new_subset(tvb, offset, -1, -1);
loc_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_locator(loc_tvb, pinfo, lisp_mapping_tree);
offset += len;
}
@ -347,15 +348,15 @@ dissect_lisp_mapping(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree, g
static void
dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
{
int i;
gint offset = 0;
gboolean mrep = FALSE;
guint8 flags;
guint8 itr_rec_cnt = 0;
guint8 rec_cnt = 0;
guint16 src_eid_afi;
struct e_in6_addr e_in6_addr;
tvbuff_t *next_tvb;
int i;
gint offset = 0;
gboolean mrep = FALSE;
guint8 flags;
guint8 itr_rec_cnt = 0;
guint8 rec_cnt = 0;
guint16 src_eid_afi;
struct e_in6_addr e_in6_addr;
tvbuff_t *next_tvb;
/* Flags (6 bits)*/
flags = tvb_get_guint8(tvb, offset);
@ -408,7 +409,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
default:
proto_tree_add_text(lisp_tree, tvb, offset, 0,
"Unexpected Source EID AFI, cannot decode");
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
return;
}
@ -447,7 +448,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
default:
proto_tree_add_text(lisp_tree, tvb, offset, 2,
"Unexpected ITR-RLOC-AFI, cannot decode");
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
return;
}
@ -510,7 +511,7 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
break;
default:
proto_tree_add_text(lisp_tree, tvb, offset, 2, "Unexpected AFI, cannot decode");
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
return;
}
@ -526,12 +527,12 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
tim = proto_tree_add_text(lisp_tree, tvb, offset, -1, "Map-Reply record");
lisp_mr_tree = proto_item_add_subtree(tim, ett_lisp_mr);
rep_tvb = tvb_new_subset(tvb, offset, -1, -1);
rep_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_mapping(rep_tvb, pinfo, lisp_mr_tree, 0);
offset += len;
}
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
}
@ -568,9 +569,9 @@ dissect_lisp_map_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tre
static void
dissect_lisp_map_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
{
int i;
gint offset = 0;
guint8 rec_cnt = 0;
int i;
gint offset = 0;
guint8 rec_cnt = 0;
tvbuff_t *next_tvb;
/* Flags (2 bits) */
@ -595,12 +596,12 @@ dissect_lisp_map_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
tvbuff_t *rec_tvb;
int len = 0;
rec_tvb = tvb_new_subset(tvb, offset, -1, -1);
rec_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_mapping(rec_tvb, pinfo, lisp_tree, rec_cnt);
offset += len;
}
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
}
@ -641,11 +642,11 @@ dissect_lisp_map_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
static void
dissect_lisp_map_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
{
int i;
gint offset = 0;
guint8 rec_cnt = 0;
int i;
gint offset = 0;
guint8 rec_cnt = 0;
tvbuff_t *next_tvb;
guint16 authlen = 0;
guint16 authlen = 0;
/* Flags (1 bit) */
proto_tree_add_item(lisp_tree, hf_lisp_mreg_flags_pmr, tvb, offset, 3, ENC_BIG_ENDIAN);
@ -684,12 +685,12 @@ dissect_lisp_map_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tr
tvbuff_t *rec_tvb;
int len = 0;
rec_tvb = tvb_new_subset(tvb, offset, -1, -1);
rec_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_mapping(rec_tvb, pinfo, lisp_tree, rec_cnt);
offset += len;
}
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
}
@ -730,11 +731,11 @@ dissect_lisp_map_register(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tr
static void
dissect_lisp_map_notify(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree)
{
int i;
gint offset = 0;
guint8 rec_cnt = 0;
int i;
gint offset = 0;
guint8 rec_cnt = 0;
tvbuff_t *next_tvb;
guint16 authlen = 0;
guint16 authlen = 0;
/* Reserved bits (20 bits) */
proto_tree_add_item(lisp_tree, hf_lisp_mnot_res, tvb, offset, 3, ENC_BIG_ENDIAN);
@ -767,12 +768,12 @@ dissect_lisp_map_notify(tvbuff_t *tvb, packet_info *pinfo, proto_tree *lisp_tree
tvbuff_t *rec_tvb;
int len = 0;
rec_tvb = tvb_new_subset(tvb, offset, -1, -1);
rec_tvb = tvb_new_subset_remaining(tvb, offset);
len = dissect_lisp_mapping(rec_tvb, pinfo, lisp_tree, rec_cnt);
offset += len;
}
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, lisp_tree);
}
@ -793,12 +794,12 @@ static void
dissect_lisp_ecm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *lisp_tree)
{
tvbuff_t *next_tvb;
guint8 ip_ver;
guint8 ip_ver;
proto_tree_add_item(lisp_tree, hf_lisp_ecm_res, tvb, 0, 4, ENC_BIG_ENDIAN);
/* Determine if encapsulated packet is IPv4 or IPv6, and call dissector */
next_tvb = tvb_new_subset(tvb, LISP_ECM_HEADER_LEN, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, LISP_ECM_HEADER_LEN);
ip_ver = tvb_get_bits8(next_tvb, 0, 4);
switch (ip_ver) {

View File

@ -114,10 +114,10 @@ dissect_mactelnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *mactelnet_tree;
proto_item *mactelnet_control_item;
proto_tree *mactelnet_control_tree;
int foundping = -1;
int foundclient = -1;
int foundserver = -1;
guint16 type;
int foundping = -1;
int foundclient = -1;
int foundserver = -1;
guint16 type;
/* Check that there's enough data */
if (tvb_length(tvb) < 18)
@ -216,7 +216,7 @@ dissect_mactelnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (type == 1) {
while(tvb_reported_length_remaining(tvb, offset) > 0) {
if (tvb_reported_length_remaining(tvb, offset) > 4 && tvb_get_ntohl(tvb, offset) == control_packet) {
guint8 datatype;
guint8 datatype;
guint32 datalength;
/* Add subtree for control packet */
@ -268,13 +268,13 @@ dissect_mactelnet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset += datalength;
} else {
/* Data packet, let wireshark handle it */
tvbuff_t *next_client = tvb_new_subset(tvb, offset, -1, -1);
tvbuff_t *next_client = tvb_new_subset_remaining(tvb, offset);
return call_dissector(data_handle, next_client, pinfo, mactelnet_tree);
}
}
} else if (type == 4 || type == 5) {
/* Data packet, let wireshark handle it */
tvbuff_t *next_client = tvb_new_subset(tvb, offset, -1, -1);
tvbuff_t *next_client = tvb_new_subset_remaining(tvb, offset);
return call_dissector(data_handle, next_client, pinfo, mactelnet_tree);
}

View File

@ -403,6 +403,7 @@ get_pid_analysis(guint32 pid, conversation_t *conv)
pid_analysis_data_t *pid_data = NULL;
mp2t_analysis_data_t *mp2t_data = NULL;
mp2t_data = get_mp2t_conversation_data(conv);
pid_data = se_tree_lookup32(mp2t_data->pid_table, pid);
@ -458,10 +459,10 @@ mp2t_get_packet_length(tvbuff_t *tvb, guint offset, packet_info *pinfo,
guint32 frag_id, enum pid_payload_type pload_type)
{
fragment_data *frag = NULL;
tvbuff_t *len_tvb = NULL, *frag_tvb = NULL, *data_tvb = NULL;
gint pkt_len = 0;
guint remaining_len;
fragment_data *frag = NULL;
tvbuff_t *len_tvb = NULL, *frag_tvb = NULL, *data_tvb = NULL;
gint pkt_len = 0;
guint remaining_len;
remaining_len = tvb_length_remaining(tvb, offset);
@ -487,7 +488,7 @@ mp2t_get_packet_length(tvbuff_t *tvb, guint offset, packet_info *pinfo,
len_tvb = tvb_new_composite();
tvb_composite_append(len_tvb, frag_tvb);
data_tvb = tvb_new_subset(tvb, offset, -1, -1);
data_tvb = tvb_new_subset_remaining(tvb, offset);
tvb_composite_append(len_tvb, data_tvb);
tvb_composite_finalize(len_tvb);
@ -528,8 +529,8 @@ mp2t_fragment_handle(tvbuff_t *tvb, guint offset, packet_info *pinfo,
{
/* proto_item *ti; */
fragment_data *frag_msg = NULL;
tvbuff_t *new_tvb = NULL;
gboolean save_fragmented;
tvbuff_t *new_tvb = NULL;
gboolean save_fragmented;
save_fragmented = pinfo->fragmented;
pinfo->fragmented = TRUE;
@ -581,17 +582,17 @@ mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len,
proto_tree *tree, proto_tree *header_tree, guint32 pusi_flag,
pid_analysis_data_t *pid_analysis)
{
tvbuff_t *next_tvb;
guint8 pointer = 0;
proto_item *pi;
guint stuff_len = 0;
proto_item *si;
proto_tree *stuff_tree;
packed_analysis_data_t *pdata = NULL;
subpacket_analysis_data_t *spdata = NULL;
guint32 frag_cur_pos = 0, frag_tot_len = 0;
gboolean fragmentation = FALSE;
guint32 frag_id = 0;
tvbuff_t *next_tvb;
guint8 pointer = 0;
proto_item *pi;
guint stuff_len = 0;
proto_item *si;
proto_tree *stuff_tree;
packed_analysis_data_t *pdata = NULL;
subpacket_analysis_data_t *spdata = NULL;
guint32 frag_cur_pos = 0, frag_tot_len = 0;
gboolean fragmentation = FALSE;
guint32 frag_id = 0;
if (pusi_flag && pid_analysis->pload_type == pid_pload_unknown
&& remaining_len > 3) {
@ -953,16 +954,17 @@ static void
dissect_tsp(tvbuff_t *tvb, volatile gint offset, packet_info *pinfo,
proto_tree *tree, conversation_t *conv)
{
guint32 header;
guint afc;
gint start_offset = offset;
volatile gint payload_len;
guint32 header;
guint afc;
gint start_offset = offset;
volatile gint payload_len;
pid_analysis_data_t *pid_analysis;
guint32 skips;
guint32 pid;
guint32 cc;
guint32 pusi_flag;
guint32 skips;
guint32 pid;
guint32 cc;
guint32 pusi_flag;
/* guint8 pointer; */
proto_item *ti = NULL;
@ -1244,10 +1246,10 @@ dissect_tsp(tvbuff_t *tvb, volatile gint offset, packet_info *pinfo,
static void
dissect_mp2t( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
guint offset = 0;
conversation_t *conv;
conv = find_or_create_conversation(pinfo);
guint offset = 0;
conversation_t *conv;
conv = find_or_create_conversation(pinfo);
for (; tvb_reported_length_remaining(tvb, offset) >= MP2T_PACKET_SIZE; offset += MP2T_PACKET_SIZE) {

View File

@ -796,7 +796,7 @@ getControlChannelValues(tvbuff_t *tvb, proto_tree *field_tree_ctr){
/*Get values information field*/
static void
getFrameInformation(tvbuff_t *tvb, proto_tree *field_tree){
char information_field_content[52];
char information_field_content[52];
char *information_field, *save_information_field_ptr;
/*Get the data from information field as string*/
@ -843,8 +843,8 @@ getFrameInformation(tvbuff_t *tvb, proto_tree *field_tree){
static void
dissect_mux27010(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti = NULL;
proto_item *tf = NULL, *tf_extended_header, *tf_addr, *tf_ctr;
proto_item *ti = NULL;
proto_item *tf = NULL, *tf_extended_header, *tf_addr, *tf_ctr;
proto_tree *mux27010_tree = NULL;
proto_tree *field_tree, *field_tree_extended_header, *field_tree_addr, *field_tree_ctr;
@ -1045,11 +1045,11 @@ dissect_mux27010(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
msg_flag = tvb_get_guint8(tvb, tmpOffset); tmpOffset += 1;
if (msg_end <= msg_start) {
proto_item *pi;
proto_item *pi;
pi = proto_tree_add_text(field_tree, tvb, tmpOffset-3, 2,
"Message start and end are illogical, aborting dissection");
expert_add_info_format(pinfo, pi, PI_MALFORMED, PI_ERROR,
"Message start and end are illogical");
"Message start and end are illogical");
continue;
}
@ -1079,7 +1079,7 @@ dissect_mux27010(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
if (new_tvb) { /* take it all */
next_tvb2 = tvb_new_subset(new_tvb, 1, -1, -1);
next_tvb2 = tvb_new_subset_remaining(new_tvb, 1);
call_dissector(ppp_handle, next_tvb2, pinfo, tree);
}

View File

@ -1,6 +1,6 @@
/*
* packet-netmon-802_11.c
* Decode packets with a Network Monitor 802.11 radio header
* Decode packets with a Network Monitor 802.11 radio header
*
* $Id$
*
@ -28,26 +28,25 @@
#endif
#include <glib.h>
#include <string.h>
#include <epan/packet.h>
/* protocol */
static int proto_netmon_802_11 = -1;
#define MIN_HEADER_LEN 32
#define MIN_HEADER_LEN 32
/* op_mode */
#define OP_MODE_STA 0x00000001 /* station mode */
#define OP_MODE_AP 0x00000002 /* AP mode */
#define OP_MODE_STA_EXT 0x00000004 /* extensible station mode */
#define OP_MODE_MON 0x80000000 /* monitor mode */
#define OP_MODE_STA 0x00000001 /* station mode */
#define OP_MODE_AP 0x00000002 /* AP mode */
#define OP_MODE_STA_EXT 0x00000004 /* extensible station mode */
#define OP_MODE_MON 0x80000000 /* monitor mode */
/* phy_type */
#define PHY_TYPE_11A 4
#define PHY_TYPE_11B 5
#define PHY_TYPE_11G 6
#define PHY_TYPE_11N 7
#define PHY_TYPE_11A 4
#define PHY_TYPE_11B 5
#define PHY_TYPE_11G 6
#define PHY_TYPE_11N 7
static int hf_netmon_802_11_version = -1;
static int hf_netmon_802_11_length = -1;
@ -74,14 +73,14 @@ dissect_netmon_802_11(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *wlan_tree, *opmode_tree;
proto_item *ti;
tvbuff_t *next_tvb;
int offset;
guint8 version;
guint16 length;
guint32 flags;
guint32 channel;
gint32 rssi;
guint8 rate;
tvbuff_t *next_tvb;
int offset;
guint8 version;
guint16 length;
guint32 flags;
guint32 channel;
gint32 rssi;
guint8 rate;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "WLAN");
col_clear(pinfo->cinfo, COL_INFO);
@ -169,7 +168,7 @@ skip:
offset = length;
/* dissect the 802.11 header next */
next_tvb = tvb_new_subset(tvb, offset, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(ieee80211_handle, next_tvb, pinfo, tree);
return offset;
}
@ -187,37 +186,37 @@ proto_register_netmon_802_11(void)
static hf_register_info hf[] = {
{ &hf_netmon_802_11_version, { "Header revision", "netmon_802_11.version", FT_UINT8,
BASE_DEC, NULL, 0x0, NULL, HFILL } },
BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_length, { "Header length", "netmon_802_11.length", FT_UINT16,
BASE_DEC, NULL, 0x0, NULL, HFILL } },
BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode, { "Operation mode", "netmon_802_11.op_mode", FT_UINT32,
BASE_HEX, NULL, 0x0, NULL, HFILL } },
BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode_sta, { "Station mode", "netmon_802_11.op_mode.sta", FT_UINT32,
BASE_HEX, NULL, OP_MODE_STA, NULL, HFILL } },
BASE_HEX, NULL, OP_MODE_STA, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode_ap, { "AP mode", "netmon_802_11.op_mode.ap", FT_UINT32,
BASE_HEX, NULL, OP_MODE_AP, NULL, HFILL } },
BASE_HEX, NULL, OP_MODE_AP, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode_sta_ext, { "Extensible station mode", "netmon_802_11.op_mode.sta_ext", FT_UINT32,
BASE_HEX, NULL, OP_MODE_STA_EXT, NULL, HFILL } },
BASE_HEX, NULL, OP_MODE_STA_EXT, NULL, HFILL } },
{ &hf_netmon_802_11_op_mode_mon, { "Monitor mode", "netmon_802_11.op_mode.on", FT_UINT32,
BASE_HEX, NULL, OP_MODE_MON, NULL, HFILL } },
BASE_HEX, NULL, OP_MODE_MON, NULL, HFILL } },
{ &hf_netmon_802_11_flags, { "Flags", "netmon_802_11.flags", FT_UINT32,
BASE_HEX, NULL, 0x0, NULL, HFILL } },
BASE_HEX, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_phy_type, { "PHY type", "netmon_802_11.phy_type", FT_UINT32,
BASE_DEC, VALS(phy_type), 0x0, NULL, HFILL } },
BASE_DEC, VALS(phy_type), 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_channel, { "Channel", "netmon_802_11.channel", FT_UINT32,
BASE_DEC, NULL, 0x0, NULL, HFILL } },
BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_frequency, { "Center frequency", "netmon_802_11.frequency", FT_UINT32,
BASE_DEC, NULL, 0x0, NULL, HFILL } },
BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_rssi, { "RSSI", "netmon_802_11.rssi", FT_INT32,
BASE_DEC, NULL, 0x0, NULL, HFILL } },
BASE_DEC, NULL, 0x0, NULL, HFILL } },
{ &hf_netmon_802_11_datarate, { "Data rate", "netmon_802_11.datarate", FT_UINT32,
BASE_DEC, NULL, 0x0, NULL, HFILL } },
BASE_DEC, NULL, 0x0, NULL, HFILL } },
/*
* XXX - is this host, or MAC, time stamp?
* It might be a FILETIME.
*/
{ &hf_netmon_802_11_timestamp, { "Timestamp", "netmon_802_11.timestamp", FT_UINT64,
BASE_DEC, NULL, 0x0, NULL, HFILL } },
BASE_DEC, NULL, 0x0, NULL, HFILL } },
};
static gint *ett[] = {
&ett_netmon_802_11,

View File

@ -30,8 +30,8 @@
#endif
#include <glib.h>
#include <epan/prefs.h>
#include <epan/packet.h>
#include <epan/prefs.h>
#include <epan/emem.h>
#include "packet-ppp.h"
#include <epan/ppptypes.h>
@ -1665,11 +1665,11 @@ fcs32(tvbuff_t * tvbuff)
tvbuff_t *
decode_fcs(tvbuff_t *tvb, proto_tree *fh_tree, int fcs_decode, int proto_offset)
{
tvbuff_t *next_tvb;
gint len, reported_len;
int rx_fcs_offset;
guint32 rx_fcs_exp;
guint32 rx_fcs_got;
tvbuff_t *next_tvb;
gint len, reported_len;
int rx_fcs_offset;
guint32 rx_fcs_exp;
guint32 rx_fcs_got;
/*
* Remove the FCS, if any, from the packet data.
@ -1837,16 +1837,17 @@ dissect_lcp_async_map_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint length, packet_info *pinfo _U_,
proto_tree *tree)
{
guint32 map;
guint32 map;
const char *mapstr;
static const char *ctrlchars[32] = {
"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
"BS", "HT", "NL", "VT", "NP (FF)", "CR", "SO", "SI",
"DLE", "DC1 (XON)", "DC2", "DC3 (XOFF)", "DC4", "NAK", "SYN", "ETB",
"CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US"
};
gint returned_length, str_index;
int i;
gint returned_length, str_index;
int i;
/*
* XXX - walk through the map and show the characters to map?
@ -1882,7 +1883,7 @@ dissect_lcp_protocol_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint length, packet_info *pinfo _U_,
proto_tree *tree)
{
guint16 protocol;
guint16 protocol;
proto_item *tf;
proto_tree *field_tree = NULL;
@ -1906,8 +1907,8 @@ dissect_lcp_authprot_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
guint length, packet_info *pinfo _U_,
proto_tree *tree)
{
guint16 protocol;
guint8 algorithm;
guint16 protocol;
guint8 algorithm;
proto_item *tf;
proto_tree *field_tree = NULL;
@ -1952,7 +1953,7 @@ dissect_lcp_fcs_alternatives_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree = NULL;
guint8 alternatives;
guint8 alternatives;
alternatives = tvb_get_guint8(tvb, offset + 2);
tf = proto_tree_add_text(tree, tvb, offset, length, "%s: 0x%02x",
@ -2019,7 +2020,7 @@ dissect_lcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
{
proto_item *tf;
proto_tree *field_tree = NULL;
guint8 operation;
guint8 operation;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s: %u byte%s",
optp->name, length, plurality(length, "", "s"));
@ -2070,7 +2071,7 @@ dissect_lcp_multilink_ep_disc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree = NULL;
guint8 ep_disc_class;
guint8 ep_disc_class;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s: %u byte%s",
optp->name, length, plurality(length, "", "s"));
@ -2183,7 +2184,7 @@ dissect_lcp_internationalization_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree = NULL;
guint32 charset;
guint32 charset;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s: %u byte%s",
optp->name, length, plurality(length, "", "s"));
@ -2240,8 +2241,8 @@ dissect_ipcp_compress_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
int offset, guint length, packet_info *pinfo _U_,
proto_tree *tree)
{
guint8 ub;
guint16 us;
guint8 ub;
guint16 us;
proto_item *tf;
proto_tree *field_tree = NULL;
@ -2368,7 +2369,7 @@ dissect_ipcp_iphc_disableprot_opt(const ip_tcp_opt *optp,
{
proto_item *tf;
proto_tree *field_tree;
guint8 param;
guint8 param;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@ -2388,7 +2389,7 @@ dissect_osicp_align_npdu_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
guint8 alignment;
guint8 alignment;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@ -2416,7 +2417,7 @@ dissect_ccp_stac_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
guint8 check_mode;
guint8 check_mode;
if (length == 6) {
proto_tree_add_text(tree, tvb, offset, length,
@ -2444,7 +2445,7 @@ dissect_ccp_mppc_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *flags_tree;
guint32 supported_bits;
guint32 supported_bits;
supported_bits = tvb_get_ntohl(tvb, offset + 2);
tf = proto_tree_add_text(tree, tvb, offset, length,
@ -2495,8 +2496,8 @@ dissect_ccp_lzsdcp_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
guint8 check_mode;
guint8 process_mode;
guint8 check_mode;
guint8 process_mode;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@ -2544,7 +2545,7 @@ dissect_ccp_deflate_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
guint8 method;
guint8 method;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@ -2576,8 +2577,8 @@ dissect_cbcp_callback_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
proto_item *tf;
proto_tree *field_tree;
proto_tree *addr_tree;
guint8 addr_type;
guint addr_len;
guint8 addr_type;
guint addr_len;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@ -2633,7 +2634,7 @@ dissect_bap_link_type_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
guint8 link_type;
guint8 link_type;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@ -2656,8 +2657,8 @@ dissect_bap_phone_delta_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
proto_tree *field_tree;
proto_item *ti;
proto_tree *suboption_tree;
guint8 subopt_type;
guint8 subopt_len;
guint8 subopt_type;
guint8 subopt_len;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@ -2769,7 +2770,7 @@ dissect_bap_call_status_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{
proto_item *tf;
proto_tree *field_tree;
guint8 status, action;
guint8 status, action;
tf = proto_tree_add_text(tree, tvb, offset, length, "%s", optp->name);
field_tree = proto_item_add_subtree(tf, *optp->subtree_index);
@ -3027,10 +3028,10 @@ dissect_vsncp_pco_opt(const ip_tcp_opt *optp, tvbuff_t *tvb,
{0x000A, "IP address allocation via NAS signalling" },
{0, NULL }
};
int off = offset+3;
guint8 i = 0;
int off = offset+3;
guint8 i = 0;
guint16 pcotype;
guint8 len;
guint8 len;
proto_item *tf;
proto_tree *field_tree;
@ -3066,13 +3067,13 @@ dissect_cp( tvbuff_t *tvb, int proto_id, int proto_subtree_index,
proto_item *tf;
proto_tree *field_tree;
guint8 code;
guint8 id;
int length, offset;
guint8 code;
guint8 id;
int length, offset;
guint16 protocol;
code = tvb_get_guint8(tvb, 0);
id = tvb_get_guint8(tvb, 1);
code = tvb_get_guint8(tvb, 0);
id = tvb_get_guint8(tvb, 1);
length = tvb_get_ntohs(tvb, 2);
if(check_col(pinfo->cinfo, COL_PROTOCOL))
@ -3351,7 +3352,7 @@ dissect_vsnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *vsnp_item = NULL;
proto_tree *vsnp_tree = NULL;
guint32 offset = 0;
guint32 offset = 0;
/* To pass it on to IP */
tvbuff_t *next_tvb;
@ -3368,7 +3369,7 @@ dissect_vsnp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_item(vsnp_tree, hf_vsnp_pdnid, tvb, offset, 1, ENC_BIG_ENDIAN);
}
next_tvb = tvb_new_subset(tvb, 1, -1, -1);
next_tvb = tvb_new_subset_remaining(tvb, 1);
/* do lookup with the subdissector table */
if (!dissector_try_uint(ppp_subdissector_table, PPP_IP, next_tvb, pinfo, tree))
@ -3652,15 +3653,15 @@ dissect_pppmuxcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
dissect_pppmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *mux_tree, *hdr_tree, *sub_tree, *flag_tree;
proto_tree *info_tree;
proto_item *ti = NULL,*sub_ti = NULL;
guint8 flags, byte;
guint16 length;
static guint16 pid;
tvbuff_t *next_tvb;
int offset = 0, length_remaining;
int length_field = 0, pid_field = 0,hdr_length = 0;
proto_tree *mux_tree, *hdr_tree, *sub_tree, *flag_tree;
proto_tree *info_tree;
proto_item *ti = NULL,*sub_ti = NULL;
guint8 flags, byte;
guint16 length;
static guint16 pid;
tvbuff_t *next_tvb;
int offset = 0, length_remaining;
int length_field = 0, pid_field = 0,hdr_length = 0;
col_set_str(pinfo->cinfo,COL_PROTOCOL, "PPP PPPMux");
@ -3782,18 +3783,18 @@ dissect_iphc_crtp_fh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *fh_tree, *info_tree;
proto_item *ti = NULL;
guint ip_hdr_len, flags;
guint length;
guint hdr_len;
guint ip_hdr_len, flags;
guint length;
guint hdr_len;
tvbuff_t *next_tvb;
int offset_seq;
int offset_cid;
int offset_seq;
int offset_cid;
guint8 ip_version;
guint8 next_protocol;
guint8 ip_version;
guint8 next_protocol;
guchar* ip_packet;
guchar *ip_packet;
length = tvb_reported_length(tvb);
@ -3889,10 +3890,10 @@ static void
dissect_iphc_crtp_cudp16(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *cudp_tree;
proto_item *ti = NULL;
guint length;
guint hdr_length;
int offset = 0;
proto_item *ti = NULL;
guint length;
guint hdr_length;
int offset = 0;
col_set_str(pinfo->cinfo,COL_PROTOCOL, "CRTP");
@ -3924,10 +3925,10 @@ static void
dissect_iphc_crtp_cudp8(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *cudp_tree;
proto_item *ti = NULL;
guint length;
guint hdr_length;
int offset = 0;
proto_item *ti = NULL;
guint length;
guint hdr_length;
int offset = 0;
col_set_str(pinfo->cinfo,COL_PROTOCOL, "CRTP");
@ -3960,10 +3961,10 @@ static void
dissect_iphc_crtp_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *cs_tree;
proto_item *ti = NULL;
guint8 flags, cnt;
guint length, cid_size;
guint offset = 2, hf;
proto_item *ti = NULL;
guint8 flags, cnt;
guint length, cid_size;
guint offset = 2, hf;
col_set_str(pinfo->cinfo,COL_PROTOCOL, "CRTP");
@ -4109,7 +4110,7 @@ dissect_mp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
*/
static void
dissect_ppp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
proto_item *ti = NULL;
proto_item *ti = NULL;
proto_tree *fh_tree = NULL;
if(tree) {
@ -4123,11 +4124,11 @@ dissect_ppp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
static void
dissect_ppp_hdlc_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_item *ti = NULL;
proto_item *ti = NULL;
proto_tree *fh_tree = NULL;
guint8 byte0;
int proto_offset;
tvbuff_t *next_tvb;
guint8 byte0;
int proto_offset;
tvbuff_t *next_tvb;
byte0 = tvb_get_guint8(tvb, 0);
@ -4252,7 +4253,7 @@ dissect_ppp_raw_hdlc( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
gint offset, end_offset, data_offset;
int length, data_length;
tvbuff_t *ppp_tvb;
gboolean first = TRUE;
gboolean first = TRUE;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP");
@ -4457,10 +4458,10 @@ dissect_pap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
proto_item *ti, *data_ti;
proto_tree *fh_tree, *data_tree = NULL;
guint8 code;
gchar *peer_id, *password, *message;
guint8 peer_id_length, password_length, message_length;
int offset=0;
guint8 code;
gchar *peer_id, *password, *message;
guint8 peer_id_length, password_length, message_length;
int offset = 0;
code = tvb_get_guint8(tvb, 0);
@ -4539,9 +4540,9 @@ dissect_chap( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) {
proto_item *tf;
proto_tree *field_tree;
guint8 code, value_size;
guint8 code, value_size;
guint32 length;
int offset;
int offset;
code = tvb_get_guint8(tvb, 0);
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PPP CHAP");
@ -5021,7 +5022,7 @@ void
proto_reg_handoff_bcp(void)
{
dissector_handle_t bcp_handle;
eth_withfcs_handle = find_dissector("eth_withfcs");
eth_withfcs_handle = find_dissector("eth_withfcs");
eth_withoutfcs_handle = find_dissector("eth_withoutfcs");
bcp_handle = create_dissector_handle(dissect_bcp, proto_bcp);

View File

@ -193,8 +193,8 @@ dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_item *proto_root;
proto_tree *scop_tree;
guint offset = 0;
scop_packet packet;
guint offset = 0;
scop_packet packet;
memset(&packet, 0, sizeof(packet));
@ -245,16 +245,16 @@ dissect_scop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Call the appropriate helper routine to dissect based on the service type. */
switch (packet.service) {
case SCOP_SERVICE_SCOP:
dissect_scop_zip(tvb_new_subset(next_tvb, offset, -1, -1), pinfo, scop_tree);
dissect_scop_zip(tvb_new_subset_remaining(next_tvb, offset), pinfo, scop_tree);
break;
case SCOP_SERVICE_BRIDGE:
dissect_scop_bridge(tvb_new_subset(next_tvb, offset, -1, -1), pinfo, scop_tree);
dissect_scop_bridge(tvb_new_subset_remaining(next_tvb, offset), pinfo, scop_tree);
break;
case SCOP_SERVICE_GATEWAY:
/* Nothing yet defined for the gateway. Fall-Through. */
default:
/* Unknown Service Type. */
call_dissector(data_handle, tvb_new_subset(next_tvb, offset, -1, -1), pinfo, tree);
call_dissector(data_handle, tvb_new_subset_remaining(next_tvb, offset), pinfo, tree);
break;
}
} /* dissect_scop() */
@ -293,7 +293,7 @@ dissect_scop_zip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* If there are any bytes left over, pass them to the data dissector. */
if (offset < tvb_length(tvb)) {
tvbuff_t *payload_tvb = tvb_new_subset(tvb, offset, -1, -1);
tvbuff_t *payload_tvb = tvb_new_subset_remaining(tvb, offset);
proto_tree *root = proto_tree_get_root(tree);
call_dissector(data_handle, payload_tvb, pinfo, root);
}

View File

@ -113,7 +113,7 @@ dissect_tdmoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* The rest is SAMPLES * CHANNELS bytes of channel data */
next_client = tvb_new_subset(tvb, offset, -1, -1);
next_client = tvb_new_subset_remaining(tvb, offset);
return call_dissector(data_handle, next_client, pinfo, tdmoe_tree);
}

View File

@ -151,7 +151,7 @@ static
int check_for_old_linux_tvb(tvbuff_t *tvb)
{
const guint8 *data;
int x, bytes;
int x, bytes;
/* Restrict our looping to the boundaries of the frame */
bytes = tvb_length(tvb);
@ -324,7 +324,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *tr_tree, *bf_tree;
proto_item *ti, *hidden_item;
guint8 rcf1, rcf2;
guint8 rcf1, rcf2;
tvbuff_t *next_tvb;
volatile int frame_type;
@ -364,7 +364,7 @@ dissect_tr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (x != 0) {
/* Actually packet starts x bytes into what we have got but with all
source routing compressed. See comment above */
tr_tvb = tvb_new_subset((tvbuff_t*) tvb, x, -1, -1);
tr_tvb = tvb_new_subset_remaining((tvbuff_t*) tvb, x);
}
else {
tr_tvb = tvb;
@ -590,9 +590,9 @@ static void
add_ring_bridge_pairs(int rcf_len, tvbuff_t *tvb, proto_tree *tree)
{
proto_item *hidden_item;
int j, size;
int segment, brdgnmb, unprocessed_rif;
int buff_offset=0;
int j, size;
int segment, brdgnmb, unprocessed_rif;
int buff_offset=0;
#define RIF_OFFSET 16
#define RIF_BYTES_TO_PROCESS 30

View File

@ -52,18 +52,18 @@ static int hf_trill_options= -1 ;
static dissector_handle_t eth_dissector ;
#define TRILL_VERSION_MASK 0xC000
#define TRILL_RESERVED_MASK 0x3000
#define TRILL_VERSION_MASK 0xC000
#define TRILL_RESERVED_MASK 0x3000
#define TRILL_MULTI_DST_MASK 0x0800
#define TRILL_OP_LEN_MASK 0x07C0
#define TRILL_HOP_CNT_MASK 0x003F
#define TRILL_OP_LEN_MASK 0x07C0
#define TRILL_HOP_CNT_MASK 0x003F
#define TRILL_PROTO_COL_NAME "TRILL"
#define TRILL_PROTO_COL_INFO "TRILL Encapsulated Frame"
#define TRILL_MIN_FRAME_LENGTH 6
#define TRILL_BIT_FIELDS_LEN 2
#define TRILL_NICKNAME_LEN 2
#define TRILL_MIN_FRAME_LENGTH 6
#define TRILL_BIT_FIELDS_LEN 2
#define TRILL_NICKNAME_LEN 2
#define TRILL_OP_LENGTH_BYTE_UNITS 0x4
static const true_false_string multi_dst_strings = {
@ -97,9 +97,9 @@ dissect_trill( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
{
proto_item *ti ;
proto_tree *trill_tree ;
guint32 op_len ;
tvbuff_t *next_tvb ;
int offset = 0 ;
guint32 op_len ;
tvbuff_t *next_tvb ;
int offset = 0 ;
col_set_str( pinfo->cinfo, COL_PROTOCOL, TRILL_PROTO_COL_NAME ) ;
col_set_str( pinfo->cinfo, COL_INFO, TRILL_PROTO_COL_INFO ) ;
@ -140,7 +140,7 @@ dissect_trill( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
}
/* call the eth dissector */
next_tvb = tvb_new_subset( tvb, TRILL_MIN_FRAME_LENGTH + op_len , -1, -1 ) ;
next_tvb = tvb_new_subset_remaining( tvb, TRILL_MIN_FRAME_LENGTH + op_len ) ;
call_dissector( eth_dissector, next_tvb, pinfo, tree ) ;
return tvb_length( tvb ) ;