s/u_short/u_int16_t/ for KAME-origin source codes

This commit is contained in:
itojun 2000-04-28 11:14:47 +00:00
parent 7fdcfb6873
commit 6e67dba79f
6 changed files with 24 additions and 24 deletions

View File

@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.123 2000-04-27 10:05:31 itojun Exp $ (LBL)
* @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.124 2000-04-28 11:14:47 itojun Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
@ -306,6 +306,6 @@ extern void icmp6_print(const u_char *, const u_char *);
extern void ripng_print(const u_char *, int);
extern int rt6_print(const u_char *, const u_char *);
extern void ospf6_print(const u_char *, u_int);
extern void dhcp6_print(const u_char *, u_int, u_short, u_short);
extern void dhcp6_print(const u_char *, u_int, u_int16_t, u_int16_t);
#endif /*INET6*/
extern u_short in_cksum(const u_short *addr, register int len, u_short csum);

View File

@ -29,7 +29,7 @@
#ifndef lint
static const char rcsid[] =
"@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.3 1999-12-22 06:27:20 itojun Exp $";
"@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.4 2000-04-28 11:14:47 itojun Exp $";
#endif
#ifdef HAVE_CONFIG_H
@ -232,7 +232,7 @@ trunc:
*/
void
dhcp6_print(register const u_char *cp, u_int length,
u_short sport, u_short dport)
u_int16_t sport, u_int16_t dport)
{
union dhcp6 *dh6;
u_char *ep;

View File

@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] =
"@(#) $Header: /tcpdump/master/tcpdump/print-ip6opts.c,v 1.4 2000-04-09 19:15:59 assar Exp $";
"@(#) $Header: /tcpdump/master/tcpdump/print-ip6opts.c,v 1.5 2000-04-28 11:14:48 itojun Exp $";
#endif
#ifdef INET6
@ -92,7 +92,7 @@ ip6_opt_print(const u_char *bp, int len)
printf("(rtalert: invalid len %d)", bp[i + 1]);
goto trunc;
}
printf("(rtalert: 0x%04x) ", ntohs(*(u_short *)&bp[i + 2]));
printf("(rtalert: 0x%04x) ", ntohs(*(u_int16_t *)&bp[i + 2]));
optlen = IP6OPT_RTALERT_LEN;
break;
#ifndef IP6OPT_JUMBO
@ -110,7 +110,7 @@ ip6_opt_print(const u_char *bp, int len)
printf("(jumbo: invalid len %d)", bp[i + 1]);
goto trunc;
}
printf("(jumbo: %u) ", (u_int32_t)ntohl(*(u_int *)&bp[i + 2]));
printf("(jumbo: %u) ", (u_int32_t)ntohl(*(u_int32_t *)&bp[i + 2]));
optlen = IP6OPT_JUMBO_LEN;
break;
default:

View File

@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
"@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.11 2000-04-24 12:49:11 itojun Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.12 2000-04-28 11:14:48 itojun Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -355,11 +355,11 @@ struct attrmap {
static u_char *
isakmp_attrmap_print(u_char *p, u_char *ep, struct attrmap *map, size_t nmap)
{
u_short *q;
u_int16_t *q;
int totlen;
u_int32_t t, v;
q = (u_short *)p;
q = (u_int16_t *)p;
if (p[0] & 0x80)
totlen = 4;
else
@ -393,11 +393,11 @@ isakmp_attrmap_print(u_char *p, u_char *ep, struct attrmap *map, size_t nmap)
static u_char *
isakmp_attr_print(u_char *p, u_char *ep)
{
u_short *q;
u_int16_t *q;
int totlen;
u_int32_t t;
q = (u_short *)p;
q = (u_int16_t *)p;
if (p[0] & 0x80)
totlen = 4;
else

View File

@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
"@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.35 2000-01-27 23:56:05 fenner Exp $ (LBL)";
"@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.36 2000-04-28 11:14:48 itojun Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@ -470,7 +470,7 @@ ppp_if_print(u_char *user, const struct pcap_pkthdr *h,
* and/or check that they're not walking off the end of the packet.
* Rather than pass them all the way down, we set these globals.
*/
proto = ntohs(*(u_short *)&p[2]);
proto = ntohs(*(u_int16_t *)&p[2]);
packetp = p;
snapend = p + caplen;
@ -555,7 +555,7 @@ ppp_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h,
register u_int length = h->len;
register u_int caplen = h->caplen;
register int hdrlength;
u_short ptype;
u_int16_t ptype;
const u_char *q;
int i;
@ -595,7 +595,7 @@ ppp_bsdos_if_print(u_char *user, const struct pcap_pkthdr *h,
hdrlength += 1;
} else {
/* Un-compressed protocol field */
ptype = ntohs(*(u_short *)p);
ptype = ntohs(*(u_int16_t *)p);
if (eflag)
printf("%04x ", ptype);
p += 2;

View File

@ -1,5 +1,5 @@
/*
* $Header: /tcpdump/master/tcpdump/route6d.h,v 1.1 1999-10-30 05:11:22 itojun Exp $
* $Header: /tcpdump/master/tcpdump/route6d.h,v 1.2 2000-04-28 11:14:49 itojun Exp $
*/
#define RIP6_VERSION 1
@ -8,16 +8,16 @@
#define RIP6_RESPONSE 2
struct netinfo6 {
struct in6_addr rip6_dest;
u_short rip6_tag;
u_char rip6_plen;
u_char rip6_metric;
struct in6_addr rip6_dest;
u_int16_t rip6_tag;
u_int8_t rip6_plen;
u_int8_t rip6_metric;
};
struct rip6 {
u_char rip6_cmd;
u_char rip6_vers;
u_char rip6_res1[2];
u_int8_t rip6_cmd;
u_int8_t rip6_vers;
u_int8_t rip6_res1[2];
union {
struct netinfo6 ru6_nets[1];
char ru6_tracefile[1];