forked from osmocom/wireshark
More signed-vs-unsigned changes from Joerg Mayer.
svn path=/trunk/; revision=3386
This commit is contained in:
parent
1ac49ed4ce
commit
c3271d0a76
|
@ -1,7 +1,7 @@
|
|||
/* packet-atalk.c
|
||||
* Routines for Appletalk packet disassembly (DDP, currently).
|
||||
*
|
||||
* $Id: packet-atalk.c,v 1.53 2001/04/23 04:29:53 guy Exp $
|
||||
* $Id: packet-atalk.c,v 1.54 2001/04/27 01:27:36 guy Exp $
|
||||
*
|
||||
* Simon Wilkinson <sxw@dcs.ed.ac.uk>
|
||||
*
|
||||
|
@ -296,7 +296,7 @@ dissect_nbp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
|
|||
int offset = 0;
|
||||
guint8 info;
|
||||
guint op, count;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (check_col(pinfo->fd, COL_PROTOCOL))
|
||||
col_set_str(pinfo->fd, COL_PROTOCOL, "NBP");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-bxxp.c
|
||||
* Routines for BXXP packet disassembly
|
||||
*
|
||||
* $Id: packet-bxxp.c,v 1.17 2001/04/23 04:10:49 guy Exp $
|
||||
* $Id: packet-bxxp.c,v 1.18 2001/04/27 01:27:36 guy Exp $
|
||||
*
|
||||
* Copyright (c) 2000 by Richard Sharpe <rsharpe@ns.aus.com>
|
||||
*
|
||||
|
@ -98,7 +98,7 @@ static int ett_mime_header = -1;
|
|||
static int ett_header = -1;
|
||||
static int ett_trailer = -1;
|
||||
|
||||
static int tcp_port = 0;
|
||||
static unsigned int tcp_port = 0;
|
||||
|
||||
/* Get the state of the more flag ... */
|
||||
|
||||
|
@ -146,7 +146,7 @@ GMemChunk *bxxp_request_vals = NULL;
|
|||
GMemChunk *bxxp_packet_infos = NULL;
|
||||
|
||||
/* Hash Functions */
|
||||
gint
|
||||
static gint
|
||||
bxxp_equal(gconstpointer v, gconstpointer w)
|
||||
{
|
||||
struct bxxp_request_key *v1 = (struct bxxp_request_key *)v;
|
||||
|
@ -212,7 +212,7 @@ bxxp_init_protocol(void)
|
|||
* BXXP routines
|
||||
*/
|
||||
|
||||
int bxxp_get_more(char more)
|
||||
static int bxxp_get_more(char more)
|
||||
{
|
||||
|
||||
if (more == '.')
|
||||
|
@ -229,7 +229,7 @@ int bxxp_get_more(char more)
|
|||
* -1 -> Proto violation
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
dissect_bxxp_more(tvbuff_t *tvb, int offset, frame_data *fd,
|
||||
proto_tree *tree)
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ dissect_bxxp_more(tvbuff_t *tvb, int offset, frame_data *fd,
|
|||
|
||||
}
|
||||
|
||||
void dissect_bxxp_status(tvbuff_t *tvb, int offset, frame_data *fd,
|
||||
static void dissect_bxxp_status(tvbuff_t *tvb, int offset, frame_data *fd,
|
||||
proto_tree *tree)
|
||||
{
|
||||
|
||||
|
@ -307,9 +307,9 @@ void dissect_bxxp_status(tvbuff_t *tvb, int offset, frame_data *fd,
|
|||
|
||||
}
|
||||
|
||||
int num_len(tvbuff_t *tvb, int offset)
|
||||
static int num_len(tvbuff_t *tvb, int offset)
|
||||
{
|
||||
int i = 0;
|
||||
unsigned int i = 0;
|
||||
|
||||
while (isdigit(tvb_get_guint8(tvb, offset + i))) i++;
|
||||
|
||||
|
@ -324,7 +324,7 @@ int num_len(tvbuff_t *tvb, int offset)
|
|||
* However, we depend on the variable bxxp_strict_term
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
check_term(tvbuff_t *tvb, int offset, proto_tree *tree)
|
||||
{
|
||||
|
||||
|
@ -376,7 +376,7 @@ check_term(tvbuff_t *tvb, int offset, proto_tree *tree)
|
|||
}
|
||||
|
||||
/* Get the header length, up to CRLF or CR or LF */
|
||||
int header_len(tvbuff_t *tvb, int offset)
|
||||
static int header_len(tvbuff_t *tvb, int offset)
|
||||
{
|
||||
int i = 0;
|
||||
guint8 sc;
|
||||
|
@ -404,7 +404,7 @@ int header_len(tvbuff_t *tvb, int offset)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
dissect_bxxp_mime_header(tvbuff_t *tvb, int offset,
|
||||
struct bxxp_proto_data *frame_data,
|
||||
proto_tree *tree)
|
||||
|
@ -454,11 +454,12 @@ dissect_bxxp_mime_header(tvbuff_t *tvb, int offset,
|
|||
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
dissect_bxxp_int(tvbuff_t *tvb, int offset, frame_data *fd,
|
||||
proto_tree *tree, int hf, int *val, int *hfa[])
|
||||
{
|
||||
int ival, ind = 0, i = num_len(tvb, offset);
|
||||
int ival, ind = 0;
|
||||
unsigned int i = num_len(tvb, offset);
|
||||
guint8 int_buff[100];
|
||||
|
||||
memset(int_buff, '\0', sizeof(int_buff));
|
||||
|
@ -484,7 +485,7 @@ dissect_bxxp_int(tvbuff_t *tvb, int offset, frame_data *fd,
|
|||
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
set_mime_hdr_flags(int more, struct bxxp_request_val *request_val,
|
||||
struct bxxp_proto_data *frame_data)
|
||||
{
|
||||
|
@ -538,7 +539,7 @@ set_mime_hdr_flags(int more, struct bxxp_request_val *request_val,
|
|||
* A return value > 0 is the count of bytes we consumed ...
|
||||
*/
|
||||
|
||||
int
|
||||
static int
|
||||
dissect_bxxp_tree(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
||||
proto_tree *tree, struct bxxp_request_val *request_val,
|
||||
struct bxxp_proto_data *frame_data)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* Routines for DCERPC packet disassembly
|
||||
* Copyright 2001, Todd Sabin <tas@webspan.net>
|
||||
*
|
||||
* $Id: packet-dcerpc.c,v 1.3 2001/04/19 23:39:27 guy Exp $
|
||||
* $Id: packet-dcerpc.c,v 1.4 2001/04/27 01:27:36 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -161,7 +161,7 @@ dcerpc_tvb_get_ntohl (tvbuff_t *tvb, gint offset, char *drep)
|
|||
void
|
||||
dcerpc_tvb_get_uuid (tvbuff_t *tvb, gint offset, char *drep, e_uuid_t *uuid)
|
||||
{
|
||||
int i;
|
||||
unsigned int i;
|
||||
uuid->Data1 = dcerpc_tvb_get_ntohl (tvb, offset, drep);
|
||||
uuid->Data2 = dcerpc_tvb_get_ntohs (tvb, offset+4, drep);
|
||||
uuid->Data3 = dcerpc_tvb_get_ntohs (tvb, offset+6, drep);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
* Laurent Deniel <deniel@worldnet.fr>
|
||||
* Craig Rodrigues <rodrigc@mediaone.net>
|
||||
*
|
||||
* $Id: packet-giop.c,v 1.31 2001/02/26 22:19:12 oabad Exp $
|
||||
* $Id: packet-giop.c,v 1.32 2001/04/27 01:27:36 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@zing.org>
|
||||
|
@ -259,7 +259,7 @@ LocateReplyHeader;
|
|||
static void
|
||||
printable_string (gchar *in, guint32 len)
|
||||
{
|
||||
int i = 0;
|
||||
guint32 i = 0;
|
||||
|
||||
for(i=0; i < len; i++)
|
||||
{
|
||||
|
@ -554,7 +554,7 @@ dissect_giop_reply (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree,
|
|||
proto_tree *reply_tree = NULL;
|
||||
proto_item *tf;
|
||||
|
||||
int i;
|
||||
guint32 i;
|
||||
|
||||
big_endian = is_big_endian (header);
|
||||
|
||||
|
@ -685,7 +685,7 @@ dissect_giop_reply_1_2 (tvbuff_t * tvb, packet_info * pinfo,
|
|||
guint32 reply_status;
|
||||
proto_tree *reply_tree = NULL;
|
||||
proto_item *tf;
|
||||
int i;
|
||||
guint32 i;
|
||||
|
||||
if (tree)
|
||||
{
|
||||
|
@ -827,7 +827,7 @@ dissect_giop_request_1_1 (tvbuff_t * tvb, packet_info * pinfo,
|
|||
gchar *reserved = NULL;
|
||||
proto_tree *request_tree = NULL;
|
||||
proto_item *tf;
|
||||
int i;
|
||||
guint32 i;
|
||||
|
||||
|
||||
if (tree)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-icmpv6.c
|
||||
* Routines for ICMPv6 packet disassembly
|
||||
*
|
||||
* $Id: packet-icmpv6.c,v 1.41 2001/04/23 17:51:33 guy Exp $
|
||||
* $Id: packet-icmpv6.c,v 1.42 2001/04/27 01:27:37 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -365,6 +365,7 @@ dissect_nodeinfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
|
|||
proto_item *tf;
|
||||
struct icmp6_nodeinfo icmp6_nodeinfo, *ni;
|
||||
int off;
|
||||
unsigned int j;
|
||||
int i, n, l, p;
|
||||
guint16 flags;
|
||||
char dname[MAXDNAME];
|
||||
|
@ -562,21 +563,21 @@ dissect_nodeinfo(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree
|
|||
field_tree = proto_item_add_subtree(tf, ett_nodeinfo_nodedns);
|
||||
/* XXXX - clean this up when packet-dns.c has been tvbuffified */
|
||||
tvb_compat(tvb, &pd, &top_level_offset);
|
||||
i = offset + sizeof (*ni) + sizeof(guint32);
|
||||
while (i < tvb_length(tvb)) {
|
||||
l = get_dns_name(pd, top_level_offset + i,
|
||||
j = offset + sizeof (*ni) + sizeof(guint32);
|
||||
while (j < tvb_length(tvb)) {
|
||||
l = get_dns_name(pd, top_level_offset + j,
|
||||
top_level_offset + offset + sizeof (*ni) + sizeof(guint32),
|
||||
dname,sizeof(dname));
|
||||
if (tvb_bytes_exist(tvb, top_level_offset + i + l, 1) &&
|
||||
tvb_get_guint8(tvb, top_level_offset + i + l) == 0) {
|
||||
if (tvb_bytes_exist(tvb, top_level_offset + j + l, 1) &&
|
||||
tvb_get_guint8(tvb, top_level_offset + j + l) == 0) {
|
||||
l++;
|
||||
proto_tree_add_text(field_tree, tvb, i, l,
|
||||
proto_tree_add_text(field_tree, tvb, j, l,
|
||||
"DNS label: %s (truncated)", dname);
|
||||
} else {
|
||||
proto_tree_add_text(field_tree, tvb, i, l,
|
||||
proto_tree_add_text(field_tree, tvb, j, l,
|
||||
"DNS label: %s", dname);
|
||||
}
|
||||
i += l;
|
||||
j += l;
|
||||
}
|
||||
off = tvb_length_remaining(tvb, offset);
|
||||
break;
|
||||
|
@ -630,7 +631,8 @@ dissect_rrenum(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
|
|||
struct icmp6_router_renum icmp6_router_renum, *rr;
|
||||
struct rr_pco_match rr_pco_match, *match;
|
||||
struct rr_pco_use rr_pco_use, *use;
|
||||
int flagoff, off, l;
|
||||
int flagoff, off;
|
||||
unsigned int l;
|
||||
guint8 flags;
|
||||
|
||||
rr = &icmp6_router_renum;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* packet-icq.c
|
||||
* Routines for ICQ packet disassembly
|
||||
*
|
||||
* $Id: packet-icq.c,v 1.28 2001/03/27 02:01:31 guy Exp $
|
||||
* $Id: packet-icq.c,v 1.29 2001/04/27 01:27:37 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Johan Feyaerts
|
||||
|
@ -555,7 +555,7 @@ icqv5_decode_msgType(proto_tree* tree,
|
|||
guint16 msgType;
|
||||
gint sep_offset;
|
||||
int sz; /* Size of the current element */
|
||||
int n;
|
||||
unsigned int n;
|
||||
static char* url_field_descr[] = {
|
||||
"Description",
|
||||
"URL",
|
||||
|
@ -1967,7 +1967,7 @@ dissect_icqv5Server(tvbuff_t *tvb,
|
|||
if (changeCol && check_col(pinfo->fd, COL_INFO))
|
||||
col_add_fstr(pinfo->fd, COL_INFO, "ICQv5 %s", findServerCmd(cmd));
|
||||
|
||||
if (pktsize == -1)
|
||||
if (pktsize == (guint32)-1)
|
||||
pktsize = tvb_reported_length(tvb);
|
||||
|
||||
if (tree) {
|
||||
|
|
Loading…
Reference in New Issue