i = 0;
while(i < bodylen) {
const u_char *message;
- uint8_t type, len;
+ uint8_t type;
+ u_int len;
message = cp + 4 + i;
decode_multicast_vpn(netdissect_options *ndo,
const u_char *pptr, char *buf, size_t buflen)
{
- uint8_t route_type, route_length, addr_length;
- u_int sg_length;
+ uint8_t route_type, route_length;
+ u_int addr_length, sg_length;
u_int offset;
ND_TCHECK_2(pptr);
cdp_print(netdissect_options *ndo,
const u_char *pptr, u_int length, u_int caplen)
{
- u_int type, len, i, j;
+ u_int type, len, i;
const u_char *tptr;
ndo->ndo_protocol = "cdp";
case 0x05: /* Version */
ND_PRINT("\n\t ");
for (i=0;i<len;i++) {
- j = GET_U_1(tptr + i);
- if (j == '\n') /* lets rework the version string to
+ u_char c;
+
+ c = GET_U_1(tptr + i);
+ if (c == '\n') /* lets rework the version string to
get a nice indentation */
ND_PRINT("\n\t ");
else
- fn_print_char(ndo, j);
+ fn_print_char(ndo, c);
}
break;
case 0x06: /* Platform */
/* Our caller has already checked for mflags */
u_int mflags = GET_U_1(rhp->rh_short.sh_flags);
const union controlmsg *cmp = (const union controlmsg *)rhp;
- u_int src, dst, info, blksize, eco, ueco, hello, other, vers;
+ uint16_t src, dst;
+ u_int info, blksize, eco, ueco, hello, other, vers;
u_int priority;
const u_char *rhpx = (const u_char *)rhp;
int ret;
* fragments.
*/
if ((off & IP_OFFMASK) == 0) {
- u_int nh = GET_U_1(ip->ip_p);
+ uint8_t nh = GET_U_1(ip->ip_p);
if (nh != IPPROTO_TCP && nh != IPPROTO_UDP &&
nh != IPPROTO_SCTP && nh != IPPROTO_DCCP) {
const u_char *ipend;
const u_char *cp;
u_int payload_len;
- u_int nh;
+ uint8_t nh;
int fragmented = 0;
u_int flow;
nd_print_invalid(ndo);
break;
}
- tlen-=ext_is_len;
- tptr+=ext_is_len;
+ tlen-=(uint8_t)ext_is_len;
+ tptr+=(uint8_t)ext_is_len;
}
break;
nd_print_invalid(ndo);
break;
}
- tlen-=ext_is_len;
- tptr+=ext_is_len;
+ tlen-=(uint8_t)ext_is_len;
+ tptr+=(uint8_t)ext_is_len;
}
break;
nd_print_invalid(ndo);
break;
}
- tlen-=ext_is_len;
- tptr+=ext_is_len;
+ tlen-=(uint8_t)ext_is_len;
+ tptr+=(uint8_t)ext_is_len;
}
break;
case ISIS_TLV_IS_REACH:
nd_print_invalid(ndo);
break;
}
- tptr+=ext_ip_len;
- tlen-=ext_ip_len;
+ tlen-=(uint8_t)ext_ip_len;
+ tptr+=(uint8_t)ext_ip_len;
}
break;
nd_print_invalid(ndo);
break;
}
- tptr+=ext_ip_len;
- tlen-=ext_ip_len;
+ tlen-=(uint8_t)ext_ip_len;
+ tptr+=(uint8_t)ext_ip_len;
}
break;
nd_print_invalid(ndo);
break;
}
- tptr+=ext_ip_len;
- tlen-=ext_ip_len;
+ tlen-=(uint8_t)ext_ip_len;
+ tptr+=(uint8_t)ext_ip_len;
}
break;
nd_print_invalid(ndo);
break;
}
- tptr+=ext_ip_len;
- tlen-=ext_ip_len;
+ tlen-=(uint8_t)ext_ip_len;
+ tptr+=(uint8_t)ext_ip_len;
}
break;
uint8_t cookie_len;
uint8_t cookie_type;
uint8_t cookie[8];
- uint8_t bundle;
+ u_int bundle;
uint16_t proto;
uint8_t flags;
};
static u_int
ldp_tlv_print(netdissect_options *ndo,
const u_char *tptr,
- u_short msg_tlen)
+ u_int msg_tlen)
{
struct ldp_tlv_header {
nd_uint16_t type;
{
int hexdump = FALSE;
u_int subtype;
- uint8_t tval;
+ uint16_t tval;
uint16_t tlv;
uint32_t i, pgval, uval;
u_int tlen, tlv_type;
*/
static u_int
rsvp_intserv_print(netdissect_options *ndo,
- const u_char *tptr, u_short obj_tlen)
+ const u_char *tptr, u_int obj_tlen)
{
u_int parameter_id,parameter_length;
union {
float f;
uint32_t i;
} bw;
- uint8_t namelen;
+ u_int namelen;
u_int action, subchannel;
} else {
if (sport != -1) {
ND_PRINT("%s > %s: ",
- udpport_string(ndo, sport),
- udpport_string(ndo, dport));
+ udpport_string(ndo, (uint16_t)sport),
+ udpport_string(ndo, (uint16_t)dport));
}
}
} else {