remove reference to in6_systm.h (file itself will be removed afterwords)

This commit is contained in:
itojun 1999-07-30 10:35:34 +00:00
parent 5413fa8362
commit 06c350054d
25 changed files with 126 additions and 63 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ppp.c,v 1.54 1999/07/01 08:12:48 itojun Exp $ */
/* $NetBSD: if_ppp.c,v 1.55 1999/07/30 10:35:38 itojun Exp $ */
/* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */
/*
@ -486,6 +486,9 @@ pppioctl(sc, cmd, data, flag, p)
case PPP_IP:
npx = NP_IP;
break;
case PPP_IPV6:
npx = NP_IPV6;
break;
default:
return EINVAL;
}
@ -601,13 +604,35 @@ pppsioctl(ifp, cmd, data)
break;
case SIOCSIFADDR:
if (ifa->ifa_addr->sa_family != AF_INET)
switch (ifa->ifa_addr->sa_family) {
#ifdef INET
case AF_INET:
break;
#endif
#ifdef INET6
case AF_INET6:
break;
#endif
default:
error = EAFNOSUPPORT;
break;
}
break;
case SIOCSIFDSTADDR:
if (ifa->ifa_addr->sa_family != AF_INET)
switch (ifa->ifa_addr->sa_family) {
#ifdef INET
case AF_INET:
break;
#endif
#ifdef INET6
case AF_INET6:
break;
#endif
default:
error = EAFNOSUPPORT;
break;
}
break;
case SIOCSIFMTU:
@ -630,6 +655,10 @@ pppsioctl(ifp, cmd, data)
#ifdef INET
case AF_INET:
break;
#endif
#ifdef INET6
case AF_INET6:
break;
#endif
default:
error = EAFNOSUPPORT;
@ -720,6 +749,24 @@ pppoutput(ifp, m0, dst, rtp)
if (ip->ip_tos & IPTOS_LOWDELAY)
m0->m_flags |= M_HIGHPRI;
break;
#endif
#ifdef INET6
case AF_INET6:
address = PPP_ALLSTATIONS; /*XXX*/
control = PPP_UI; /*XXX*/
protocol = PPP_IPV6;
mode = sc->sc_npmode[NP_IPV6];
#if 0 /* XXX flowinfo/traffic class, maybe? */
/*
* If this packet has the "low delay" bit set in the IP header,
* put it on the fastq instead.
*/
ip = mtod(m0, struct ip *);
if (ip->ip_tos & IPTOS_LOWDELAY)
m0->m_flags |= M_HIGHPRI;
break;
#endif
#endif
case AF_UNSPEC:
address = PPP_ADDRESS(dst->sa_data);
@ -863,6 +910,9 @@ ppp_requeue(sc)
case PPP_IP:
mode = sc->sc_npmode[NP_IP];
break;
case PPP_IPV6:
mode = sc->sc_npmode[NP_IPV6];
break;
default:
mode = NPMODE_PASS;
}
@ -1470,6 +1520,25 @@ ppp_inproc(sc, m)
break;
#endif
#ifdef INET6
case PPP_IPV6:
/*
* IPv6 packet - take off the ppp header and pass it up to IPv6.
*/
if ((ifp->if_flags & IFF_UP) == 0
|| sc->sc_npmode[NP_IPV6] != NPMODE_PASS) {
/* interface is down - drop the packet. */
m_freem(m);
return;
}
m->m_pkthdr.len -= PPP_HDRLEN;
m->m_data += PPP_HDRLEN;
m->m_len -= PPP_HDRLEN;
schednetisr(NETISR_IPV6);
inq = &ip6intrq;
break;
#endif
default:
/*
* Some other protocol - place on input queue for read().

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_pppvar.h,v 1.9 1999/05/12 18:50:51 thorpej Exp $ */
/* $NetBSD: if_pppvar.h,v 1.10 1999/07/30 10:35:38 itojun Exp $ */
/* Id: if_pppvar.h,v 1.3 1996/07/01 01:04:37 paulus Exp */
/*
@ -51,7 +51,8 @@
* indexing sc_npmode.
*/
#define NP_IP 0 /* Internet Protocol */
#define NUM_NP 1 /* Number of NPs. */
#define NP_IPV6 1 /* Internet Protocol version 6 */
#define NUM_NP 2 /* Number of NPs. */
/*
* Structure describing each ppp unit.

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_spppsubr.c,v 1.4 1999/04/04 06:57:03 explorer Exp $ */
/* $NetBSD: if_spppsubr.c,v 1.5 1999/07/30 10:35:38 itojun Exp $ */
/*
* Synchronous PPP/Cisco link level subroutines.
@ -130,6 +130,7 @@
#define PPP_ISO 0x0023 /* ISO OSI Protocol */
#define PPP_XNS 0x0025 /* Xerox NS Protocol */
#define PPP_IPX 0x002b /* Novell IPX Protocol */
#define PPP_IPV6 0x0057 /* Internet Protocol version 6 */
#define PPP_LCP 0xc021 /* Link Control Protocol */
#define PPP_PAP 0xc023 /* Password Authentication Protocol */
#define PPP_CHAP 0xc223 /* Challenge-Handshake Auth Protocol */
@ -680,6 +681,12 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
}
#endif
#ifdef INET6
if (dst->sa_family == AF_INET6) {
/* XXX do something tricky here? */
}
#endif
/*
* Prepend general data packet PPP header. For now, IP only.
*/
@ -726,6 +733,26 @@ sppp_output(struct ifnet *ifp, struct mbuf *m,
}
break;
#endif
#ifdef INET6
case AF_INET6: /* Internet Protocol version 6 */
if (sp->pp_flags & PP_CISCO)
h->protocol = htons (ETHERTYPE_IPV6);
else {
/*
* Don't choke with an ENETDOWN early. It's
* possible that we just started dialing out,
* so don't drop the packet immediately. If
* we notice that we run out of buffer space
* below, we will however remember that we are
* not ready to carry IP packets, and return
* ENETDOWN, as opposed to ENOBUFS.
*/
h->protocol = htons(PPP_IPV6);
if (sp->state[IDX_IPCP] != STATE_OPENED)
rv = ENETDOWN;
}
break;
#endif
#ifdef NS
case AF_NS: /* Xerox NS Protocol */
h->protocol = htons ((sp->pp_flags & PP_CISCO) ?

View File

@ -1,4 +1,4 @@
/* $NetBSD: route.c,v 1.25 1999/07/01 08:12:49 itojun Exp $ */
/* $NetBSD: route.c,v 1.26 1999/07/30 10:35:39 itojun Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -168,18 +168,6 @@ rtalloc(ro)
ro->ro_rt = rtalloc1(&ro->ro_dst, 1);
}
#if 1
/* for INET6 */
void
rtcalloc(ro)
register struct route *ro;
{
if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP))
return; /* XXX */
ro->ro_rt = rtalloc1(&ro->ro_dst, 0);
}
#endif
struct rtentry *
rtalloc1(dst, report)
register struct sockaddr *dst;

