Do various minor dissector changes:

- remove unneeded initializers;
- replace tabs in files with editor mode line 'expandtabs';
- col_set_str() --> col_add_str() (in one case);
- tvb_length() -- > tvb_reported_length() (in one case);
- do some whitespace & indentation fixes/changes.

Change-Id: Ib8ffbbcdb6e4a74c0df6021a75430ae1ef9ae089
Reviewed-on: https://code.wireshark.org/review/3435
Reviewed-by: Bill Meier <wmeier@newsguy.com>
This commit is contained in:
Bill Meier 2014-08-05 14:54:55 -04:00
parent 9dc332454a
commit 72c2a33437
9 changed files with 2143 additions and 2143 deletions

View File

@ -63,7 +63,7 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMTCP");
col_set_str(pinfo->cinfo, COL_INFO, "ATMTCP");
col_add_str(pinfo->cinfo, COL_INFO, "ATMTCP");
if (tree) {
ti = proto_tree_add_item(tree, proto_atmtcp, tvb, 0, -1, ENC_NA);
@ -90,7 +90,7 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
length = tvb_get_ntohl(tvb, offset);
if(length == ATMTCP_HDR_MAGIC)
{
col_append_str(pinfo->cinfo, COL_INFO, " Command");
col_append_str(pinfo->cinfo, COL_INFO, " Command");
}
else
{
@ -101,7 +101,7 @@ dissect_atmtcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
/* Data (for the moment...) */
next_tvb = tvb_new_subset_remaining(tvb, offset);
call_dissector(data_handle, next_tvb, pinfo, tree);
return tvb_length(tvb);
return tvb_reported_length(tvb);
}

View File

@ -589,11 +589,11 @@ static const value_string gtpv2_message_type_vals[] = {
{236, "MBMS Session Stop Response"},
/* 237 to 239 For future use */
{240, "SRVCC CS to PS Response"}, /* 5.2.9 3GPP TS 29.280 V11.5.0 (2013-09) */
{241, "SRVCC CS to PS Complete Notification"}, /* 5.2.10 3GPP TS 29.280 V11.5.0 (2013-09) */
{242, "SRVCC CS to PS Complete Acknowledge"}, /* 5.2.11 3GPP TS 29.280 V11.5.0 (2013-09) */
{243, "SRVCC CS to PS Cancel Notification"}, /* 5.2.12 3GPP TS 29.280 V11.5.0 (2013-09) */
{244, "SRVCC CS to PS Cancel Acknowledge"}, /* 5.2.13 3GPP TS 29.280 V11.5.0 (2013-09) */
/* 245 to 247 For future Sv interface use*/
{241, "SRVCC CS to PS Complete Notification"}, /* 5.2.10 3GPP TS 29.280 V11.5.0 (2013-09) */
{242, "SRVCC CS to PS Complete Acknowledge"}, /* 5.2.11 3GPP TS 29.280 V11.5.0 (2013-09) */
{243, "SRVCC CS to PS Cancel Notification"}, /* 5.2.12 3GPP TS 29.280 V11.5.0 (2013-09) */
{244, "SRVCC CS to PS Cancel Acknowledge"}, /* 5.2.13 3GPP TS 29.280 V11.5.0 (2013-09) */
/* 245 to 247 For future Sv interface use*/
/* 248 to 255 For future use */
{0, NULL}
};

View File

@ -130,7 +130,7 @@ static int add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
/* bitmask for bits [l..h]
* taken from kernel's include/linux/bitops.h
*/
#define GENMASK(h, l) (((1U << ((h) - (l) + 1)) - 1) << (l))
#define GENMASK(h, l) (((1U << ((h) - (l) + 1)) - 1) << (l))
/* Defragment fragmented 802.11 datagrams */
static gboolean wlan_defragment = TRUE;

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
* Controllers, possibly other Cisco access points, and possibly
* other devices such as Aruba access points. See
*
* http://www.wildpackets.com/elements/omnipeek/OmniPeek_UserGuide.pdf
* http://www.wildpackets.com/elements/omnipeek/OmniPeek_UserGuide.pdf
*
* which speaks of Aruba access points supporting remote capture and
* defaulting to port 5000 for this, and also speaks of Cisco access

View File

@ -37,24 +37,24 @@
void proto_register_scsi_smc(void);
static int proto_scsi_smc = -1;
int hf_scsi_smc_opcode = -1;
static int hf_scsi_smc_mta = -1;
static int hf_scsi_smc_sa = -1;
static int hf_scsi_smc_da = -1;
static int hf_scsi_smc_fda = -1;
static int hf_scsi_smc_sda = -1;
static int hf_scsi_smc_medium_flags = -1;
static int hf_scsi_smc_inv1 = -1;
static int hf_scsi_smc_inv2 = -1;
static int hf_scsi_smc_range_flags = -1;
static int hf_scsi_smc_fast = -1;
static int hf_scsi_smc_range = -1;
/* static int hf_scsi_smc_sea = -1; */
static int hf_scsi_smc_num_elements = -1;
static int hf_scsi_smc_invert = -1;
static int hf_scsi_smc_ea = -1;
static int hf_scsi_smc_action_code = -1;
static int proto_scsi_smc = -1;
int hf_scsi_smc_opcode = -1;
static int hf_scsi_smc_mta = -1;
static int hf_scsi_smc_sa = -1;
static int hf_scsi_smc_da = -1;
static int hf_scsi_smc_fda = -1;
static int hf_scsi_smc_sda = -1;
static int hf_scsi_smc_medium_flags = -1;
static int hf_scsi_smc_inv1 = -1;
static int hf_scsi_smc_inv2 = -1;
static int hf_scsi_smc_range_flags = -1;
static int hf_scsi_smc_fast = -1;
static int hf_scsi_smc_range = -1;
/* static int hf_scsi_smc_sea = -1; */
static int hf_scsi_smc_num_elements = -1;
static int hf_scsi_smc_invert = -1;
static int hf_scsi_smc_ea = -1;
static int hf_scsi_smc_action_code = -1;
/* Generated from convert_proto_tree_add_text.pl */
static int hf_scsi_smc_allocation_length = -1;
static int hf_scsi_smc_first_element_address_reported = -1;
@ -96,9 +96,9 @@ static int hf_scsi_smc_primary_vol_seq_num = -1;
static int hf_scsi_smc_alternate_vol_tag_id = -1;
static int hf_scsi_smc_alternate_vol_seq_num = -1;
static gint ett_scsi_exchange_medium = -1;
static gint ett_scsi_range = -1;
static gint ett_scsi_move = -1;
static gint ett_scsi_exchange_medium = -1;
static gint ett_scsi_range = -1;
static gint ett_scsi_move = -1;
static void
dissect_smc_exchangemedium (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
@ -108,7 +108,7 @@ dissect_smc_exchangemedium (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
static const int *exchg_fields[] = {
&hf_scsi_smc_inv1,
&hf_scsi_smc_inv2,
NULL
NULL
};
if (!tree)
@ -133,7 +133,7 @@ dissect_smc_position_to_element (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tr
{
static const int *pte_fields[] = {
&hf_scsi_smc_invert,
NULL
NULL
};
if (!tree)
@ -171,7 +171,7 @@ dissect_smc_initialize_element_status_with_range (tvbuff_t *tvb, packet_info *pi
static const int *range_fields[] = {
&hf_scsi_smc_fast,
&hf_scsi_smc_range,
NULL
NULL
};
if (!tree)
@ -209,7 +209,7 @@ dissect_smc_movemedium (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
{
static const int *move_fields[] = {
&hf_scsi_smc_invert,
NULL
NULL
};
if (!tree)
@ -266,7 +266,7 @@ dissect_scsi_smc_volume_tag (tvbuff_t *tvb, packet_info *pinfo _U_,
tvb_memcpy (tvb, (guint8 *)volid, offset, 32);
p = &volid[32];
for (;;) {
*p = '\0';
*p = '\0';
if (p == volid)
break;
if (*(p - 1) != ' ')
@ -445,8 +445,8 @@ dissect_scsi_smc_elements (tvbuff_t *tvb, packet_info *pinfo,
if (elem_bytecnt > desc_bytecnt)
elem_bytecnt = desc_bytecnt;
if (elem_bytecnt < 2)
break;
if (elem_bytecnt < 2)
break;
dissect_scsi_smc_element (tvb, pinfo, tree, offset, elem_bytecnt,
elem_type, voltag_flags);
@ -876,32 +876,32 @@ proto_register_scsi_smc(void)
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{ &hf_scsi_smc_medium_flags,
{ &hf_scsi_smc_medium_flags,
{"Flags", "scsi_smc.medium_flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{ &hf_scsi_smc_inv1,
{ &hf_scsi_smc_inv1,
{"INV1", "scsi_smc.inv1",
FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL}
},
{ &hf_scsi_smc_inv2,
{ &hf_scsi_smc_inv2,
{"INV2", "scsi_smc.inv2",
FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL}
},
{ &hf_scsi_smc_range_flags,
{ &hf_scsi_smc_range_flags,
{"Flags", "scsi_smc.range_flags",
FT_UINT8, BASE_HEX, NULL, 0x0,
NULL, HFILL}
},
{ &hf_scsi_smc_fast,
{ &hf_scsi_smc_fast,
{"FAST", "scsi_smc.fast",
FT_BOOLEAN, 8, NULL, 0x02,
NULL, HFILL}
},
{ &hf_scsi_smc_range,
{ &hf_scsi_smc_range,
{"RANGE", "scsi_smc.range",
FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL}
@ -918,7 +918,7 @@ proto_register_scsi_smc(void)
FT_UINT16, BASE_DEC, NULL, 0x0,
NULL, HFILL}
},
{ &hf_scsi_smc_invert,
{ &hf_scsi_smc_invert,
{"INVERT", "scsi_smc.invert",
FT_BOOLEAN, 8, NULL, 0x01,
NULL, HFILL}

View File

@ -3103,19 +3103,19 @@ fragment_reassembly(tvbuff_t *tvb, sctp_fragment *fragment,
static void
export_sctp_data_chunk(packet_info *pinfo, tvbuff_t *tvb, const gchar *proto_name)
{
exp_pdu_data_t *exp_pdu_data;
guint8 tags_bit_field;
exp_pdu_data_t *exp_pdu_data;
guint8 tags_bit_field;
tags_bit_field = EXP_PDU_TAG_IP_SRC_BIT + EXP_PDU_TAG_IP_DST_BIT + EXP_PDU_TAG_SRC_PORT_BIT+
EXP_PDU_TAG_DST_PORT_BIT + EXP_PDU_TAG_ORIG_FNO_BIT;
tags_bit_field = EXP_PDU_TAG_IP_SRC_BIT + EXP_PDU_TAG_IP_DST_BIT + EXP_PDU_TAG_SRC_PORT_BIT+
EXP_PDU_TAG_DST_PORT_BIT + EXP_PDU_TAG_ORIG_FNO_BIT;
exp_pdu_data = load_export_pdu_tags(pinfo, proto_name, -1, &tags_bit_field, 1);
exp_pdu_data = load_export_pdu_tags(pinfo, proto_name, -1, &tags_bit_field, 1);
exp_pdu_data->tvb_captured_length = tvb_captured_length(tvb);
exp_pdu_data->tvb_reported_length = tvb_reported_length(tvb);
exp_pdu_data->pdu_tvb = tvb;
exp_pdu_data->tvb_captured_length = tvb_captured_length(tvb);
exp_pdu_data->tvb_reported_length = tvb_reported_length(tvb);
exp_pdu_data->pdu_tvb = tvb;
tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data);
tap_queue_packet(exported_pdu_tap, pinfo, exp_pdu_data);
}
@ -3147,7 +3147,7 @@ dissect_fragmented_payload(tvbuff_t *payload_tvb, packet_info *pinfo, proto_tree
const gchar *proto_name;
gboolean retval;
cur = wmem_list_tail(pinfo->layers);
cur = wmem_list_tail(pinfo->layers);
retval = dissect_payload(new_tvb, pinfo, tree, ppi);
cur = wmem_list_frame_next(cur);
proto_id = GPOINTER_TO_UINT(wmem_list_frame_data(cur));
@ -3303,7 +3303,7 @@ dissect_data_chunk(tvbuff_t *chunk_tvb,
guint proto_id;
const gchar *proto_name;
cur = wmem_list_tail(pinfo->layers);
cur = wmem_list_tail(pinfo->layers);
retval = dissect_payload(payload_tvb, pinfo, tree, payload_proto_id);
cur = wmem_list_frame_next(cur);
proto_id = GPOINTER_TO_UINT(wmem_list_frame_data(cur));

View File

@ -962,7 +962,7 @@ body_dissected:
* The returned buffer is automatically scoped to the lifetime of the capture
* (via se_memdup()).
*/
#define DECOMPRESS_BUFSIZE 16384
#define DECOMPRESS_BUFSIZE 16384
static guint8* spdy_decompress_header_block(tvbuff_t *tvb,
z_streamp decomp,

View File

@ -211,9 +211,9 @@ dissect_vrrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
PROTO_ITEM_SET_HIDDEN(hidden_item);
if(hi_nibble(ver_type)==3){
proto_item_append_text(checksum_item, " [incorrect, should be 0x%04x(check preferences)]", in_cksum_shouldbe(cksum, computed_cksum));
}else{
} else {
proto_item_append_text(checksum_item, " [incorrect, should be 0x%04x]", in_cksum_shouldbe(cksum, computed_cksum));
}
}
expert_add_info_format(pinfo, checksum_item, &ei_vrrp_checksum,
"VRRP Checksum Incorrect, should be 0x%04x", in_cksum_shouldbe(cksum, computed_cksum));
}
@ -342,7 +342,7 @@ void proto_register_vrrp(void)
vrrp_module = prefs_register_protocol(proto_vrrp, NULL);
prefs_register_bool_preference(vrrp_module, "v3_checksum_as_in_v2",
prefs_register_bool_preference(vrrp_module, "v3_checksum_as_in_v2",
"Calculate V3 checksum as in V2 for IPv4 packets",
"There is some ambigiousy on how to calculate V3 checksums"
"As in V3 will use a pseudo header(which may only be implemented for IPv6 by some manufacturers)",