change unnecessary u_long/long into u_int32_t or something relevant.

more fixes should follow.
This commit is contained in:
itojun 1999-07-22 03:59:42 +00:00
parent b70a1b7220
commit 76fc599a8d
7 changed files with 24 additions and 24 deletions

View File

@ -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_error(m, type, code, param)
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*/

View File

@ -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 @@ struct in6pcb {
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 */

View File

@ -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 = GIF_HLIM;
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;

View File

@ -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 in6_ifaddr {
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 @@ struct in6_prefixreq {
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 @@ struct in6_rrenumreq {
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;

View File

@ -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 @@ struct ip6stat ip6stat;
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 @@ ip6_input(m)
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 @@ ip6_input(m)
* 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 @@ ip6_input(m)
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 @@ ip6_process_hopopts(m, opthead, hbhlen, rtalertp, plenp)
struct mbuf *m;
u_int8_t *opthead;
int hbhlen;
long *rtalertp;
u_int32_t *rtalertp;
u_int32_t *plenp;
{
struct ip6_hdr *ip6;

View File

@ -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 @@ skip_ipsec2:;
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 @@ skip_ipsec2:;
} 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;
/*

View File

@ -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 @@ struct ip6stat {
#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 @@ void ip6_freemoptions __P((struct ip6_moptions *));
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 *));