View File

@ -1,4 +1,4 @@
/* $NetBSD: route.h,v 1.18 1999/07/01 08:12:49 itojun Exp $ */
/* $NetBSD: route.h,v 1.19 1999/07/30 10:35:39 itojun Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -297,9 +297,6 @@ void rt_timer_remove_all __P((struct rtentry *));
void rt_timer_timer __P((void *));
void rtable_init __P((void **));
void rtalloc __P((struct route *));
#if 1 /*for INET6*/
void rtcalloc __P((struct route *));
#endif
struct rtentry *
rtalloc1 __P((struct sockaddr *, int));
void rtfree __P((struct rtentry *));

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_ecn.c,v 1.4 1999/07/06 12:23:20 itojun Exp $ */
/* $NetBSD: ip_ecn.c,v 1.5 1999/07/30 10:35:34 itojun Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@ -55,7 +55,6 @@
#ifndef INET
#include <netinet/in.h>
#endif
#include <netinet6/in6_systm.h>
#include <netinet/ip6.h>
#endif

View File

@ -1,10 +1,10 @@
# $NetBSD: Makefile,v 1.2 1999/07/01 08:12:52 itojun Exp $
# $NetBSD: Makefile,v 1.3 1999/07/30 10:35:35 itojun Exp $
KDIR= /sys/netinet6
INCSDIR= /usr/include/netinet6
INCS= ah.h esp.h icmp6.h in6.h in6_gif.h in6_ifattach.h in6_pcb.h \
in6_systm.h in6_var.h ip6.h ip6_mroute.h ip6_var.h ip6protosw.h \
in6_var.h ip6.h ip6_mroute.h ip6_var.h ip6protosw.h \
ipcomp.h ipsec.h mld6_var.h nd6.h pim6.h pim6_var.h udp6.h udp6_var.h
.include <bsd.kinc.mk>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ah_core.c,v 1.6 1999/07/09 22:57:26 thorpej Exp $ */
/* $NetBSD: ah_core.c,v 1.7 1999/07/30 10:35:35 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -69,7 +69,6 @@
#include <netinet/in_pcb.h>
#ifdef INET6
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3
#include <netinet6/in6_pcb.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ah_input.c,v 1.4 1999/07/06 08:55:56 itojun Exp $ */
/* $NetBSD: ah_input.c,v 1.5 1999/07/30 10:35:35 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -62,7 +62,6 @@
#include <netinet/ip_ecn.h>
#ifdef INET6
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3
#include <netinet6/in6_pcb.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ah_output.c,v 1.3 1999/07/03 21:30:17 thorpej Exp $ */
/* $NetBSD: ah_output.c,v 1.4 1999/07/30 10:35:35 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -63,7 +63,6 @@
#include <netinet/in_pcb.h>
#ifdef INET6
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3
#include <netinet6/in6_pcb.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: dest6.c,v 1.3 1999/07/03 21:30:17 thorpej Exp $ */
/* $NetBSD: dest6.c,v 1.4 1999/07/30 10:35:35 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -45,7 +45,6 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3
#include <netinet6/in6_pcb.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: frag6.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/* $NetBSD: frag6.c,v 1.5 1999/07/30 10:35:35 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -46,7 +46,6 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3
#include <netinet6/in6_pcb.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: icmp6.c,v 1.8 1999/07/22 12:56:57 itojun Exp $ */
/* $NetBSD: icmp6.c,v 1.9 1999/07/30 10:35:35 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -87,7 +87,6 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#include <netinet6/ip6_var.h>
#include <netinet6/icmp6.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: in6.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/* $NetBSD: in6.c,v 1.5 1999/07/30 10:35:36 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -103,7 +103,6 @@
#include <netinet/if_ether.h>
#endif
#include <netinet6/in6_systm.h>
#include <netinet6/nd6.h>
#include <netinet6/ip6.h>
#include <netinet6/mld6_var.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: in6_gif.c,v 1.4 1999/07/09 22:57:26 thorpej Exp $ */
/* $NetBSD: in6_gif.c,v 1.5 1999/07/30 10:35:36 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -57,7 +57,6 @@
#ifdef INET
#include <netinet/ip.h>
#endif
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#include <netinet6/ip6_var.h>
#include <netinet6/in6_gif.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: in6_proto.c,v 1.6 1999/07/27 06:23:57 explorer Exp $ */
/* $NetBSD: in6_proto.c,v 1.7 1999/07/30 10:35:36 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -83,7 +83,6 @@
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet6/in6_systm.h>
#if (defined(__FreeBSD__) && __FreeBSD__ >= 3) || (defined(__NetBSD__) && !defined(TCP6))
#include <netinet/ip.h>
#include <netinet/ip_var.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip6_forward.c,v 1.3 1999/07/03 21:30:18 thorpej Exp $ */
/* $NetBSD: ip6_forward.c,v 1.4 1999/07/30 10:35:36 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -46,7 +46,6 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3
#include <netinet6/in6_pcb.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip6_output.c,v 1.6 1999/07/22 12:56:57 itojun Exp $ */
/* $NetBSD: ip6_output.c,v 1.7 1999/07/30 10:35:36 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -87,7 +87,6 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#include <netinet6/icmp6.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipcomp_input.c,v 1.4 1999/07/06 05:09:22 itojun Exp $ */
/* $NetBSD: ipcomp_input.c,v 1.5 1999/07/30 10:35:37 itojun Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@ -63,7 +63,6 @@
#include <netinet/ip_ecn.h>
#ifdef INET6
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3
#include <netinet6/in6_pcb.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipcomp_output.c,v 1.4 1999/07/06 05:09:22 itojun Exp $ */
/* $NetBSD: ipcomp_output.c,v 1.5 1999/07/30 10:35:37 itojun Exp $ */
/*
* Copyright (C) 1999 WIDE Project.
@ -63,7 +63,6 @@
#include <netinet/ip_ecn.h>
#ifdef INET6
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#if !defined(__FreeBSD__) || __FreeBSD__ < 3
#include <netinet6/in6_pcb.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: ipsec.c,v 1.7 1999/07/11 17:45:11 itojun Exp $ */
/* $NetBSD: ipsec.c,v 1.8 1999/07/30 10:35:37 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -72,7 +72,6 @@
#include <netinet/ip_ecn.h>
#ifdef INET6
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#include <netinet6/in6_pcb.h>
#include <netinet6/ip6_var.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6.c,v 1.6 1999/07/06 12:23:22 itojun Exp $ */
/* $NetBSD: nd6.c,v 1.7 1999/07/30 10:35:37 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -72,7 +72,6 @@
#include <netinet/if_inarp.h>
#include <net/if_fddi.h>
#endif /* __NetBSD__ */
#include <netinet6/in6_systm.h>
#include <netinet6/in6_var.h>
#include <netinet6/ip6.h>
#include <netinet6/ip6_var.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: nd6_rtr.c,v 1.4 1999/07/04 02:01:15 itojun Exp $ */
/* $NetBSD: nd6_rtr.c,v 1.5 1999/07/30 10:35:38 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -50,7 +50,6 @@
#include <net/radix.h>
#include <netinet/in.h>
#include <netinet6/in6_systm.h>
#include <netinet6/in6_var.h>
#include <netinet6/ip6.h>
#include <netinet6/ip6_var.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: raw_ip6.c,v 1.7 1999/07/19 18:37:19 itojun Exp $ */
/* $NetBSD: raw_ip6.c,v 1.8 1999/07/30 10:35:38 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -84,7 +84,6 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#include <netinet6/ip6_var.h>
#include <netinet6/ip6_mroute.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: udp6_usrreq.c,v 1.5 1999/07/09 22:57:30 thorpej Exp $ */
/* $NetBSD: udp6_usrreq.c,v 1.6 1999/07/30 10:35:38 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -85,7 +85,6 @@
#include <netinet/in.h>
#include <netinet/in_var.h>
#include <netinet6/in6_systm.h>
#include <netinet6/ip6.h>
#include <netinet6/in6_pcb.h>
#include <netinet6/ip6_var.h>