]> The Tcpdump Group git mirrors - tcpdump/commitdiff
s/u_short/u_int16_t/ for KAME-origin source codes
authoritojun <itojun>
Fri, 28 Apr 2000 11:14:47 +0000 (11:14 +0000)
committeritojun <itojun>
Fri, 28 Apr 2000 11:14:47 +0000 (11:14 +0000)
interface.h
print-dhcp6.c
print-ip6opts.c
print-isakmp.c
print-ppp.c
route6d.h

index 3e8b6c75caec4419b8087bf32b6b5b5037f08864..a0cfaab81a6cf8050bd7cfff19f8977de14605b4 100644 (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);
index 1e3be6befc3309ba4847ce5224c18a4ecec8f7df..bbbd99d2f0718760aeddca49f37a763abc701102 100644 (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;
index 1487f564891bf89c6d4e152a066577714cb09c15..e087af3fc8e318e1baedf956629c35c865207f17 100644 (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:
index 34375d98aa5f5b582d20d9b10f3307015c15ec2c..725604ff677a020a1caa04fb31897d460ec0f331 100644 (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
index 38614fbc82b11ec4ac612ced89bdc2b8161c0034..931cfec1ea824d09569afa38c05b607193d45978 100644 (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;
index 2289deed324ebc3ee77b469c9a81121f19f33842..8aefc4c16cc8ca7a6dc9e7e6d332d275e09dd882 100644 (file)
--- 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];