Source-Changes-HG archive

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

[src/trunk]: src/sys remove reference to in6_systm.h (file itself will be rem...



details:   https://anonhg.NetBSD.org/src/rev/77cc0ae0c77b
branches:  trunk
changeset: 475049:77cc0ae0c77b
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Jul 30 10:35:34 1999 +0000

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

diffstat:

 sys/net/if_ppp.c             |  75 ++++++++++++++++++++++++++++++++++++++++++-
 sys/net/if_pppvar.h          |   5 +-
 sys/net/if_spppsubr.c        |  29 ++++++++++++++++-
 sys/net/route.c              |  14 +-------
 sys/net/route.h              |   5 +--
 sys/netinet/ip_ecn.c         |   3 +-
 sys/netinet6/Makefile        |   4 +-
 sys/netinet6/ah_core.c       |   3 +-
 sys/netinet6/ah_input.c      |   3 +-
 sys/netinet6/ah_output.c     |   3 +-
 sys/netinet6/dest6.c         |   3 +-
 sys/netinet6/frag6.c         |   3 +-
 sys/netinet6/icmp6.c         |   3 +-
 sys/netinet6/in6.c           |   3 +-
 sys/netinet6/in6_gif.c       |   3 +-
 sys/netinet6/in6_proto.c     |   3 +-
 sys/netinet6/ip6_forward.c   |   3 +-
 sys/netinet6/ip6_output.c    |   3 +-
 sys/netinet6/ipcomp_input.c  |   3 +-
 sys/netinet6/ipcomp_output.c |   3 +-
 sys/netinet6/ipsec.c         |   3 +-
 sys/netinet6/nd6.c           |   3 +-
 sys/netinet6/nd6_rtr.c       |   3 +-
 sys/netinet6/raw_ip6.c       |   3 +-
 sys/netinet6/udp6_usrreq.c   |   3 +-
 25 files changed, 126 insertions(+), 63 deletions(-)

diffs (truncated from 591 to 300 lines):

diff -r 27799c284708 -r 77cc0ae0c77b sys/net/if_ppp.c
--- a/sys/net/if_ppp.c  Fri Jul 30 10:31:22 1999 +0000
+++ b/sys/net/if_ppp.c  Fri Jul 30 10:35:34 1999 +0000
@@ -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 @@
        case PPP_IP:
            npx = NP_IP;
            break;
+       case PPP_IPV6:
+           npx = NP_IPV6;
+           break;
        default:
            return EINVAL;
        }
@@ -601,13 +604,35 @@
        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:
@@ -631,6 +656,10 @@
        case AF_INET:
            break;
 #endif
+#ifdef INET6
+       case AF_INET6:
+           break;
+#endif
        default:
            error = EAFNOSUPPORT;
            break;
@@ -721,6 +750,24 @@
            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);
        control = PPP_CONTROL(dst->sa_data);
@@ -863,6 +910,9 @@
        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 @@
        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().
diff -r 27799c284708 -r 77cc0ae0c77b sys/net/if_pppvar.h
--- a/sys/net/if_pppvar.h       Fri Jul 30 10:31:22 1999 +0000
+++ b/sys/net/if_pppvar.h       Fri Jul 30 10:35:34 1999 +0000
@@ -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.
diff -r 27799c284708 -r 77cc0ae0c77b sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Fri Jul 30 10:31:22 1999 +0000
+++ b/sys/net/if_spppsubr.c     Fri Jul 30 10:35:34 1999 +0000
@@ -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 @@
        }
 #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 @@
                }
                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) ?
diff -r 27799c284708 -r 77cc0ae0c77b sys/net/route.c
--- a/sys/net/route.c   Fri Jul 30 10:31:22 1999 +0000
+++ b/sys/net/route.c   Fri Jul 30 10:35:34 1999 +0000
@@ -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 @@
        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;
diff -r 27799c284708 -r 77cc0ae0c77b sys/net/route.h
--- a/sys/net/route.h   Fri Jul 30 10:31:22 1999 +0000
+++ b/sys/net/route.h   Fri Jul 30 10:35:34 1999 +0000
@@ -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_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 *));
diff -r 27799c284708 -r 77cc0ae0c77b sys/netinet/ip_ecn.c
--- a/sys/netinet/ip_ecn.c      Fri Jul 30 10:31:22 1999 +0000
+++ b/sys/netinet/ip_ecn.c      Fri Jul 30 10:35:34 1999 +0000
@@ -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
 
diff -r 27799c284708 -r 77cc0ae0c77b sys/netinet6/Makefile
--- a/sys/netinet6/Makefile     Fri Jul 30 10:31:22 1999 +0000
+++ b/sys/netinet6/Makefile     Fri Jul 30 10:35:34 1999 +0000
@@ -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>
diff -r 27799c284708 -r 77cc0ae0c77b sys/netinet6/ah_core.c
--- a/sys/netinet6/ah_core.c    Fri Jul 30 10:31:22 1999 +0000
+++ b/sys/netinet6/ah_core.c    Fri Jul 30 10:35:34 1999 +0000
@@ -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>



Home | Main Index | Thread Index | Old Index