summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2012-12-05 15:56:36 +0000
committerBill Meier <wmeier@newsguy.com>2012-12-05 15:56:36 +0000
commit7cd0417af555a78b19c6909a40d1867e0fe9a063 (patch)
treecc09f739029479eee683f26228e098db307fd1aa /epan
parentf8ba6b5a077fa89f1d1e55b5bed4bab0ea6b11cf (diff)
downloadwireshark-7cd0417af555a78b19c6909a40d1867e0fe9a063.tar.gz
Fix numerous instances of a variable/parameter name "shadowing" a library function name;
(At least some (gcc ?) compilers give a "shadow" warning for these). svn path=/trunk/; revision=46402
Diffstat (limited to 'epan')
-rw-r--r--epan/diam_dict.l10
-rw-r--r--epan/dissectors/packet-dmp.c4
-rw-r--r--epan/dissectors/packet-epl.c28
-rw-r--r--epan/dissectors/packet-gmhdr.c10
-rw-r--r--epan/dissectors/packet-ieee80211-prism.c6
-rw-r--r--epan/dissectors/packet-mysql.c148
-rw-r--r--epan/dissectors/packet-radius.c42
-rw-r--r--epan/dissectors/packet-reload-framing.c46
-rw-r--r--epan/dissectors/packet-reload.c8
-rw-r--r--epan/dissectors/packet-rlc.c26
-rw-r--r--epan/dissectors/packet-sbus.c6
-rw-r--r--epan/dissectors/packet-sna.c140
-rw-r--r--epan/dissectors/packet-tcp.c4
-rw-r--r--epan/dissectors/packet-xmpp.c16
-rw-r--r--epan/follow.c6
-rw-r--r--epan/radius_dict.l4
-rw-r--r--epan/wslua/wslua_pinfo.c34
17 files changed, 269 insertions, 269 deletions
diff --git a/epan/diam_dict.l b/epan/diam_dict.l
index 7874112428..b9006fb890 100644
--- a/epan/diam_dict.l
+++ b/epan/diam_dict.l
@@ -567,14 +567,14 @@ static void append_to_buffer(char* txt, int len) {
}
static size_t file_input(char* buf, size_t max) {
- size_t read;
+ size_t read_cnt;
- read = fread(buf,1,max,yyin);
+ read_cnt = fread(buf,1,max,yyin);
- if ( read == max ) {
+ if ( read_cnt == max ) {
return max;
- } else if (read > 0) {
- return read;
+ } else if (read_cnt > 0) {
+ return read_cnt;
} else {
return YY_NULL;
}
diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c
index 3495485d9a..959e3a8430 100644
--- a/epan/dissectors/packet-dmp.c
+++ b/epan/dissectors/packet-dmp.c
@@ -1693,8 +1693,8 @@ static gchar *dissect_thales_ipm_id (tvbuff_t *tvb, gint offset, gint length, gi
if (length >= 6 && length <= 20 && modifier >= 0 && modifier <= 2) {
guint number = tvb_get_ntohs (tvb, offset + length - 6);
guint8 number_len = modifier + 2;
- time_t time = tvb_get_ntohl(tvb, offset + length - 4);
- struct tm *tmp = gmtime(&time);
+ time_t timev = tvb_get_ntohl(tvb, offset + length - 4);
+ struct tm *tmp = gmtime(&timev);
if (modifier == 1 && number >= 1024) {
/* The number is in the range 65536-99999 */
diff --git a/epan/dissectors/packet-epl.c b/epan/dissectors/packet-epl.c
index 994d34acfd..98c563d6ab 100644
--- a/epan/dissectors/packet-epl.c
+++ b/epan/dissectors/packet-epl.c
@@ -1567,8 +1567,8 @@ gint
dissect_epl_sdo_command_write_by_index(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 segmented, gboolean response)
{
gint size;
- guint16 index;
- guint8 subindex;
+ guint16 indx;
+ guint8 subindx;
guint32 val;
proto_item* item;
@@ -1576,23 +1576,23 @@ dissect_epl_sdo_command_write_by_index(proto_tree *epl_tree, tvbuff_t *tvb, pack
{ /* request */
if (segmented <= EPL_ASND_SDO_CMD_SEGMENTATION_INITIATE_TRANSFER)
{
- index = tvb_get_letohs(tvb, offset);
+ indx = tvb_get_letohs(tvb, offset);
if (epl_tree)
{
- proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_write_by_index_index, tvb, offset, 2, index);
+ proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_write_by_index_index, tvb, offset, 2, indx);
}
offset += 2;
- subindex = tvb_get_guint8(tvb, offset);
+ subindx = tvb_get_guint8(tvb, offset);
if (epl_tree)
{
- proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_write_by_index_subindex, tvb, offset, 1, subindex);
+ proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_write_by_index_subindex, tvb, offset, 1, subindx);
}
offset += 2;
if (check_col(pinfo->cinfo, COL_INFO))
{
- col_append_fstr(pinfo->cinfo, COL_INFO, "Write 0x%04X/%d", index, subindex);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Write 0x%04X/%d", indx, subindx);
}
}
else if (check_col(pinfo->cinfo, COL_INFO))
@@ -1636,30 +1636,30 @@ gint
dissect_epl_sdo_command_read_by_index(proto_tree *epl_tree, tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 segmented, gboolean response)
{
gint size;
- guint16 index;
- guint8 subindex;
+ guint16 indx;
+ guint8 subindx;
guint32 val;
proto_item* item;
if (!response)
{ /* request */
- index = tvb_get_letohs(tvb, offset);
+ indx = tvb_get_letohs(tvb, offset);
if (epl_tree)
{
- proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_read_by_index_index, tvb, offset, 2, index);
+ proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_read_by_index_index, tvb, offset, 2, indx);
}
offset += 2;
- subindex = tvb_get_guint8(tvb, offset);
+ subindx = tvb_get_guint8(tvb, offset);
if (epl_tree)
{
- proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_read_by_index_subindex, tvb, offset, 1, subindex);
+ proto_tree_add_uint(epl_tree, hf_epl_asnd_sdo_cmd_read_by_index_subindex, tvb, offset, 1, subindx);
}
offset += 1;
if (check_col(pinfo->cinfo, COL_INFO))
{
- col_append_fstr(pinfo->cinfo, COL_INFO, "Read 0x%04X/%d", index, subindex);
+ col_append_fstr(pinfo->cinfo, COL_INFO, "Read 0x%04X/%d", indx, subindx);
}
}
diff --git a/epan/dissectors/packet-gmhdr.c b/epan/dissectors/packet-gmhdr.c
index 51b3dccfbd..82083cbeba 100644
--- a/epan/dissectors/packet-gmhdr.c
+++ b/epan/dissectors/packet-gmhdr.c
@@ -222,7 +222,7 @@ dissect_gmtimestamp_trailer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
guint offset = 0;
guint32 orig_crc, new_crc, comp_crc;
guint16 port_num;
- nstime_t gmtime;
+ nstime_t gmtimev;
struct tm *tm = NULL;
@@ -251,12 +251,12 @@ dissect_gmtimestamp_trailer(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *t
offset += 4;
port_num = tvb_get_ntohs(tvb, offset);
offset += 2;
- gmtime.secs = tvb_get_ntohl(tvb, offset);
+ gmtimev.secs = tvb_get_ntohl(tvb, offset);
offset += 4;
- gmtime.nsecs = tvb_get_ntohl(tvb, offset);
+ gmtimev.nsecs = tvb_get_ntohl(tvb, offset);
- tm = localtime(&gmtime.secs);
- proto_item_append_text(ti, ", Port: %d, Timestamp: %d:%d:%d.%d", port_num, tm->tm_hour, tm->tm_min, tm->tm_sec, gmtime.nsecs);
+ tm = localtime(&gmtimev.secs);
+ proto_item_append_text(ti, ", Port: %d, Timestamp: %d:%d:%d.%d", port_num, tm->tm_hour, tm->tm_min, tm->tm_sec, gmtimev.nsecs);
}
offset = 0;
diff --git a/epan/dissectors/packet-ieee80211-prism.c b/epan/dissectors/packet-ieee80211-prism.c
index f7cbf137f3..9cb1a5fccc 100644
--- a/epan/dissectors/packet-ieee80211-prism.c
+++ b/epan/dissectors/packet-ieee80211-prism.c
@@ -269,7 +269,7 @@ dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset;
guint32 msgcode, msglen, did;
guint16 status;
- guint8 *devname;
+ guint8 *devname_p;
offset = 0;
did = 0;
@@ -324,10 +324,10 @@ dissect_prism(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(tree) {
proto_tree_add_item(prism_tree, hf_ieee80211_prism_devname, tvb, offset, 16, ENC_ASCII|ENC_NA);
}
- devname = tvb_get_ephemeral_string(tvb, offset, 16);
+ devname_p = tvb_get_ephemeral_string(tvb, offset, 16);
offset += 16;
- col_add_fstr(pinfo->cinfo, COL_INFO, "Device: %s, Message 0x%x, Length %d", devname, msgcode, msglen);
+ col_add_fstr(pinfo->cinfo, COL_INFO, "Device: %s, Message 0x%x, Length %d", devname_p, msgcode, msglen);
while(offset < PRISM_HEADER_LENGTH)
diff --git a/epan/dissectors/packet-mysql.c b/epan/dissectors/packet-mysql.c
index 49459faae6..8f941fa8f5 100644
--- a/epan/dissectors/packet-mysql.c
+++ b/epan/dissectors/packet-mysql.c
@@ -826,7 +826,7 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
gint protocol;
- gint strlen;
+ gint lenstr;
int ver_offset;
proto_item *tf;
@@ -853,27 +853,27 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset,
offset += 1;
/* version string */
- strlen = tvb_strsize(tvb,offset);
+ lenstr = tvb_strsize(tvb,offset);
if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, " version=%s", tvb_get_ephemeral_string(tvb, offset, strlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " version=%s", tvb_get_ephemeral_string(tvb, offset, lenstr));
}
- proto_tree_add_item(greeting_tree, hf_mysql_version, tvb, offset, strlen, ENC_ASCII|ENC_NA);
+ proto_tree_add_item(greeting_tree, hf_mysql_version, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
conn_data->major_version = 0;
- for (ver_offset = 0; ver_offset < strlen; ver_offset++) {
+ for (ver_offset = 0; ver_offset < lenstr; ver_offset++) {
guint8 ver_char = tvb_get_guint8(tvb, offset + ver_offset);
if (ver_char == '.') break;
conn_data->major_version = conn_data->major_version * 10 + ver_char - '0';
}
- offset += strlen;
+ offset += lenstr;
/* 4 bytes little endian thread_id */
proto_tree_add_item(greeting_tree, hf_mysql_thread_id, tvb, offset, 4, ENC_LITTLE_ENDIAN);
offset += 4;
/* salt string */
- strlen = tvb_strsize(tvb,offset);
- proto_tree_add_item(greeting_tree, hf_mysql_salt, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = tvb_strsize(tvb,offset);
+ proto_tree_add_item(greeting_tree, hf_mysql_salt, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
/* rest is optional */
if (!tvb_reported_length_remaining(tvb, offset)) return offset;
@@ -895,9 +895,9 @@ mysql_dissect_greeting(tvbuff_t *tvb, packet_info *pinfo, int offset,
/* 4.1+ server: rest of salt */
if (tvb_reported_length_remaining(tvb, offset)) {
- strlen = tvb_strsize(tvb,offset);
- proto_tree_add_item(greeting_tree, hf_mysql_salt2, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = tvb_strsize(tvb,offset);
+ proto_tree_add_item(greeting_tree, hf_mysql_salt2, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
}
return offset;
@@ -908,7 +908,7 @@ static int
mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
- gint strlen;
+ gint lenstr;
proto_item *tf;
proto_item *login_tree= NULL;
@@ -941,41 +941,41 @@ mysql_dissect_login(tvbuff_t *tvb, packet_info *pinfo, int offset,
}
/* User name */
- strlen = my_tvb_strsize(tvb, offset);
+ lenstr = my_tvb_strsize(tvb, offset);
if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, " user=%s", tvb_get_ephemeral_string(tvb, offset, strlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " user=%s", tvb_get_ephemeral_string(tvb, offset, lenstr));
}
- proto_tree_add_item(login_tree, hf_mysql_user, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ proto_tree_add_item(login_tree, hf_mysql_user, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
/* rest is optional */
if (!tvb_reported_length_remaining(tvb, offset)) return offset;
/* password: asciiz or length+ascii */
if (conn_data->clnt_caps & MYSQL_CAPS_SC) {
- strlen = tvb_get_guint8(tvb, offset);
+ lenstr = tvb_get_guint8(tvb, offset);
offset += 1;
} else {
- strlen = my_tvb_strsize(tvb, offset);
+ lenstr = my_tvb_strsize(tvb, offset);
}
- if (tree && strlen > 1) {
- proto_tree_add_item(login_tree, hf_mysql_passwd, tvb, offset, strlen, ENC_NA);
+ if (tree && lenstr > 1) {
+ proto_tree_add_item(login_tree, hf_mysql_passwd, tvb, offset, lenstr, ENC_NA);
}
- offset += strlen;
+ offset += lenstr;
/* optional: initial schema */
if (conn_data->clnt_caps & MYSQL_CAPS_CD)
{
- strlen= my_tvb_strsize(tvb,offset);
- if(strlen<0){
+ lenstr= my_tvb_strsize(tvb,offset);
+ if(lenstr<0){
return offset;
}
if (check_col(pinfo->cinfo, COL_INFO)) {
- col_append_fstr(pinfo->cinfo, COL_INFO, " db=%s", tvb_get_ephemeral_string(tvb, offset, strlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " db=%s", tvb_get_ephemeral_string(tvb, offset, lenstr));
}
- proto_tree_add_item(login_tree, hf_mysql_schema, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ proto_tree_add_item(login_tree, hf_mysql_schema, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
}
return offset;
@@ -1169,7 +1169,7 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
gint opcode;
- gint strlen;
+ gint lenstr;
proto_item *tf = NULL, *ti;
proto_item *req_tree = NULL;
guint32 stmt_id;
@@ -1211,27 +1211,27 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
case MYSQL_INIT_DB:
case MYSQL_CREATE_DB:
case MYSQL_DROP_DB:
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_schema, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_schema, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
conn_data->state = RESPONSE_OK;
break;
case MYSQL_QUERY:
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_query, tvb, offset, strlen, ENC_ASCII|ENC_NA);
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_query, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
if (mysql_showquery) {
if (check_col(pinfo->cinfo, COL_INFO))
- col_append_fstr(pinfo->cinfo, COL_INFO, " { %s } ", tvb_get_ephemeral_string(tvb, offset, strlen));
+ col_append_fstr(pinfo->cinfo, COL_INFO, " { %s } ", tvb_get_ephemeral_string(tvb, offset, lenstr));
}
- offset += strlen;
+ offset += lenstr;
conn_data->state = RESPONSE_TABULAR;
break;
case MYSQL_STMT_PREPARE:
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_query, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_query, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
conn_data->state = RESPONSE_PREPARE;
break;
@@ -1248,9 +1248,9 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
break;
case MYSQL_FIELD_LIST:
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_table_name, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_table_name, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
conn_data->state = RESPONSE_SHOW_FIELDS;
break;
@@ -1261,17 +1261,17 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
break;
case MYSQL_CHANGE_USER:
- strlen = tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_user, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_user, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
- strlen = tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_passwd, tvb, offset, strlen, ENC_NA);
- offset += strlen;
+ lenstr = tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_passwd, tvb, offset, lenstr, ENC_NA);
+ offset += lenstr;
- strlen = my_tvb_strsize(tvb, offset);
- proto_tree_add_item(req_tree, hf_mysql_schema, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = my_tvb_strsize(tvb, offset);
+ proto_tree_add_item(req_tree, hf_mysql_schema, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
conn_data->state= RESPONSE_OK;
break;
@@ -1335,11 +1335,11 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
offset += 2;
/* rest is data */
- strlen = tvb_reported_length_remaining(tvb, offset);
- if (tree && strlen > 0) {
- proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, strlen, ENC_NA);
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ if (tree && lenstr > 0) {
+ proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, lenstr, ENC_NA);
}
- offset += strlen;
+ offset += lenstr;
conn_data->state = REQUEST;
break;
@@ -1377,23 +1377,23 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
}
}
} else {
- strlen = tvb_reported_length_remaining(tvb, offset);
- if (tree && strlen > 0) {
- ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, strlen, ENC_NA);
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ if (tree && lenstr > 0) {
+ ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, lenstr, ENC_NA);
expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN,
"PREPARE Response packet is needed to dissect the payload");
}
- offset += strlen;
+ offset += lenstr;
}
#if 0
/* FIXME: rest needs metadata about statement */
#else
- strlen = tvb_reported_length_remaining(tvb, offset);
- if (tree && strlen > 0) {
- ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, strlen, ENC_NA);
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ if (tree && lenstr > 0) {
+ ti = proto_tree_add_item(req_tree, hf_mysql_payload, tvb, offset, lenstr, ENC_NA);
expert_add_info_format(pinfo, ti, PI_UNDECODED, PI_WARN, "FIXME: execute dissector incomplete");
}
- offset += strlen;
+ offset += lenstr;
#endif
conn_data->state= RESPONSE_TABULAR;
break;
@@ -1409,11 +1409,11 @@ mysql_dissect_request(tvbuff_t *tvb,packet_info *pinfo, int offset,
offset += 4;
/* binlog file name ? */
- strlen = tvb_reported_length_remaining(tvb, offset);
- if (tree && strlen > 0) {
- proto_tree_add_item(req_tree, hf_mysql_binlog_file_name, tvb, offset, strlen, ENC_ASCII|ENC_NA);
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ if (tree && lenstr > 0) {
+ proto_tree_add_item(req_tree, hf_mysql_binlog_file_name, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
}
- offset += strlen;
+ offset += lenstr;
conn_data->state = REQUEST;
break;
@@ -1443,7 +1443,7 @@ mysql_dissect_response(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
gint response_code;
- gint strlen;
+ gint lenstr;
gint server_status = 0;
proto_item *ti;
@@ -1504,9 +1504,9 @@ mysql_dissect_response(tvbuff_t *tvb, packet_info *pinfo, int offset,
else {
switch (conn_data->state) {
case RESPONSE_MESSAGE:
- if ((strlen = tvb_reported_length_remaining(tvb, offset))) {
- proto_tree_add_item(tree, hf_mysql_message, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ if ((lenstr = tvb_reported_length_remaining(tvb, offset))) {
+ proto_tree_add_item(tree, hf_mysql_message, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
}
conn_data->state = REQUEST;
break;
@@ -1570,7 +1570,7 @@ static int
mysql_dissect_ok_packet(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *tree, mysql_conn_data_t *conn_data)
{
- gint strlen;
+ gint lenstr;
guint64 affected_rows;
guint64 insert_id;
int fle;
@@ -1599,9 +1599,9 @@ mysql_dissect_ok_packet(tvbuff_t *tvb, packet_info *pinfo, int offset,
/* optional: message string */
if (tvb_reported_length_remaining(tvb, offset) > 0) {
- strlen = tvb_reported_length_remaining(tvb, offset);
- proto_tree_add_item(tree, hf_mysql_message, tvb, offset, strlen, ENC_ASCII|ENC_NA);
- offset += strlen;
+ lenstr = tvb_reported_length_remaining(tvb, offset);
+ proto_tree_add_item(tree, hf_mysql_message, tvb, offset, lenstr, ENC_ASCII|ENC_NA);
+ offset += lenstr;
}
conn_data->state = REQUEST;
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index b957c120a7..cc832a2e06 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -551,25 +551,25 @@ radius_decrypt_avp(gchar *dest,int dest_len,tvbuff_t *tvb,int offset,int length)
void radius_integer(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
- guint32 uint;
+ guint32 uintv;
switch (len) {
case 1:
- uint = tvb_get_guint8(tvb,offset);
+ uintv = tvb_get_guint8(tvb,offset);
break;
case 2:
- uint = tvb_get_ntohs(tvb,offset);
+ uintv = tvb_get_ntohs(tvb,offset);
break;
case 3:
- uint = tvb_get_ntoh24(tvb,offset);
+ uintv = tvb_get_ntoh24(tvb,offset);
break;
case 4:
- uint = tvb_get_ntohl(tvb,offset);
+ uintv = tvb_get_ntohl(tvb,offset);
break;
case 8: {
- guint64 uint64 = tvb_get_ntoh64(tvb,offset);
- proto_tree_add_uint64(tree,a->hf_alt,tvb,offset,len,uint64);
- proto_item_append_text(avp_item, "%" G_GINT64_MODIFIER "u", uint64);
+ guint64 uintv64 = tvb_get_ntoh64(tvb,offset);
+ proto_tree_add_uint64(tree,a->hf_alt,tvb,offset,len,uintv64);
+ proto_item_append_text(avp_item, "%" G_GINT64_MODIFIER "u", uintv64);
return;
}
default:
@@ -579,32 +579,32 @@ void radius_integer(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo
proto_tree_add_item(tree,a->hf,tvb, offset, len, ENC_BIG_ENDIAN);
if (a->vs) {
- proto_item_append_text(avp_item, "%s(%u)", val_to_str_const(uint, a->vs, "Unknown"),uint);
+ proto_item_append_text(avp_item, "%s(%u)", val_to_str_const(uintv, a->vs, "Unknown"),uintv);
} else {
- proto_item_append_text(avp_item, "%u", uint);
+ proto_item_append_text(avp_item, "%u", uintv);
}
}
void radius_signed(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _U_, tvbuff_t* tvb, int offset, int len, proto_item* avp_item) {
- guint32 uint;
+ guint32 uintv;
switch (len) {
case 1:
- uint = tvb_get_guint8(tvb,offset);
+ uintv = tvb_get_guint8(tvb,offset);
break;
case 2:
- uint = tvb_get_ntohs(tvb,offset);
+ uintv = tvb_get_ntohs(tvb,offset);
break;
case 3:
- uint = tvb_get_ntoh24(tvb,offset);
+ uintv = tvb_get_ntoh24(tvb,offset);
break;
case 4:
- uint = tvb_get_ntohl(tvb,offset);
+ uintv = tvb_get_ntohl(tvb,offset);
break;
case 8: {
- guint64 uint64 = tvb_get_ntoh64(tvb,offset);
- proto_tree_add_int64(tree,a->hf_alt,tvb,offset,len,uint64);
- proto_item_append_text(avp_item, "%" G_GINT64_MODIFIER "u", uint64);
+ guint64 uintv64 = tvb_get_ntoh64(tvb,offset);
+ proto_tree_add_int64(tree,a->hf_alt,tvb,offset,len,uintv64);
+ proto_item_append_text(avp_item, "%" G_GINT64_MODIFIER "u", uintv64);
return;
}
default:
@@ -612,12 +612,12 @@ void radius_signed(radius_attr_info_t* a, proto_tree* tree, packet_info *pinfo _
return;
}
- proto_tree_add_int(tree,a->hf,tvb,offset,len,uint);
+ proto_tree_add_int(tree,a->hf,tvb,offset,len,uintv);
if (a->vs) {
- proto_item_append_text(avp_item, "%s(%d)", val_to_str_const(uint, a->vs, "Unknown"),uint);
+ proto_item_append_text(avp_item, "%s(%d)", val_to_str_const(uintv, a->vs, "Unknown"),uintv);
} else {
- proto_item_append_text(avp_item, "%d", uint);
+ proto_item_append_text(avp_item, "%d", uintv);
}
}
diff --git a/epan/dissectors/packet-reload-framing.c b/epan/dissectors/packet-reload-framing.c
index 2ca74a9254..2e659dceeb 100644
--- a/epan/dissectors/packet-reload-framing.c
+++ b/epan/dissectors/packet-reload-framing.c
@@ -347,23 +347,23 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
{
guint32 received;
int last_received = -1;
- int index = 0;
+ int indx = 0;
proto_tree *received_tree;
proto_item *ti_parsed_received = NULL;
received = tvb_get_ntohl(tvb, offset);
- while ((received<<index) != 0) {
- if (index>=32) break;
- if (received &(0x1<<(31-index))) {
- if (index==0) {
+ while ((received<<indx) != 0) {
+ if (indx>=32) break;
+ if (received &(0x1<<(31-indx))) {
+ if (indx==0) {
received_tree = proto_item_add_subtree(ti_received, ett_reload_framing_received);
ti_parsed_received = proto_tree_add_item(received_tree, hf_reload_framing_parsed_received, tvb, offset, 4, ENC_NA);
- proto_item_append_text(ti_parsed_received, "[%u", (sequence -32+index));
- last_received = index;
+ proto_item_append_text(ti_parsed_received, "[%u", (sequence -32+indx));
+ last_received = indx;
}
else {
- if (received &(0x1<<(31-index+1))) {
- index++;
+ if (received &(0x1<<(31-indx+1))) {
+ indx++;
/* range: skip */
continue;
}
@@ -373,43 +373,43 @@ dissect_reload_framing_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
/* 1st acked ever */
received_tree = proto_item_add_subtree(ti_received, ett_reload_framing_received);
ti_parsed_received = proto_tree_add_item(received_tree, hf_reload_framing_parsed_received, tvb, offset, 4, ENC_NA);
- proto_item_append_text(ti_parsed_received, "[%u",(sequence-32+index));
+ proto_item_append_text(ti_parsed_received, "[%u",(sequence-32+indx));
}
else {
- proto_item_append_text(ti_parsed_received, ",%u",(sequence-32+index));
+ proto_item_append_text(ti_parsed_received, ",%u",(sequence-32+indx));
}
- last_received = index;
+ last_received = indx;
}
}
}
- else if (index>0) {
- if ((received &(0x1<<(31-index+1))) && (received &(0x1<<(31-index+2)))) {
+ else if (indx>0) {
+ if ((received &(0x1<<(31-indx+1))) && (received &(0x1<<(31-indx+2)))) {
/* end of a series */
- if ((received &(0x1<<(31-index+3)))) {
- proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+index-1));
+ if ((received &(0x1<<(31-indx+3)))) {
+ proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+indx-1));
}
else {
/* just a pair */
- proto_item_append_text(ti_received, ",%u", (sequence-32+index-1));
+ proto_item_append_text(ti_received, ",%u", (sequence-32+indx-1));
}
}
else {
- index++;
+ indx++;
continue;
}
}
- index++;
+ indx++;
}
if (last_received>=0) {
- if ((received &(0x1<<(31-index+1))) && (received &(0x1<<(31-index+2)))) {
+ if ((received &(0x1<<(31-indx+1))) && (received &(0x1<<(31-indx+2)))) {
/* end of a series */
- if ((received &(0x1<<(31-index+3)))) {
- proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+index-1));
+ if ((received &(0x1<<(31-indx+3)))) {
+ proto_item_append_text(ti_parsed_received,"-%u",(sequence-32+indx-1));
}
else {
/* just a pair */
- proto_item_append_text(ti_parsed_received, ",%u", (sequence-32+index-1));
+ proto_item_append_text(ti_parsed_received, ",%u", (sequence-32+indx-1));
}
}
proto_item_append_text(ti_parsed_received, "]");
diff --git a/epan/dissectors/packet-reload.c b/epan/dissectors/packet-reload.c
index 7a662d108c..4ee8469f4c 100644
--- a/epan/dissectors/packet-reload.c
+++ b/epan/dissectors/packet-reload.c
@@ -3528,14 +3528,14 @@ extern gint dissect_reload_messagecontents(tvbuff_t *tvb, packet_info *pinfo, pr
local_tree = proto_item_add_subtree(ti_local, ett_reload_pingans);
proto_tree_add_item(local_tree, hf_reload_ping_response_id, tvb, offset, 8, ENC_BIG_ENDIAN);
{
- guint64 time;
+ guint64 timev;
guint32 remaining_ms;
time_t time_sec;
nstime_t l_nsTime;
- time = tvb_get_ntoh64(tvb, offset+8);
- time_sec = (time_t)time/1000;
- remaining_ms = (guint32)(time % 1000);
+ timev = tvb_get_ntoh64(tvb, offset+8);
+ time_sec = (time_t)timev/1000;
+ remaining_ms = (guint32)(timev % 1000);
l_nsTime.secs = time_sec;
l_nsTime.nsecs = remaining_ms*1000*1000;
diff --git a/epan/dissectors/packet-rlc.c b/epan/dissectors/packet-rlc.c
index 587d160dc4..fab75c4da4 100644
--- a/epan/dissectors/packet-rlc.c
+++ b/epan/dissectors/packet-rlc.c
@@ -1401,7 +1401,7 @@ rlc_decipher_tvb(tvbuff_t *tvb, packet_info *pinfo, guint32 counter, guint8 rbid
for(i = 0; i< tvb_length(tvb)-header_size; i++ ){
out[i+header_size] = tvb_get_guint8(tvb, header_size+i);
}
- /*Call KASUMI confidentiality function, note that rbid is zero indexed*/
+ /*Call KASUMI confidentiality function, note that rbid is zero indxed*/
f8( key_in, counter, rbid-1, dir, &out[header_size], (tvb_length(tvb)-header_size)*8 );
/*Restore header in tvb*/
@@ -1459,10 +1459,10 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
rlc_info * rlcinf, guint16 seq, enum rlc_mode mode)
{
rrc_ciphering_info * c_inf;
- guint8 index, header_size, hfn_shift;
+ guint8 indx, header_size, hfn_shift;
gint16 pos;
- index = fpinf->is_uplink ? 1 : 0;
+ indx = fpinf->is_uplink ? 1 : 0;
pos = fpinf->cur_tb;
if (mode ==RLC_UM) {
header_size = 1;
@@ -1477,13 +1477,13 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
/*TODO: This doesnt really work for all packets..*/
/*Check if we have ciphering info and that this frame is ciphered*/
- if(c_inf!=NULL && ( (c_inf->setup_frame > 0 && c_inf->setup_frame < pinfo->fd->num && c_inf->seq_no[rlcinf->rbid[pos]][index] == -1) ||
- (c_inf->setup_frame < pinfo->fd->num && c_inf->seq_no[rlcinf->rbid[pos]][index] >= 0 && c_inf->seq_no[rlcinf->rbid[pos]][index] <= seq) )){
+ if(c_inf!=NULL && ( (c_inf->setup_frame > 0 && c_inf->setup_frame < pinfo->fd->num && c_inf->seq_no[rlcinf->rbid[pos]][indx] == -1) ||
+ (c_inf->setup_frame < pinfo->fd->num && c_inf->seq_no[rlcinf->rbid[pos]][indx] >= 0 && c_inf->seq_no[rlcinf->rbid[pos]][indx] <= seq) )){
tvbuff_t *t;
/*Check if this counter has been initialized*/
- if(!counter_init[rlcinf->rbid[pos]][index] ){
+ if(!counter_init[rlcinf->rbid[pos]][indx] ){
guint32 frame_num = pinfo->fd->num;
/*Initializes counter*/
@@ -1493,7 +1493,7 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
g_tree_foreach(c_inf->start_ps, (GTraverseFunc)iter_same, &frame_num);
/*Set COUNTER value accordingly as specified by 6.4.8 in 3GPP TS 33.102 */
- if(max_counter +2 > frame_num && c_inf->seq_no[rlcinf->rbid[pos]][index] == -1){
+ if(max_counter +2 > frame_num && c_inf->seq_no[rlcinf->rbid[pos]][indx] == -1){
ps_counter[rlcinf->rbid[pos]][0] = (max_counter+2) << hfn_shift;
ps_counter[rlcinf->rbid[pos]][1] = (max_counter+2) << hfn_shift;
}else{
@@ -1512,7 +1512,7 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
}
/*Update the maximal COUNTER value seen so far*/
- max_counter = MAX(max_counter,((ps_counter[rlcinf->rbid[pos]][index]) | seq) >> hfn_shift);
+ max_counter = MAX(max_counter,((ps_counter[rlcinf->rbid[pos]][indx]) | seq) >> hfn_shift);
/*XXX:Since RBID in umts isnt configured properly..*/
if(rlcinf->rbid[pos] == 9 ){
@@ -1522,9 +1522,9 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
frame_num[0] = pinfo->fd->num;
/*Find the correct counter value*/
g_tree_foreach(counter_map, (GTraverseFunc)rlc_find_old_counter, &frame_num[0]);
- t = rlc_decipher_tvb(tvb, pinfo, (frame_num[index+1] | seq),16,!fpinf->is_uplink,header_size);
+ t = rlc_decipher_tvb(tvb, pinfo, (frame_num[indx+1] | seq),16,!fpinf->is_uplink,header_size);
}else{
- t = rlc_decipher_tvb(tvb, pinfo, ((ps_counter[rlcinf->rbid[pos]][index]) | seq),16,!fpinf->is_uplink,header_size);
+ t = rlc_decipher_tvb(tvb, pinfo, ((ps_counter[rlcinf->rbid[pos]][indx]) | seq),16,!fpinf->is_uplink,header_size);
}
}else{
if(tree){
@@ -1532,15 +1532,15 @@ rlc_decipher(tvbuff_t *tvb, packet_info * pinfo, proto_tree * tree, fp_info * fp
guint32 frame_num[3];
frame_num[0] = pinfo->fd->num;
g_tree_foreach(counter_map, (GTraverseFunc)rlc_find_old_counter, &frame_num[0]);
- t = rlc_decipher_tvb(tvb, pinfo, (frame_num[index+1] | seq),rlcinf->rbid[pos],!fpinf->is_uplink,header_size);
+ t = rlc_decipher_tvb(tvb, pinfo, (frame_num[indx+1] | seq),rlcinf->rbid[pos],!fpinf->is_uplink,header_size);
}else
- t = rlc_decipher_tvb(tvb, pinfo, ((ps_counter[rlcinf->rbid[pos]][index]) | seq),rlcinf->rbid[pos],!fpinf->is_uplink,header_size);
+ t = rlc_decipher_tvb(tvb, pinfo, ((ps_counter[rlcinf->rbid[pos]][indx]) | seq),rlcinf->rbid[pos],!fpinf->is_uplink,header_size);
}
/*Update the hyperframe number*/
if(seq == 4095){
- ps_counter[rlcinf->rbid[pos]][index] += 1 << hfn_shift;
+ ps_counter[rlcinf->rbid[pos]][indx] += 1 << hfn_shift;
if(!tree){/*Preserve counter for second packet analysis run*/
guint32 * ciph;
diff --git a/epan/dissectors/packet-sbus.c b/epan/dissectors/packet-sbus.c
index 9c472fe1b3..4904574ae6 100644
--- a/epan/dissectors/packet-sbus.c
+++ b/epan/dissectors/packet-sbus.c
@@ -549,11 +549,11 @@ static GHashTable *sbus_request_hash = NULL;
static guint crc_calc (guint crc, guint val)
{
- int index;
+ int indx;
guint ncrc;
- index = (((crc >> 8) ^ val) & 0xff);
- ncrc = crc_table[index] ^ ((crc << 8) & 0xffff);
+ indx = (((crc >> 8) ^ val) & 0xff);
+ ncrc = crc_table[indx] ^ ((crc << 8) & 0xffff);
return ncrc;
}
diff --git a/epan/dissectors/packet-sna.c b/epan/dissectors/packet-sna.c
index 76c785473e..111d6dfb8d 100644
--- a/epan/dissectors/packet-sna.c
+++ b/epan/dissectors/packet-sna.c
@@ -1197,15 +1197,15 @@ dissect_nlp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item *nlp_item, *bf_item;
guint8 nhdr_0, nhdr_1, nhdr_x, thdr_8, thdr_9, fid;
guint32 thdr_len, thdr_dlf;
- guint16 subindex;
+ guint16 subindx;
- int index = 0, counter = 0;
+ int indx = 0, counter = 0;
nlp_tree = NULL;
nlp_item = NULL;
- nhdr_0 = tvb_get_guint8(tvb, index);
- nhdr_1 = tvb_get_guint8(tvb, index+1);
+ nhdr_0 = tvb_get_guint8(tvb, indx);
+ nhdr_1 = tvb_get_guint8(tvb, indx+1);
col_set_str(pinfo->cinfo, COL_INFO, "HPR NLP Packet");
@@ -1213,177 +1213,177 @@ dissect_nlp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Don't bother setting length. We'll set it later after we
* find the lengths of NHDR */
nlp_item = proto_tree_add_item(tree, hf_sna_nlp_nhdr, tvb,
- index, -1, ENC_NA);
+ indx, -1, ENC_NA);
nlp_tree = proto_item_add_subtree(nlp_item, ett_sna_nlp_nhdr);
bf_item = proto_tree_add_uint(nlp_tree, hf_sna_nlp_nhdr_0, tvb,
- index, 1, nhdr_0);
+ indx, 1, nhdr_0);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_nlp_nhdr_0);
- proto_tree_add_uint(bf_tree, hf_sna_nlp_sm, tvb, index, 1,
+ proto_tree_add_uint(bf_tree, hf_sna_nlp_sm, tvb, indx, 1,
nhdr_0);
- proto_tree_add_uint(bf_tree, hf_sna_nlp_tpf, tvb, index, 1,
+ proto_tree_add_uint(bf_tree, hf_sna_nlp_tpf, tvb, indx, 1,
nhdr_0);
bf_item = proto_tree_add_uint(nlp_tree, hf_sna_nlp_nhdr_1, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_nlp_nhdr_1);
proto_tree_add_uint(bf_tree, hf_sna_nlp_ft, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_tspi, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_slowdn1, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_slowdn2, tvb,
- index+1, 1, nhdr_1);
+ indx+1, 1, nhdr_1);
}
/* ANR or FR lists */
- index += 2;
+ indx += 2;
counter = 0;
if ((nhdr_0 & 0xe0) == 0xa0) {
do {
- nhdr_x = tvb_get_guint8(tvb, index + counter);
+ nhdr_x = tvb_get_guint8(tvb, indx + counter);
counter ++;
} while (nhdr_x != 0xff);
if (tree)
proto_tree_add_item(nlp_tree,
- hf_sna_nlp_fra, tvb, index, counter, ENC_NA);
- index += counter;
+ hf_sna_nlp_fra, tvb, indx, counter, ENC_NA);
+ indx += counter;
if (tree)
- proto_tree_add_text(nlp_tree, tvb, index, 1,
+ proto_tree_add_text(nlp_tree, tvb, indx, 1,
"Reserved");
- index++;
+ indx++;
if (tree)
- proto_item_set_len(nlp_item, index);
+ proto_item_set_len(nlp_item, indx);
if ((nhdr_1 & 0xf0) == 0x10) {
- nhdr_x = tvb_get_guint8(tvb, index);
+ nhdr_x = tvb_get_guint8(tvb, indx);
if (tree)
proto_tree_add_uint(tree, hf_sna_nlp_frh,
- tvb, index, 1, nhdr_x);
- index ++;
+ tvb, indx, 1, nhdr_x);
+ indx ++;
- if (tvb_offset_exists(tvb, index))
+ if (tvb_offset_exists(tvb, indx))
call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, index),
+ tvb_new_subset_remaining(tvb, indx),
pinfo, parent_tree);
return;
}
}
if ((nhdr_0 & 0xe0) == 0xc0) {
do {
- nhdr_x = tvb_get_guint8(tvb, index + counter);
+ nhdr_x = tvb_get_guint8(tvb, indx + counter);
counter ++;
} while (nhdr_x != 0xff);
if (tree)
proto_tree_add_item(nlp_tree, hf_sna_nlp_anr,
- tvb, index, counter, ENC_NA);
- index += counter;
+ tvb, indx, counter, ENC_NA);
+ indx += counter;
if (tree)
- proto_tree_add_text(nlp_tree, tvb, index, 1,
+ proto_tree_add_text(nlp_tree, tvb, indx, 1,
"Reserved");
- index++;
+ indx++;
if (tree)
- proto_item_set_len(nlp_item, index);
+ proto_item_set_len(nlp_item, indx);
}
- thdr_8 = tvb_get_guint8(tvb, index+8);
- thdr_9 = tvb_get_guint8(tvb, index+9);
- thdr_len = tvb_get_ntohs(tvb, index+10);
- thdr_dlf = tvb_get_ntohl(tvb, index+12);
+ thdr_8 = tvb_get_guint8(tvb, indx+8);
+ thdr_9 = tvb_get_guint8(tvb, indx+9);
+ thdr_len = tvb_get_ntohs(tvb, indx+10);
+ thdr_dlf = tvb_get_ntohl(tvb, indx+12);
if (tree) {
nlp_item = proto_tree_add_item(tree, hf_sna_nlp_thdr, tvb,
- index, thdr_len << 2, ENC_NA);
+ indx, thdr_len << 2, ENC_NA);
nlp_tree = proto_item_add_subtree(nlp_item, ett_sna_nlp_thdr);
proto_tree_add_item(nlp_tree, hf_sna_nlp_tcid, tvb,
- index, 8, ENC_NA);
+ indx, 8, ENC_NA);
bf_item = proto_tree_add_uint(nlp_tree, hf_sna_nlp_thdr_8, tvb,
- index+8, 1, thdr_8);
+ indx+8, 1, thdr_8);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_nlp_thdr_8);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_setupi, tvb,
- index+8, 1, thdr_8);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_somi, tvb, index+8,
+ indx+8, 1, thdr_8);
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_somi, tvb, indx+8,
1, thdr_8);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_eomi, tvb, index+8,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_eomi, tvb, indx+8,
1, thdr_8);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_sri, tvb, index+8,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_sri, tvb, indx+8,
1, thdr_8);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_rasapi, tvb,
- index+8, 1, thdr_8);
+ indx+8, 1, thdr_8);
proto_tree_add_boolean(bf_tree, hf_sna_nlp_retryi, tvb,
- index+8, 1, thdr_8);
+ indx+8, 1, thdr_8);
bf_item = proto_tree_add_uint(nlp_tree, hf_sna_nlp_thdr_9, tvb,
- index+9, 1, thdr_9);
+ indx+9, 1, thdr_9);
bf_tree = proto_item_add_subtree(bf_item, ett_sna_nlp_thdr_9);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_lmi, tvb, index+9,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_lmi, tvb, indx+9,
1, thdr_9);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_cqfi, tvb, index+9,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_cqfi, tvb, indx+9,
1, thdr_9);
- proto_tree_add_boolean(bf_tree, hf_sna_nlp_osi, tvb, index+9,
+ proto_tree_add_boolean(bf_tree, hf_sna_nlp_osi, tvb, indx+9,
1, thdr_9);
- proto_tree_add_uint(nlp_tree, hf_sna_nlp_offset, tvb, index+10,
+ proto_tree_add_uint(nlp_tree, hf_sna_nlp_offset, tvb, indx+10,
2, thdr_len);
- proto_tree_add_uint(nlp_tree, hf_sna_nlp_dlf, tvb, index+12,
+ proto_tree_add_uint(nlp_tree, hf_sna_nlp_dlf, tvb, indx+12,
4, thdr_dlf);
- proto_tree_add_item(nlp_tree, hf_sna_nlp_bsn, tvb, index+16,
+ proto_tree_add_item(nlp_tree, hf_sna_nlp_bsn, tvb, indx+16,
4, ENC_BIG_ENDIAN);
}
- subindex = 20;
+ subindx = 20;
- if (((thdr_9 & 0x18) == 0x08) && ((thdr_len << 2) > subindex)) {
- counter = tvb_get_guint8(tvb, index + subindex);
- if (tvb_get_guint8(tvb, index+subindex+1) == 5)
- dissect_control(tvb, index + subindex, counter+2, nlp_tree, 1, LT);
+ if (((thdr_9 & 0x18) == 0x08) && ((thdr_len << 2) > subindx)) {
+ counter = tvb_get_guint8(tvb, indx + subindx);
+ if (tvb_get_guint8(tvb, indx+subindx+1) == 5)
+ dissect_control(tvb, indx + subindx, counter+2, nlp_tree, 1, LT);
else
call_dissector(data_handle,
- tvb_new_subset(tvb, index + subindex, counter+2,
+ tvb_new_subset(tvb, indx + subindx, counter+2,
-1), pinfo, nlp_tree);
- subindex += (counter+2);
+ subindx += (counter+2);
}
- if ((thdr_9 & 0x04) && ((thdr_len << 2) > subindex))
+ if ((thdr_9 & 0x04) && ((thdr_len << 2) > subindx))
dissect_optional(
- tvb_new_subset(tvb, index + subindex,
- (thdr_len << 2) - subindex, -1),
+ tvb_new_subset(tvb, indx + subindx,
+ (thdr_len << 2) - subindx, -1),
pinfo, nlp_tree);
- index += (thdr_len << 2);
+ indx += (thdr_len << 2);
if (((thdr_8 & 0x20) == 0) && thdr_dlf) {
col_set_str(pinfo->cinfo, COL_INFO, "HPR Fragment");
- if (tvb_offset_exists(tvb, index)) {
+ if (tvb_offset_exists(tvb, indx)) {
call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, index), pinfo,
+ tvb_new_subset_remaining(tvb, indx), pinfo,
parent_tree);
}
return;
}
- if (tvb_offset_exists(tvb, index)) {
+ if (tvb_offset_exists(tvb, indx)) {
/* Transmission Header Format Identifier */
- fid = hi_nibble(tvb_get_guint8(tvb, index));
+ fid = hi_nibble(tvb_get_guint8(tvb, indx));
if (fid == 5) /* Only FID5 allowed for HPR */
- dissect_fid(tvb_new_subset_remaining(tvb, index), pinfo,
+ dissect_fid(tvb_new_subset_remaining(tvb, indx), pinfo,
tree, parent_tree);
else {
- if (tvb_get_ntohs(tvb, index+2) == 0x12ce) {
+ if (tvb_get_ntohs(tvb, indx+2) == 0x12ce) {
/* Route Setup */
col_set_str(pinfo->cinfo, COL_INFO, "HPR Route Setup");
- dissect_gds(tvb_new_subset_remaining(tvb, index),
+ dissect_gds(tvb_new_subset_remaining(tvb, indx),
pinfo, tree, parent_tree);
} else
call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, index),
+ tvb_new_subset_remaining(tvb, indx),
pinfo, parent_tree);
}
}
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index ba4ec1619d..05ab2f9ea8 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -2603,7 +2603,7 @@ dissect_tcpopt_mptcp(const ip_tcp_opt *optp _U_, tvbuff_t *tvb,
proto_tree *mptcp_flags_tree;
guint8 subtype;
- guint8 index;
+ guint8 indx;
guint8 flags;
guint8 ipver;
@@ -2710,7 +2710,7 @@ dissect_tcpopt_mptcp(const ip_tcp_opt *optp _U_, tvbuff_t *tvb,
case 24:
offset += 2;
- for (index = 0; index < 5; index++) {
+ for (indx = 0; indx < 5; indx++) {
proto_tree_add_item(mptcp_tree,
hf_tcp_option_mptcp_sender_mac, tvb, offset,
4, ENC_BIG_ENDIAN);
diff --git a/epan/dissectors/packet-xmpp.c b/epan/dissectors/packet-xmpp.c
index bd74a05aa5..8e22faa6e3 100644
--- a/epan/dissectors/packet-xmpp.c
+++ b/epan/dissectors/packet-xmpp.c
@@ -377,23 +377,23 @@ dissect_xmpp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
/*check if desegment
* now it checks that last char is '>',
* TODO checks that first element in packet is closed*/
- int index;
+ int indx;
gchar last_char;
if (xmpp_desegment)
{
- index = tvb_reported_length(tvb) - 1;
- if (index >= 0)
+ indx = tvb_reported_length(tvb) - 1;
+ if (indx >= 0)
{
- last_char = tvb_get_guint8(tvb, index);
+ last_char = tvb_get_guint8(tvb, indx);
- while ((last_char <= ' ') && (index - 1 >= 0))
+ while ((last_char <= ' ') && (indx - 1 >= 0))
{
- index--;
- last_char = tvb_get_guint8(tvb, index);
+ indx--;
+ last_char = tvb_get_guint8(tvb, indx);
}
- if ((index >= 0) && (last_char != '>'))
+ if ((indx >= 0) && (last_char != '>'))
{
pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT;
return;
diff --git a/epan/follow.c b/epan/follow.c
index c27ba5afc9..859d5f4205 100644
--- a/epan/follow.c
+++ b/epan/follow.c
@@ -181,16 +181,16 @@ follow_tcp_addr(const address *addr0, guint port0,
return TRUE;
}
-/* select a tcp stream to follow via it's index */
+/* select a tcp stream to follow via its index */
gboolean
-follow_tcp_index(guint32 index)
+follow_tcp_index(guint32 indx)
{
if (find_tcp_index || find_tcp_addr) {
return FALSE;
}
find_tcp_addr = TRUE;
- tcp_stream_to_follow = index;
+ tcp_stream_to_follow = indx;
memset(ip_address, 0, sizeof ip_address);
port[0] = port[1] = 0;
diff --git a/epan/radius_dict.l b/epan/radius_dict.l
index 9129471b45..11c6c80324 100644
--- a/epan/radius_dict.l
+++ b/epan/radius_dict.l
@@ -337,7 +337,7 @@ static void add_vendor(const gchar* name, guint32 id, guint type_octets, guint l
g_hash_table_insert(dict->vendors_by_name, (gpointer) v->name, v);
}
-static void add_attribute(const gchar* name, const gchar* codestr, radius_attr_dissector_t type, const gchar* vendor, guint crypt, gboolean tagged, const gchar* attr) {
+static void add_attribute(const gchar* name, const gchar* codestr, radius_attr_dissector_t type, const gchar* vendor, guint encrypted_flag, gboolean tagged, const gchar* attr) {
radius_attr_info_t* a;
GHashTable* by_id;
guint32 code;
@@ -376,7 +376,7 @@ static void add_attribute(const gchar* name, const gchar* codestr, radius_attr_
}
a->code = code;
- a->encrypt = crypt;
+ a->encrypt = encrypted_flag;
a->tagged = tagged;
a->type = type;
a->vs = NULL;
diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c
index 5fecb5ea85..7698ee7225 100644
--- a/epan/wslua/wslua_pinfo.c
+++ b/epan/wslua/wslua_pinfo.c
@@ -76,14 +76,14 @@ WSLUA_CONSTRUCTOR NSTime_new(lua_State *L) {
/* Creates a new NSTime object */
#define WSLUA_OPTARG_NSTime_new_SECONDS 1 /* Seconds */
#define WSLUA_OPTARG_NSTime_new_NSECONDS 2 /* Nano seconds */
- NSTime time = g_malloc(sizeof(nstime_t));
+ NSTime nstime = g_malloc(sizeof(nstime_t));
- if (!time) return 0;
+ if (!nstime) return 0;
- time->secs = (time_t) luaL_optint(L,WSLUA_OPTARG_NSTime_new_SECONDS,0);
- time->nsecs = luaL_optint(L,WSLUA_OPTARG_NSTime_new_NSECONDS,0);
+ nstime->secs = (time_t) luaL_optint(L,WSLUA_OPTARG_NSTime_new_SECONDS,0);
+ nstime->nsecs = luaL_optint(L,WSLUA_OPTARG_NSTime_new_NSECONDS,0);
- pushNSTime(L,time);
+ pushNSTime(L,nstime);
WSLUA_RETURN(1); /* The new NSTime object. */
}
@@ -185,36 +185,36 @@ typedef struct {
} nstime_actions_t;
static int NSTime_get_secs(lua_State* L) {
- NSTime time = toNSTime(L,1);
+ NSTime nstime = toNSTime(L,1);
- lua_pushnumber (L,(lua_Number)(time->secs));
+ lua_pushnumber (L,(lua_Number)(nstime->secs));
return 1;
}
static int NSTime_set_secs(lua_State* L)
{
- NSTime time = toNSTime(L,1);
+ NSTime nstime = toNSTime(L,1);
time_t secs = luaL_checkint(L,3);
- time->secs = secs;
+ nstime->secs = secs;
return 0;
}
static int NSTime_get_nsecs(lua_State* L) {
- NSTime time = toNSTime(L,1);
+ NSTime nstime = toNSTime(L,1);
- lua_pushnumber (L,(lua_Number)(time->nsecs));
+ lua_pushnumber (L,(lua_Number)(nstime->nsecs));
return 1;
}
static int NSTime_set_nsecs(lua_State* L) {
- NSTime time = toNSTime(L,1);
+ NSTime nstime = toNSTime(L,1);
int nsecs = luaL_checkint(L,3);
- time->nsecs = nsecs;
+ nstime->nsecs = nsecs;
return 0;
}
@@ -230,11 +230,11 @@ static const nstime_actions_t nstime_actions[] = {
};
static int NSTime__index(lua_State* L) {
- NSTime time = checkNSTime(L,1);
+ NSTime nstime = checkNSTime(L,1);
const gchar* name = luaL_checkstring(L,2);
const nstime_actions_t* pa;
- if (! (time && name) ) return 0;
+ if (! (nstime && name) ) return 0;
for (pa = nstime_actions; pa->name; pa++) {
if ( g_str_equal(name,pa->name) ) {
@@ -252,11 +252,11 @@ static int NSTime__index(lua_State* L) {
}
static int NSTime__newindex(lua_State* L) {
- NSTime time = checkNSTime(L,1);
+ NSTime nstime = checkNSTime(L,1);
const gchar* name = luaL_checkstring(L,2);
const nstime_actions_t* pa;
- if (! (time && name) ) return 0;
+ if (! (nstime && name) ) return 0;
for (pa = nstime_actions; pa->name; pa++) {
if ( g_str_equal(name,pa->name) ) {