Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 change unnecessary u_long/long into u_int32_t o...



details:   https://anonhg.NetBSD.org/src/rev/f9366ce52d6f
branches:  trunk
changeset: 474829:f9366ce52d6f
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Jul 22 03:59:42 1999 +0000

description:
change unnecessary u_long/long into u_int32_t or something relevant.
more fixes should follow.

diffstat:

 sys/netinet6/icmp6.c      |   4 ++--
 sys/netinet6/in6_pcb.h    |   4 ++--
 sys/netinet6/in6_proto.c  |   4 ++--
 sys/netinet6/in6_var.h    |  12 ++++++------
 sys/netinet6/ip6_input.c  |  12 ++++++------
 sys/netinet6/ip6_output.c |   6 +++---
 sys/netinet6/ip6_var.h    |   6 +++---
 7 files changed, 24 insertions(+), 24 deletions(-)

diffs (202 lines):

diff -r 505a7fb8297b -r f9366ce52d6f sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c      Thu Jul 22 03:02:36 1999 +0000
+++ b/sys/netinet6/icmp6.c      Thu Jul 22 03:59:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: icmp6.c,v 1.6 1999/07/09 22:57:26 thorpej Exp $        */
+/*     $NetBSD: icmp6.c,v 1.7 1999/07/22 03:59:42 itojun Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -274,7 +274,7 @@
        icmp6 = (struct icmp6_hdr *)(nip6 + 1);
        icmp6->icmp6_type = type;
        icmp6->icmp6_code = code;
-       icmp6->icmp6_pptr = htonl((u_long)param);
+       icmp6->icmp6_pptr = htonl((u_int32_t)param);
 
        icmp6stat.icp6s_outhist[type]++;
        icmp6_reflect(m, sizeof(struct ip6_hdr)); /*header order: IPv6 - ICMPv6*/
diff -r 505a7fb8297b -r f9366ce52d6f sys/netinet6/in6_pcb.h
--- a/sys/netinet6/in6_pcb.h    Thu Jul 22 03:02:36 1999 +0000
+++ b/sys/netinet6/in6_pcb.h    Thu Jul 22 03:59:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_pcb.h,v 1.4 1999/07/17 07:07:09 itojun Exp $       */
+/*     $NetBSD: in6_pcb.h,v 1.5 1999/07/22 03:59:42 itojun Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -90,7 +90,7 @@
        u_short in6p_fport;             /* foreign port */
        struct  in6_addr in6p_laddr;    /* local host table entry */
        u_short in6p_lport;             /* local port */
-       u_long  in6p_flowinfo;          /* priority and flowlabel */
+       u_int32_t in6p_flowinfo;        /* priority and flowlabel */
        struct  socket *in6p_socket;    /* back pointer to socket */
        caddr_t in6p_ppcb;              /* pointer to per-protocol pcb */
        struct  route_in6 in6p_route;   /* placeholder for routing entry */
diff -r 505a7fb8297b -r f9366ce52d6f sys/netinet6/in6_proto.c
--- a/sys/netinet6/in6_proto.c  Thu Jul 22 03:02:36 1999 +0000
+++ b/sys/netinet6/in6_proto.c  Thu Jul 22 03:59:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_proto.c,v 1.4 1999/07/09 22:57:27 thorpej Exp $    */
+/*     $NetBSD: in6_proto.c,v 1.5 1999/07/22 03:59:42 itojun Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -290,7 +290,7 @@
 int    ip6_gif_hlim = 0;
 #endif
 
-u_long ip6_id = 0UL;
+u_int32_t ip6_id = 0UL;
 int    ip6_keepfaith = 0;
 time_t ip6_log_time = (time_t)0L;
 
diff -r 505a7fb8297b -r f9366ce52d6f sys/netinet6/in6_var.h
--- a/sys/netinet6/in6_var.h    Thu Jul 22 03:02:36 1999 +0000
+++ b/sys/netinet6/in6_var.h    Thu Jul 22 03:59:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in6_var.h,v 1.3 1999/07/03 21:30:18 thorpej Exp $      */
+/*     $NetBSD: in6_var.h,v 1.4 1999/07/22 03:59:42 itojun Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -97,7 +97,7 @@
        struct  sockaddr_in6 ia_net;    /* network number of interface */
        struct  sockaddr_in6 ia_dstaddr; /* space for destination addr */
        struct  sockaddr_in6 ia_prefixmask; /* prefix mask */
-       u_long  ia_plen;                /* prefix length */
+       u_int32_t ia_plen;              /* prefix length */
        struct  in6_ifaddr *ia_next;    /* next in6 list of IP6 addresses */
        LIST_HEAD(in6_multihead, in6_multi) ia6_multiaddrs;
                                        /* list of multicast addresses */
@@ -154,8 +154,8 @@
        char    ipr_name[IFNAMSIZ];
        u_char  ipr_origin;
        u_char  ipr_plen;
-       u_long  ipr_vltime;
-       u_long  ipr_pltime;
+       u_int32_t ipr_vltime;
+       u_int32_t ipr_pltime;
        struct in6_prflags ipr_flags;
        struct  sockaddr_in6 ipr_prefix;
 };
@@ -185,8 +185,8 @@
                u_char autonomous : 1;
                u_char reserved : 6;
        } irr_raflagmask;
