forked from osmocom/wireshark
Fix some gcc 4.6 "set but not used [-Wunused-but-set-variable]" warnings;
Also: misc minor cleanup: unneeded #include; whitespace, tvb_length-->tvb_reported_length svn path=/trunk/; revision=37757
This commit is contained in:
parent
d201977d9c
commit
fb54240c34
|
@ -1283,12 +1283,6 @@ netlogon_dissect_GENERIC_INFO(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *tree,
|
||||
guint8 *drep)
|
||||
{
|
||||
dcerpc_info *di;
|
||||
dcerpc_call_value *dcv;
|
||||
|
||||
di=pinfo->private_data;
|
||||
dcv = (dcerpc_call_value *)di->call_data;
|
||||
|
||||
offset = netlogon_dissect_LOGON_IDENTITY_INFO(tvb, offset,
|
||||
pinfo, tree, drep);
|
||||
|
||||
|
@ -2504,7 +2498,6 @@ netlogon_dissect_netrserverreqchallenge_rqst(tvbuff_t *tvb, int offset,
|
|||
packet_info *pinfo, proto_tree *tree, guint8 *drep)
|
||||
{
|
||||
/*int oldoffset = offset;*/
|
||||
size_t txt_len = 0;
|
||||
netlogon_auth_vars *vars;
|
||||
netlogon_auth_vars *existing_vars;
|
||||
netlogon_auth_key *key = se_alloc(sizeof(netlogon_auth_key));
|
||||
|
@ -2523,10 +2516,9 @@ netlogon_dissect_netrserverreqchallenge_rqst(tvbuff_t *tvb, int offset,
|
|||
cb_wstr_postprocess,
|
||||
GINT_TO_POINTER(CB_STR_COL_INFO |CB_STR_SAVE | 1));
|
||||
|
||||
txt_len = strlen(dcv->private_data);
|
||||
debugprintf("1)Len %d offset %d txt %s\n",txt_len,offset,(char*)dcv->private_data);
|
||||
debugprintf("1)Len %d offset %d txt %s\n",strlen(dcv->private_data),offset,(char*)dcv->private_data);
|
||||
vars->client_name = se_strdup(dcv->private_data);
|
||||
debugprintf("2)Len %d offset %d txt %s\n",txt_len,offset,vars->client_name);
|
||||
debugprintf("2)Len %d offset %d txt %s\n",strlen(dcv->private_data),offset,vars->client_name);
|
||||
|
||||
offset = dissect_dcerpc_8bytes(tvb, offset, pinfo, tree, drep,
|
||||
hf_client_challenge,&vars->client_challenge);
|
||||
|
@ -2555,28 +2547,28 @@ netlogon_dissect_netrserverreqchallenge_rqst(tvbuff_t *tvb, int offset,
|
|||
}
|
||||
}
|
||||
/* used by other rpc that use schannel ie lsa */
|
||||
/*
|
||||
generate_hash_key(pinfo,0,key,vars->client_name);
|
||||
existing_vars = NULL;
|
||||
existing_vars = g_hash_table_lookup(schannel_auths, key);
|
||||
if (!existing_vars)
|
||||
{
|
||||
g_hash_table_insert(schannel_auths, key, vars);
|
||||
}
|
||||
else
|
||||
{
|
||||
while(existing_vars->next != NULL && existing_vars->start <= vars->start) {
|
||||
existing_vars = existing_vars->next;
|
||||
}
|
||||
if(existing_vars->next != NULL || existing_vars == vars) {
|
||||
debugprintf("It seems that I already record this vars (schannel hash)%d\n",vars->start);
|
||||
}
|
||||
else {
|
||||
existing_vars->next_start = pinfo->fd->num;
|
||||
existing_vars->next = vars;
|
||||
}
|
||||
}
|
||||
*/
|
||||
#if 0
|
||||
generate_hash_key(pinfo,0,key,vars->client_name);
|
||||
existing_vars = NULL;
|
||||
existing_vars = g_hash_table_lookup(schannel_auths, key);
|
||||
if (!existing_vars)
|
||||
{
|
||||
g_hash_table_insert(schannel_auths, key, vars);
|
||||
}
|
||||
else
|
||||
{
|
||||
while(existing_vars->next != NULL && existing_vars->start <= vars->start) {
|
||||
existing_vars = existing_vars->next;
|
||||
}
|
||||
if(existing_vars->next != NULL || existing_vars == vars) {
|
||||
debugprintf("It seems that I already record this vars (schannel hash)%d\n",vars->start);
|
||||
}
|
||||
else {
|
||||
existing_vars->next_start = pinfo->fd->num;
|
||||
existing_vars->next = vars;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return offset;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <gmodule.h>
|
||||
#include <epan/packet.h>
|
||||
#include <epan/reassemble.h>
|
||||
#include <epan/crcdrm.h>
|
||||
|
@ -247,7 +246,7 @@ gboolean rs_correct_data(guint8 *deinterleaved, guint8 *output,
|
|||
|
||||
static tvbuff_t *
|
||||
dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
||||
guint32 findex,
|
||||
guint32 findex _U_,
|
||||
guint32 fcount,
|
||||
guint16 seq,
|
||||
gint offset,
|
||||
|
@ -261,7 +260,6 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|||
guint16 decoded_size;
|
||||
guint32 c_max;
|
||||
guint32 rx_min;
|
||||
gboolean first, last;
|
||||
tvbuff_t *new_tvb=NULL;
|
||||
|
||||
if (fcount > MAX_FRAGMENTS) {
|
||||
|
@ -270,8 +268,6 @@ dissect_pft_fec_detailed(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
first = findex == 0;
|
||||
last = fcount == (findex+1);
|
||||
decoded_size = fcount*plen;
|
||||
c_max = fcount*plen/(rsk+PFT_RS_P); /* rounded down */
|
||||
rx_min = c_max*rsk/plen;
|
||||
|
@ -442,7 +438,7 @@ dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
{
|
||||
guint16 plen;
|
||||
gint offset = 0;
|
||||
guint16 seq, payload_len, hcrc;
|
||||
guint16 seq, payload_len;
|
||||
guint32 findex, fcount;
|
||||
proto_tree *pft_tree = NULL;
|
||||
proto_item *ti = NULL, *li = NULL;
|
||||
|
@ -510,7 +506,6 @@ dissect_pft(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
|
|||
proto_item_append_text(ci, " (%s)", (c==0xe2f0)?"Ok":"bad");
|
||||
proto_tree_add_boolean(pft_tree, hf_edcp_hcrc_ok, tvb, offset, 2, c==0xe2f0);
|
||||
}
|
||||
hcrc = tvb_get_ntohs (tvb, offset);
|
||||
offset += 2;
|
||||
if (fcount > 1) { /* fragmented*/
|
||||
gboolean save_fragmented = pinfo->fragmented;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for FLIP packet dissection
|
||||
*
|
||||
* Copyright 2009, Juha Siltanen <juha.siltanen@nsn.com>
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Wireshark - Network traffic analyzer
|
||||
|
@ -162,7 +162,7 @@ dissect_flip_chksum_hdr(tvbuff_t *tvb,
|
|||
|
||||
gint bytes_dissected;
|
||||
gint offset;
|
||||
|
||||
|
||||
item = NULL;
|
||||
chksum_hdr_tree = NULL;
|
||||
|
||||
|
@ -174,7 +174,7 @@ dissect_flip_chksum_hdr(tvbuff_t *tvb,
|
|||
chksum_hdr_spare = (guint8) ((dw & 0x00FE0000) >> 17);
|
||||
chksum_hdr_ext = (guint8) ((dw & 0x00010000) >> 16);
|
||||
chksum_hdr_chksum = (guint16) (dw & 0x0000FFFF);
|
||||
|
||||
|
||||
/* The actually shouldn't be any headers after checksum. */
|
||||
if (chksum_hdr_ext == 1) {
|
||||
*ext_hdr_follows_ptr = TRUE;
|
||||
|
@ -182,12 +182,12 @@ dissect_flip_chksum_hdr(tvbuff_t *tvb,
|
|||
else {
|
||||
*ext_hdr_follows_ptr = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (tree) {
|
||||
item = proto_tree_add_text(tree, tvb,
|
||||
offset + 0, 4, "Checksum Header");
|
||||
chksum_hdr_tree = proto_item_add_subtree(item, ett_flip_chksum);
|
||||
|
||||
|
||||
/* ETYPE: 8 bits */
|
||||
proto_tree_add_uint_format_value(chksum_hdr_tree, hf_flip_chksum_etype,
|
||||
tvb, offset + 0, 1, dw,
|
||||
|
@ -227,9 +227,9 @@ dissect_flip_chksum_hdr(tvbuff_t *tvb,
|
|||
"Correct" : "Incorrect"),
|
||||
computed_chksum);
|
||||
}
|
||||
|
||||
|
||||
bytes_dissected += FLIP_CHKSUM_HDR_LEN;
|
||||
|
||||
|
||||
return bytes_dissected;
|
||||
|
||||
} /* dissect_flip_chksum_hdr() */
|
||||
|
@ -237,7 +237,7 @@ dissect_flip_chksum_hdr(tvbuff_t *tvb,
|
|||
|
||||
/* Detection logic grabbed from packet-rtp.c and modified. */
|
||||
|
||||
#define RTP_VERSION(octet) ((octet) >> 6)
|
||||
#define RTP_VERSION(octet) ((octet) >> 6)
|
||||
#define RTP_MARKER(octet) ((octet) & 0x80)
|
||||
#define RTP_PAYLOAD_TYPE(octet) ((octet) & 0x7F)
|
||||
|
||||
|
@ -251,7 +251,7 @@ is_payload_rtp(tvbuff_t *tvb)
|
|||
unsigned int payload_type;
|
||||
unsigned int offset;
|
||||
gint len_remaining;
|
||||
|
||||
|
||||
offset = 0;
|
||||
|
||||
len_remaining = tvb_length_remaining(tvb, offset);
|
||||
|
@ -281,7 +281,7 @@ is_payload_rtp(tvbuff_t *tvb)
|
|||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
||||
} /* is_payload_rtp() */
|
||||
|
||||
|
||||
|
@ -297,9 +297,9 @@ is_payload_rtp(tvbuff_t *tvb)
|
|||
static gboolean
|
||||
is_payload_rtcp(tvbuff_t *tvb)
|
||||
{
|
||||
unsigned int first_byte;
|
||||
unsigned int packet_type;
|
||||
unsigned int offset;
|
||||
unsigned int first_byte;
|
||||
unsigned int packet_type;
|
||||
unsigned int offset;
|
||||
gint len_remaining;
|
||||
|
||||
offset = 0;
|
||||
|
@ -308,31 +308,31 @@ is_payload_rtcp(tvbuff_t *tvb)
|
|||
if (len_remaining < RTCP_V2_HEADER_MIN_LEN) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Look at first byte */
|
||||
first_byte = tvb_get_guint8(tvb, offset);
|
||||
first_byte = tvb_get_guint8(tvb, offset);
|
||||
|
||||
/* Are version bits set to 2? */
|
||||
if (((first_byte & 0xC0) >> 6) != 2) {
|
||||
return FALSE;
|
||||
}
|
||||
/* Are version bits set to 2? */
|
||||
if (((first_byte & 0xC0) >> 6) != 2) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Look at packet type */
|
||||
packet_type = tvb_get_guint8(tvb, offset + 1);
|
||||
/* Look at packet type */
|
||||
packet_type = tvb_get_guint8(tvb, offset + 1);
|
||||
|
||||
/* First packet within compound packet is supposed to be a sender
|
||||
or receiver report.
|
||||
/* First packet within compound packet is supposed to be a sender
|
||||
or receiver report.
|
||||
- allow BYE because this happens anyway
|
||||
- allow APP because TBCP ("PoC1") packets aren't compound... */
|
||||
if (!((packet_type == RTCP_SR) || (packet_type == RTCP_RR) ||
|
||||
(packet_type == RTCP_BYE) || (packet_type == RTCP_APP))) {
|
||||
return FALSE;
|
||||
}
|
||||
if (!((packet_type == RTCP_SR) || (packet_type == RTCP_RR) ||
|
||||
(packet_type == RTCP_BYE) || (packet_type == RTCP_APP))) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Overall length must be a multiple of 4 bytes */
|
||||
if (tvb_reported_length(tvb) % 4) {
|
||||
return FALSE;
|
||||
}
|
||||
/* Overall length must be a multiple of 4 bytes */
|
||||
if (tvb_reported_length(tvb) % 4) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
@ -346,9 +346,8 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_item *ti;
|
||||
proto_tree *flip_tree;
|
||||
proto_tree *basic_hdr_tree;
|
||||
proto_tree *payload_hdr_tree;
|
||||
tvbuff_t *flip_tvb;
|
||||
|
||||
|
||||
guint32 dw1;
|
||||
guint32 dw2;
|
||||
|
||||
|
@ -369,16 +368,13 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* Error handling for basic header. */
|
||||
gboolean is_faulty_frame;
|
||||
gboolean is_short_flip_len;
|
||||
gboolean is_invalid_flip_len;
|
||||
|
||||
|
||||
item = NULL;
|
||||
ti = NULL;
|
||||
flip_tree = NULL;
|
||||
basic_hdr_tree = NULL;
|
||||
payload_hdr_tree = NULL;
|
||||
flip_tvb = NULL;
|
||||
|
||||
|
||||
ext_hdr = FALSE;
|
||||
|
||||
bytes_dissected = 0;
|
||||
|
@ -388,8 +384,6 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
offset = 0;
|
||||
|
||||
is_faulty_frame = FALSE;
|
||||
is_short_flip_len = FALSE;
|
||||
is_invalid_flip_len = FALSE;
|
||||
|
||||
/* Show this protocol as FLIP. */
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FLIP");
|
||||
|
@ -422,7 +416,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
dw2 = tvb_get_ntohl(tvb, offset + 4);
|
||||
basic_hdr_seqnum = (guint16) ((dw2 & 0xFFFF0000) >> 16);
|
||||
basic_hdr_len = (guint16) (dw2 & 0x0000FFFF);
|
||||
|
||||
|
||||
/* Does the basic header indicate that an extension is next? */
|
||||
if (basic_hdr_ext == 1) {
|
||||
ext_hdr = TRUE;
|
||||
|
@ -443,7 +437,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
"FlowID %s", val_to_str(basic_hdr_flow_id, NULL, "0x%08x"));
|
||||
|
||||
flip_tvb = tvb_new_subset(tvb, 0, frame_len, frame_len);
|
||||
|
||||
|
||||
/* We are asked for details. */
|
||||
if (tree) {
|
||||
if (PTREE_DATA(tree)->visible) {
|
||||
|
@ -457,11 +451,11 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
flip_len, FALSE);
|
||||
}
|
||||
flip_tree = proto_item_add_subtree(ti, ett_flip);
|
||||
|
||||
|
||||
/* basic header */
|
||||
item = proto_tree_add_text(flip_tree, flip_tvb, 0, 8, "Basic Header");
|
||||
basic_hdr_tree = proto_item_add_subtree(item, ett_flip_basic);
|
||||
|
||||
|
||||
/* Extension header follows? 1 bit. */
|
||||
proto_tree_add_uint_format_value(basic_hdr_tree,
|
||||
hf_flip_basic_e,
|
||||
|
@ -477,7 +471,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* Flow ID: 28 bits. */
|
||||
proto_tree_add_item(basic_hdr_tree, hf_flip_basic_flowid,
|
||||
flip_tvb, offset + 0, 4, FALSE);
|
||||
|
||||
|
||||
/* Sequence number: 16 bits. */
|
||||
proto_tree_add_uint_format_value(basic_hdr_tree, hf_flip_basic_seqnum,
|
||||
flip_tvb, offset + 4, 2, dw2,
|
||||
|
@ -489,7 +483,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
"%d (0x%04x)",
|
||||
basic_hdr_len, basic_hdr_len);
|
||||
}
|
||||
|
||||
|
||||
offset += FLIP_BASIC_HDR_LEN;
|
||||
|
||||
/*
|
||||
|
@ -501,7 +495,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
"Length mismatch: frame %d bytes, hdr %d bytes",
|
||||
frame_len, flip_len);
|
||||
}
|
||||
else if (flip_len < FLIP_BASIC_HDR_LEN) {
|
||||
else if (flip_len < FLIP_BASIC_HDR_LEN) {
|
||||
col_add_fstr(pinfo->cinfo, COL_INFO,
|
||||
"Invalid length in basic header: %d bytes", flip_len);
|
||||
}
|
||||
|
@ -514,7 +508,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
*/
|
||||
payload_len = basic_hdr_len;
|
||||
payload_len -= FLIP_BASIC_HDR_LEN;
|
||||
|
||||
|
||||
/*
|
||||
* Dissect extension headers (if any).
|
||||
*/
|
||||
|
@ -531,9 +525,9 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint16 computed_chksum;
|
||||
|
||||
tvbuff_t *chksum_tvb;
|
||||
|
||||
|
||||
ext_hdr_type = tvb_get_guint8(flip_tvb, offset);
|
||||
|
||||
|
||||
switch (ext_hdr_type) {
|
||||
case FLIP_CHKSUM:
|
||||
/* Calculate checksum, let the chksum dissector verify it. */
|
||||
|
@ -590,7 +584,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
payload_tvb = tvb_new_subset(flip_tvb, offset,
|
||||
payload_len, payload_len);
|
||||
|
||||
|
||||
/*
|
||||
* 1) no decoding -> data
|
||||
* 2) heuristic decoding
|
||||
|
@ -620,7 +614,7 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
handle = data_handle;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case FLIP_PAYLOAD_DECODING_MODE_FORCED:
|
||||
if (is_forced_handle_ok == TRUE) {
|
||||
handle = forced_handle;
|
||||
|
@ -628,18 +622,18 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
else {
|
||||
/* Use data as backup. */
|
||||
handle = data_handle;
|
||||
|
||||
|
||||
/* Tell the user he messed up. */
|
||||
has_user_messed_up = TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
/* Fault in dissector's internal logic. */
|
||||
DISSECTOR_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If tree is NULL, we still cannot quit, we must give
|
||||
* the RTP/RTCP/data dissectors a chance to fill in
|
||||
|
@ -654,12 +648,12 @@ dissect_flip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
bytes_dissected += data_len;
|
||||
|
||||
|
||||
} /* if (payload_len > 0) */
|
||||
|
||||
DISSECT_FLIP_EXIT:
|
||||
return bytes_dissected;
|
||||
|
||||
|
||||
} /* dissect_flip() */
|
||||
|
||||
|
||||
|
@ -735,7 +729,7 @@ proto_register_flip(void)
|
|||
proto_reg_handoff_flip);
|
||||
|
||||
/* Register preferences */
|
||||
prefs_register_enum_preference(
|
||||
prefs_register_enum_preference(
|
||||
flip_module,
|
||||
"decoding_mode",
|
||||
"FLIP payload decoding mode",
|
||||
|
@ -749,7 +743,7 @@ proto_register_flip(void)
|
|||
"heur_enabled_protocols",
|
||||
"Heuristic mode: enabled protocols",
|
||||
"Enabled protocols for heuristic mode");
|
||||
|
||||
|
||||
prefs_register_bool_preference(
|
||||
flip_module,
|
||||
"heur_decode_rtp",
|
||||
|
@ -763,20 +757,20 @@ proto_register_flip(void)
|
|||
"RTCP",
|
||||
"Decode payload as RTCP if detected",
|
||||
&is_heur_enabled_rtcp);
|
||||
|
||||
|
||||
prefs_register_static_text_preference(
|
||||
flip_module,
|
||||
"forced_protocol",
|
||||
"Forced mode: decode to user-specified protocol",
|
||||
"Mapping of flow IDs to their decodings");
|
||||
|
||||
|
||||
prefs_register_string_preference(
|
||||
flip_module,
|
||||
"forced_decode",
|
||||
"Protocol name",
|
||||
"Decoding to user-defined protocol",
|
||||
&global_forced_protocol);
|
||||
|
||||
|
||||
} /* proto_register_flip() */
|
||||
|
||||
/* Protocol handoff */
|
||||
|
@ -804,7 +798,7 @@ proto_reg_handoff_flip(void)
|
|||
if (forced_handle != NULL) {
|
||||
is_forced_handle_ok = TRUE;
|
||||
}
|
||||
|
||||
|
||||
} /* proto_reg_handoff_flip() */
|
||||
|
||||
/* end of file packet-flip.c */
|
||||
|
|
|
@ -1612,11 +1612,10 @@ dissect_infiniband_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, g
|
|||
gint offset = 0; /* Current Offset */
|
||||
|
||||
/* General Variables */
|
||||
gboolean bthFollows = 0; /* Tracks if we are parsing a BTH. This is a significant decision point */
|
||||
gboolean bthFollows = FALSE; /* Tracks if we are parsing a BTH. This is a significant decision point */
|
||||
guint8 virtualLane = 0; /* IB VirtualLane. Keyed off of for detecting subnet admin/management */
|
||||
guint8 opCode = 0; /* OpCode from BTH header. */
|
||||
gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
|
||||
guint16 payloadLength = 0; /* Payload Length should it exist */
|
||||
guint8 nxtHdr = 0; /* Keyed off for header dissection order */
|
||||
guint16 packetLength = 0; /* Packet Length. We track this as tvb_length - offset. */
|
||||
/* It provides the parsing methods a known size */
|
||||
|
@ -1744,8 +1743,6 @@ skip_lrh:
|
|||
proto_tree_add_item(global_route_header_tree, hf_infiniband_traffic_class, tvb, offset, 2, FALSE);
|
||||
proto_tree_add_item(global_route_header_tree, hf_infiniband_flow_label, tvb, offset, 4, FALSE); offset += 4;
|
||||
|
||||
payloadLength = tvb_get_ntohs(tvb, offset);
|
||||
|
||||
proto_tree_add_item(global_route_header_tree, hf_infiniband_payload_length, tvb, offset, 2, FALSE); offset += 2;
|
||||
|
||||
nxtHdr = tvb_get_guint8(tvb, offset);
|
||||
|
@ -4949,7 +4946,7 @@ static void parse_PERF_PortCountersExtended(proto_tree* parentTree, tvbuff_t* tv
|
|||
static void dissect_general_info(tvbuff_t *tvb, gint offset, packet_info *pinfo, gboolean starts_with_grh)
|
||||
{
|
||||
guint8 lnh_val = 0; /* The Link Next Header Value. Tells us which headers are coming */
|
||||
gboolean bthFollows = 0; /* Tracks if we are parsing a BTH. This is a significant decision point */
|
||||
gboolean bthFollows = FALSE; /* Tracks if we are parsing a BTH. This is a significant decision point */
|
||||
guint8 virtualLane = 0; /* The Virtual Lane of the current Packet */
|
||||
guint8 opCode = 0; /* OpCode from BTH header. */
|
||||
gint32 nextHeaderSequence = -1; /* defined by this dissector. #define which indicates the upcoming header sequence from OpCode */
|
||||
|
|
|
@ -2035,8 +2035,10 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint8 info_element;
|
||||
guint8 info_element_ext;
|
||||
guint16 info_element_len;
|
||||
#if 0
|
||||
int codeset;
|
||||
gboolean non_locking_shift;
|
||||
#endif
|
||||
|
||||
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Q.2931");
|
||||
|
||||
|
@ -2094,8 +2096,10 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/*
|
||||
* And now for the information elements....
|
||||
*/
|
||||
#if 0
|
||||
codeset = 0; /* start out in codeset 0 */
|
||||
non_locking_shift = TRUE;
|
||||
#endif
|
||||
while (tvb_reported_length_remaining(tvb, offset) > 0) {
|
||||
info_element = tvb_get_guint8(tvb, offset);
|
||||
info_element_ext = tvb_get_guint8(tvb, offset + 1);
|
||||
|
@ -2104,9 +2108,9 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
dissect_q2931_ie(tvb, offset, info_element_len,
|
||||
q2931_tree, info_element, info_element_ext);
|
||||
}
|
||||
#if 0 /* XXX: Is codeset & etc supoosed to be used somehow ? */
|
||||
if (non_locking_shift)
|
||||
codeset = 0;
|
||||
|
||||
/*
|
||||
* Handle shifts.
|
||||
*/
|
||||
|
@ -2126,6 +2130,7 @@ dissect_q2931(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
offset += 1 + 1 + 2 + info_element_len;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -212,14 +212,14 @@ static const value_string tnef_Attribute_vals[] = {
|
|||
{ ATT_SENT_FOR, "ATT_SENT_FOR" },
|
||||
{ ATT_DELEGATE, "ATT_DELEGATE" },
|
||||
{ ATT_OWNER, "ATT_OWNER" },
|
||||
{ ATT_DATE_START, "ATT_DATE_START" },
|
||||
{ ATT_DATE_END, "ATT_DATE_END" },
|
||||
{ ATT_DATE_START, "ATT_DATE_START" },
|
||||
{ ATT_DATE_END, "ATT_DATE_END" },
|
||||
{ ATT_AID_OWNER, "ATT_AID_OWNER" },
|
||||
{ ATT_REQUEST_RES, "ATT_REQUEST_RES" },
|
||||
{ ATT_FROM, "ATT_FROM" },
|
||||
{ ATT_SUBJECT, "ATT_SUBJECT" },
|
||||
{ ATT_DATE_SENT, "ATT_DATE_SENT" },
|
||||
{ ATT_DATE_RECD, "ATT_DATE_RECD" },
|
||||
{ ATT_DATE_SENT, "ATT_DATE_SENT" },
|
||||
{ ATT_DATE_RECD, "ATT_DATE_RECD" },
|
||||
{ ATT_MESSAGE_STATUS, "ATT_MESSAGE_STATUS" },
|
||||
{ ATT_MESSAGE_CLASS, "ATT_MESSAGE_CLASS" },
|
||||
{ ATT_MESSAGE_ID, "ATT_MESSAGE_ID" },
|
||||
|
@ -324,7 +324,7 @@ static void dissect_DTR(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
|
|||
|
||||
proto_tree_add_item(tree, hf_tnef_attribute_date_hour, tvb, offset, 2, TRUE);
|
||||
offset +=2;
|
||||
|
||||
|
||||
proto_tree_add_item(tree, hf_tnef_attribute_date_minute, tvb, offset, 2, TRUE);
|
||||
offset +=2;
|
||||
|
||||
|
@ -340,62 +340,62 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
{
|
||||
proto_item *item, *prop_item;
|
||||
proto_tree *prop_tree, *tag_tree;
|
||||
guint32 count, tag, tag_kind, tag_length;
|
||||
guint32 /*count,*/ tag, tag_kind, tag_length;
|
||||
guint16 padding;
|
||||
gint offset, start_offset;
|
||||
|
||||
|
||||
guint8 drep[] = {0x10 /* LE */, /* DCE_RPC_DREP_FP_IEEE */ 0 };
|
||||
static dcerpc_info di;
|
||||
static dcerpc_info di;
|
||||
static dcerpc_call_value call_data;
|
||||
void *old_private_data;
|
||||
|
||||
|
||||
offset = 0;
|
||||
|
||||
|
||||
di.conformant_run = 0;
|
||||
/* we need di->call_data->flags.NDR64 == 0 */
|
||||
di.call_data = &call_data;
|
||||
|
||||
|
||||
old_private_data = pinfo->private_data;
|
||||
pinfo->private_data = &di;
|
||||
|
||||
|
||||
/* first the count */
|
||||
proto_tree_add_item(tree, hf_tnef_mapi_props_count, tvb, offset, 4, TRUE);
|
||||
count = tvb_get_letohl(tvb, offset);
|
||||
|
||||
/*count = tvb_get_letohl(tvb, offset);*/
|
||||
|
||||
offset += 4;
|
||||
|
||||
while(tvb_length_remaining(tvb, offset) > 0 ) {
|
||||
|
||||
while(tvb_reported_length_remaining(tvb, offset) > 0 ) {
|
||||
|
||||
start_offset = offset;
|
||||
|
||||
|
||||
/* get the property tag */
|
||||
|
||||
|
||||
prop_item = proto_tree_add_item(tree, hf_tnef_property, tvb, offset, -1, TRUE);
|
||||
prop_tree = proto_item_add_subtree(prop_item, ett_tnef_property);
|
||||
|
||||
|
||||
item = proto_tree_add_item(prop_tree, hf_tnef_property_tag, tvb, offset, 4, TRUE);
|
||||
tag_tree = proto_item_add_subtree(item, ett_tnef_property_tag);
|
||||
|
||||
|
||||
/* add a nice name to the property */
|
||||
tag = tvb_get_letohl(tvb, offset);
|
||||
proto_item_append_text(prop_item, " %s", val_to_str(tag, nspi_MAPITAGS_vals, "Unknown tag (0x%08lx)"));
|
||||
|
||||
|
||||
proto_tree_add_item(tag_tree, hf_tnef_property_tag_type, tvb, offset, 2, TRUE);
|
||||
offset += 2;
|
||||
|
||||
|
||||
proto_tree_add_item(tag_tree, hf_tnef_property_tag_id, tvb, offset, 2, TRUE);
|
||||
offset += 2;
|
||||
|
||||
|
||||
if(tag & 0x80000000) {
|
||||
|
||||
|
||||
/* it is a named property */
|
||||
proto_tree_add_item(tag_tree, hf_tnef_property_tag_set, tvb, offset, 16, TRUE);
|
||||
offset += 16;
|
||||
|
||||
|
||||
tag_kind = tvb_get_letohl(tvb, offset);
|
||||
proto_tree_add_item(tag_tree, hf_tnef_property_tag_kind, tvb, offset, 4, TRUE);
|
||||
offset += 4;
|
||||
|
||||
|
||||
if(tag_kind == 0) {
|
||||
proto_tree_add_item(tag_tree, hf_tnef_property_tag_name_id, tvb, offset, 4, TRUE);
|
||||
offset += 4;
|
||||
|
@ -409,7 +409,7 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
offset += 4;
|
||||
|
||||
name_string = tvb_get_ephemeral_faked_unicode (tvb, offset, tag_length / 2, TRUE);
|
||||
proto_tree_add_string_format(tag_tree, hf_tnef_property_tag_name_string, tvb, offset,
|
||||
proto_tree_add_string_format(tag_tree, hf_tnef_property_tag_name_string, tvb, offset,
|
||||
tag_length, name_string, "Name: %s", name_string);
|
||||
offset += tag_length;
|
||||
|
||||
|
@ -422,7 +422,7 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch(tag) {
|
||||
/* handle any specific tags here */
|
||||
default:
|
||||
|
@ -487,16 +487,16 @@ static void dissect_mapiprops(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
|
|||
|
||||
/* we may need to pad to a 4-byte boundary */
|
||||
if((padding = (4 - (offset - start_offset) % 4)) != 4) {
|
||||
|
||||
|
||||
/* we need to pad */
|
||||
proto_tree_add_item(prop_tree, hf_tnef_property_padding, tvb, offset, padding, TRUE);
|
||||
|
||||
|
||||
offset += padding;
|
||||
}
|
||||
|
||||
|
||||
proto_item_set_len(prop_item, offset - start_offset);
|
||||
}
|
||||
|
||||
|
||||
/* restore private_data */
|
||||
pinfo->private_data = old_private_data;
|
||||
}
|
||||
|
@ -524,11 +524,11 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
/* check the signature */
|
||||
if(signature != TNEF_SIGNATURE) {
|
||||
|
||||
|
||||
proto_item_append_text(item, " [Incorrect, should be 0x%x. No further dissection possible. Check any Content-Transfer-Encoding has been removed.]", TNEF_SIGNATURE);
|
||||
|
||||
|
||||
proto_item_set_expert_flags(item, PI_MALFORMED, PI_WARN);
|
||||
|
||||
|
||||
return;
|
||||
|
||||
} else {
|
||||
|
@ -540,7 +540,7 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(tree, hf_tnef_key, tvb, offset, 2, TRUE);
|
||||
offset += 2;
|
||||
|
||||
while(tvb_length_remaining(tvb, offset) > 9 ) { /* there must be at least a level (1), tag (4) and length (4) to be valid */
|
||||
while(tvb_reported_length_remaining(tvb, offset) > 9 ) { /* there must be at least a level (1), tag (4) and length (4) to be valid */
|
||||
|
||||
start_offset = offset;
|
||||
|
||||
|
@ -583,7 +583,7 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
case ATT_MAPI_PROPS:
|
||||
item = proto_tree_add_item(attr_tree, hf_tnef_mapi_props, tvb, offset, length, TRUE);
|
||||
props_tree = proto_item_add_subtree(item, ett_tnef_mapi_props);
|
||||
props_tree = proto_item_add_subtree(item, ett_tnef_mapi_props);
|
||||
|
||||
next_tvb = tvb_new_subset(tvb, offset, length, length);
|
||||
|
||||
|
@ -592,7 +592,7 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
case ATT_OWNER:
|
||||
case ATT_SENT_FOR:
|
||||
addr_tree = proto_item_add_subtree(item, ett_tnef_attribute_address);
|
||||
addr_tree = proto_item_add_subtree(item, ett_tnef_attribute_address);
|
||||
|
||||
(void)dissect_counted_address(tvb, offset, pinfo, addr_tree);
|
||||
|
||||
|
@ -604,9 +604,9 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
/* just do it on the type */
|
||||
switch((tag >> 16) & 0xffff) {
|
||||
case ATP_DATE:
|
||||
item = proto_tree_add_item(attr_tree, hf_tnef_attribute_date, tvb, offset, length, TRUE);
|
||||
date_tree = proto_item_add_subtree(item, ett_tnef_attribute_date);
|
||||
|
||||
item = proto_tree_add_item(attr_tree, hf_tnef_attribute_date, tvb, offset, length, TRUE);
|
||||
date_tree = proto_item_add_subtree(item, ett_tnef_attribute_date);
|
||||
|
||||
next_tvb = tvb_new_subset(tvb, offset, length, length);
|
||||
|
||||
dissect_DTR(next_tvb, pinfo, date_tree);
|
||||
|
@ -614,7 +614,7 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
break;
|
||||
case ATP_STRING:
|
||||
proto_tree_add_item(attr_tree, hf_tnef_attribute_string, tvb, offset, length, FALSE);
|
||||
proto_item_append_text(attr_item, " %s", tvb_get_ephemeral_string(tvb, offset, length));
|
||||
proto_item_append_text(attr_item, " %s", tvb_get_ephemeral_string(tvb, offset, length));
|
||||
break;
|
||||
default:
|
||||
proto_tree_add_item(attr_tree, hf_tnef_attribute_value, tvb, offset, length, TRUE);
|
||||
|
@ -631,8 +631,8 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
|
||||
/* there may be some padding */
|
||||
if(tvb_length_remaining(tvb, offset)) /* XXX: Not sure if they is really padding or not */
|
||||
proto_tree_add_item(tree, hf_tnef_padding, tvb, offset, tvb_length_remaining(tvb, offset), TRUE);
|
||||
if(tvb_reported_length_remaining(tvb, offset)) /* XXX: Not sure if they is really padding or not */
|
||||
proto_tree_add_item(tree, hf_tnef_padding, tvb, offset, tvb_reported_length_remaining(tvb, offset), TRUE);
|
||||
}
|
||||
|
||||
static void dissect_tnef_file(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
|
@ -691,19 +691,19 @@ proto_register_tnef(void)
|
|||
{ &hf_tnef_attribute_email_address,
|
||||
{ "Email Address", "tnef.attribute.email_address", FT_STRING, BASE_NONE, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
{ &hf_tnef_attribute_date_year,
|
||||
{ &hf_tnef_attribute_date_year,
|
||||
{ "Year", "tnef.attribute.date.year", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_attribute_date_month,
|
||||
{ &hf_tnef_attribute_date_month,
|
||||
{ "Month", "tnef.attribute.date.month", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_attribute_date_day,
|
||||
{ &hf_tnef_attribute_date_day,
|
||||
{ "Day", "tnef.attribute.date.day", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_attribute_date_hour,
|
||||
{ &hf_tnef_attribute_date_hour,
|
||||
{ "Hour", "tnef.attribute.date.hour", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_attribute_date_minute,
|
||||
{ &hf_tnef_attribute_date_minute,
|
||||
{ "Minute", "tnef.attribute.date.minute", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_attribute_date_second,
|
||||
{ &hf_tnef_attribute_date_second,
|
||||
{ "Second", "tnef.attribute.date.second", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_attribute_date_day_of_week,
|
||||
{ &hf_tnef_attribute_date_day_of_week,
|
||||
{ "Day Of Week", "tnef.attribute.date.day_of_week", FT_UINT16, BASE_DEC, VALS(weekday_vals), 0, NULL, HFILL }},
|
||||
{ &hf_tnef_attribute_checksum,
|
||||
{ "Checksum", "tnef.attribute.checksum", FT_UINT16, BASE_HEX, NULL, 0x0,
|
||||
|
@ -768,41 +768,41 @@ proto_register_tnef(void)
|
|||
{ &hf_tnef_value_length,
|
||||
{ "Length", "tnef.value.length", FT_UINT16, BASE_DEC, NULL, 0x0,
|
||||
NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_i,
|
||||
{ &hf_tnef_PropValue_i,
|
||||
{ "I", "tnef.PropValue.i", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_l,
|
||||
{ &hf_tnef_PropValue_l,
|
||||
{ "L", "tnef.PropValue.l", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_b,
|
||||
{ &hf_tnef_PropValue_b,
|
||||
{ "B", "tnef.PropValue.b", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_lpszA,
|
||||
{ &hf_tnef_PropValue_lpszA,
|
||||
{ "Lpsza", "tnef.PropValue.lpszA", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_lpszW,
|
||||
{ &hf_tnef_PropValue_lpszW,
|
||||
{ "Lpszw", "tnef.PropValue.lpszW", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_lpguid,
|
||||
{ &hf_tnef_PropValue_lpguid,
|
||||
{ "Lpguid", "tnef.PropValue.lpguid", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_bin,
|
||||
{ &hf_tnef_PropValue_bin,
|
||||
{ "Bin", "tnef.PropValue.bin", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_ft,
|
||||
{ &hf_tnef_PropValue_ft,
|
||||
{ "Ft", "tnef.PropValue.ft", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_err,
|
||||
{ &hf_tnef_PropValue_err,
|
||||
{ "Err", "tnef.PropValue.err", FT_UINT32, BASE_DEC, VALS(nspi_MAPISTATUS_vals), 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_MVi,
|
||||
{ &hf_tnef_PropValue_MVi,
|
||||
{ "Mvi", "tnef.PropValue.MVi", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_MVl,
|
||||
{ &hf_tnef_PropValue_MVl,
|
||||
{ "Mvl", "tnef.PropValue.MVl", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_MVszA,
|
||||
{ &hf_tnef_PropValue_MVszA,
|
||||
{ "Mvsza", "tnef.PropValue.MVszA", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_MVbin,
|
||||
{ &hf_tnef_PropValue_MVbin,
|
||||
{ "Mvbin", "tnef.PropValue.MVbin", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_MVguid,
|
||||
{ &hf_tnef_PropValue_MVguid,
|
||||
{ "Mvguid", "tnef.PropValue.MVguid", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_MVszW,
|
||||
{ &hf_tnef_PropValue_MVszW,
|
||||
{ "Mvszw", "tnef.PropValue.MVszW", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_MVft,
|
||||
{ &hf_tnef_PropValue_MVft,
|
||||
{ "Mvft", "tnef.PropValue.MVft", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_null,
|
||||
{ &hf_tnef_PropValue_null,
|
||||
{ "Null", "tnef.PropValue.null", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
{ &hf_tnef_PropValue_object,
|
||||
{ &hf_tnef_PropValue_object,
|
||||
{ "Object", "tnef.PropValue.object", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
|
||||
};
|
||||
static gint *ett[] = {
|
||||
|
|
Loading…
Reference in New Issue