From: itojun Date: Fri, 28 Apr 2000 11:14:47 +0000 (+0000) Subject: s/u_short/u_int16_t/ for KAME-origin source codes X-Git-Tag: tcpdump-3.5.1~317 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/6e67dba79fc8142ba1c55c82bd3551286126186c?ds=sidebyside;hp=7fdcfb68739b807519337517e2ae579a5ef932d4 s/u_short/u_int16_t/ for KAME-origin source codes --- diff --git a/interface.h b/interface.h index 3e8b6c75..a0cfaab8 100644 --- a/interface.h +++ b/interface.h @@ -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); diff --git a/print-dhcp6.c b/print-dhcp6.c index 1e3be6be..bbbd99d2 100644 --- a/print-dhcp6.c +++ b/print-dhcp6.c @@ -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; diff --git a/print-ip6opts.c b/print-ip6opts.c index 1487f564..e087af3f 100644 --- a/print-ip6opts.c +++ b/print-ip6opts.c @@ -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: diff --git a/print-isakmp.c b/print-isakmp.c index 34375d98..725604ff 100644 --- a/print-isakmp.c +++ b/print-isakmp.c @@ -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 diff --git a/print-ppp.c b/print-ppp.c index 38614fbc..931cfec1 100644 --- a/print-ppp.c +++ b/print-ppp.c @@ -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; diff --git a/route6d.h b/route6d.h index 2289deed..8aefc4c1 100644 --- a/route6d.h +++ b/route6d.h @@ -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];