-       u_long  irr_vltime;
-       u_long  irr_pltime;
+       u_int32_t irr_vltime;
+       u_int32_t irr_pltime;
        struct in6_prflags irr_flags;
        struct  sockaddr_in6 irr_matchprefix;
        struct  sockaddr_in6 irr_useprefix;
diff -r 505a7fb8297b -r f9366ce52d6f sys/netinet6/ip6_input.c
--- a/sys/netinet6/ip6_input.c  Thu Jul 22 03:02:36 1999 +0000
+++ b/sys/netinet6/ip6_input.c  Thu Jul 22 03:59:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_input.c,v 1.4 1999/07/09 22:57:27 thorpej Exp $    */
+/*     $NetBSD: ip6_input.c,v 1.5 1999/07/22 03:59:42 itojun Exp $     */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -144,7 +144,7 @@
 
 static void ip6_init2 __P((void *));
 
-static int ip6_hopopts_input __P((u_int32_t *, long *, struct mbuf **, int *));
+static int ip6_hopopts_input __P((u_int32_t *, u_int32_t *, struct mbuf **, int *));
 
 /*
  * IP6 initialization: fill in IP6 protocol switch table.
@@ -240,7 +240,7 @@
        register struct ip6_hdr *ip6;
        int off = sizeof(struct ip6_hdr), nest;
        u_int32_t plen;
-       long rtalert = -1;
+       u_int32_t rtalert = ~0;
        int nxt, ours = 0;
 
 #ifdef IPSEC
@@ -452,7 +452,7 @@
                 * accept the packet if a router alert option is included
                 * and we act as an IPv6 router.
                 */
-               if (rtalert >= 0 && ip6_forwarding)
+               if (rtalert != ~0 && ip6_forwarding)
                        ours = 1;
        } else
                nxt = ip6->ip6_nxt;
@@ -526,7 +526,7 @@
 static int
 ip6_hopopts_input(plenp, rtalertp, mp, offp)
        u_int32_t *plenp;
-       long *rtalertp;         /* XXX: should be stored more smart way */
+       u_int32_t *rtalertp;    /* XXX: should be stored more smart way */
        struct mbuf **mp;
        int *offp;
 {
@@ -566,7 +566,7 @@
        struct mbuf *m;
        u_int8_t *opthead;
        int hbhlen;
-       long *rtalertp;
+       u_int32_t *rtalertp;
        u_int32_t *plenp;
 {
        struct ip6_hdr *ip6;
diff -r 505a7fb8297b -r f9366ce52d6f sys/netinet6/ip6_output.c
--- a/sys/netinet6/ip6_output.c Thu Jul 22 03:02:36 1999 +0000
+++ b/sys/netinet6/ip6_output.c Thu Jul 22 03:59:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_output.c,v 1.4 1999/07/09 22:57:28 thorpej Exp $   */
+/*     $NetBSD: ip6_output.c,v 1.5 1999/07/22 03:59:42 itojun Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -751,7 +751,7 @@
        if (exthdrs.ip6e_hbh) {
                struct ip6_hbh *hbh = mtod(exthdrs.ip6e_hbh,
                                           struct ip6_hbh *);
-               long dummy1;    /* XXX unused */
+               u_int32_t dummy1; /* XXX unused */
                u_int32_t dummy2; /* XXX unused */
 
                /*
@@ -816,7 +816,7 @@
        } else {
                struct mbuf **mnext, *m_frgpart;
                struct ip6_frag *ip6f;
-               u_long id = htonl(ip6_id++);
+               u_int32_t id = htonl(ip6_id++);
                u_char nextproto;
 
                /*
diff -r 505a7fb8297b -r f9366ce52d6f sys/netinet6/ip6_var.h
--- a/sys/netinet6/ip6_var.h    Thu Jul 22 03:02:36 1999 +0000
+++ b/sys/netinet6/ip6_var.h    Thu Jul 22 03:59:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_var.h,v 1.3 1999/07/03 21:30:19 thorpej Exp $      */
+/*     $NetBSD: ip6_var.h,v 1.4 1999/07/22 03:59:42 itojun Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -178,7 +178,7 @@
 #define        IPV6_FORWARDING         0x02    /* most of IPv6 header exists */
 
 extern struct  ip6stat ip6stat;        /* statistics */
-extern u_long  ip6_id;                 /* fragment identifier */
+extern u_int32_t ip6_id;               /* fragment identifier */
 extern int     ip6_defhlim;            /* default hop limit */
 extern int     ip6_defmcasthlim;       /* default multicast hop limit */
 extern int     ip6_forwarding;         /* act as router? */
@@ -211,7 +211,7 @@
 int    ip6_unknown_opt __P((u_int8_t *, struct mbuf *, int));
 char * ip6_get_prevhdr __P((struct mbuf *, int));
 int    ip6_mforward __P((struct ip6_hdr *, struct ifnet *, struct mbuf *));
-int    ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, long *,
+int    ip6_process_hopopts __P((struct mbuf *, u_int8_t *, int, u_int32_t *,
                                 u_int32_t *));
 void   ip6_savecontrol __P((struct in6pcb *, struct mbuf **, struct ip6_hdr *,
                struct mbuf *));



Home | Main Index | Thread Index | Old Index