[BACK]Return to raw_ip.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / netinet

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/netinet/raw_ip.c between version 1.114.2.3 and 1.115

version 1.114.2.3, 2014/08/20 00:04:35 version 1.115, 2013/02/05 17:30:02
Line 60 
Line 60 
  *      @(#)raw_ip.c    8.7 (Berkeley) 5/15/95   *      @(#)raw_ip.c    8.7 (Berkeley) 5/15/95
  */   */
   
 /*  
  * Raw interface to IP protocol.  
  */  
   
 #include <sys/cdefs.h>  #include <sys/cdefs.h>
 __KERNEL_RCSID(0, "$NetBSD$");  __KERNEL_RCSID(0, "$NetBSD$");
   
Line 98  __KERNEL_RCSID(0, "$NetBSD$");
Line 94  __KERNEL_RCSID(0, "$NetBSD$");
 #include <netinet/in_proto.h>  #include <netinet/in_proto.h>
 #include <netinet/in_var.h>  #include <netinet/in_var.h>
   
 #ifdef IPSEC  #ifdef FAST_IPSEC
 #include <netipsec/ipsec.h>  #include <netipsec/ipsec.h>
 #include <netipsec/ipsec_var.h>  #include <netipsec/ipsec_var.h>
 #include <netipsec/ipsec_private.h>  #include <netipsec/ipsec_private.h>
 #endif  /* IPSEC */  #endif  /* FAST_IPSEC */
   
 #ifdef COMPAT_50  #ifdef COMPAT_50
 #include <compat/sys/socket.h>  #include <compat/sys/socket.h>
Line 112  struct inpcbtable rawcbtable;
Line 108  struct inpcbtable rawcbtable;
   
 int      rip_pcbnotify(struct inpcbtable *, struct in_addr,  int      rip_pcbnotify(struct inpcbtable *, struct in_addr,
     struct in_addr, int, int, void (*)(struct inpcb *, int));      struct in_addr, int, int, void (*)(struct inpcb *, int));
 int      rip_connect_pcb(struct inpcb *, struct mbuf *);  int      rip_bind(struct inpcb *, struct mbuf *);
 static void      rip_disconnect1(struct inpcb *);  int      rip_connect(struct inpcb *, struct mbuf *);
   void     rip_disconnect(struct inpcb *);
   
 static void sysctl_net_inet_raw_setup(struct sysctllog **);  static void sysctl_net_inet_raw_setup(struct sysctllog **);
   
Line 123  static void sysctl_net_inet_raw_setup(st
Line 120  static void sysctl_net_inet_raw_setup(st
 #define RIPSNDQ         8192  #define RIPSNDQ         8192
 #define RIPRCVQ         8192  #define RIPRCVQ         8192
   
 static u_long           rip_sendspace = RIPSNDQ;  
 static u_long           rip_recvspace = RIPRCVQ;  
   
 /*  /*
  * Raw interface to IP protocol.   * Raw interface to IP protocol.
  */   */
Line 195  rip_input(struct mbuf *m, ...)
Line 189  rip_input(struct mbuf *m, ...)
         ip->ip_len = ntohs(ip->ip_len) - hlen;          ip->ip_len = ntohs(ip->ip_len) - hlen;
         NTOHS(ip->ip_off);          NTOHS(ip->ip_off);
   
         TAILQ_FOREACH(inph, &rawcbtable.inpt_queue, inph_queue) {          CIRCLEQ_FOREACH(inph, &rawcbtable.inpt_queue, inph_queue) {
                 inp = (struct inpcb *)inph;                  inp = (struct inpcb *)inph;
                 if (inp->inp_af != AF_INET)                  if (inp->inp_af != AF_INET)
                         continue;                          continue;
Line 209  rip_input(struct mbuf *m, ...)
Line 203  rip_input(struct mbuf *m, ...)
                         continue;                          continue;
                 if (last == NULL)                  if (last == NULL)
                         ;                          ;
 #if defined(IPSEC)  #if defined(FAST_IPSEC)
                 /* check AH/ESP integrity. */                  /* check AH/ESP integrity. */
                 else if (ipsec_used &&                  else if (ipsec4_in_reject_so(m, last->inp_socket)) {
                     ipsec4_in_reject_so(m, last->inp_socket)) {  
                         IPSEC_STATINC(IPSEC_STAT_IN_POLVIO);                          IPSEC_STATINC(IPSEC_STAT_IN_POLVIO);
                         /* do not inject data to pcb */                          /* do not inject data to pcb */
                 }                  }
Line 224  rip_input(struct mbuf *m, ...)
Line 217  rip_input(struct mbuf *m, ...)
                 }                  }
                 last = inp;                  last = inp;
         }          }
 #if defined(IPSEC)  #if defined(FAST_IPSEC)
         /* check AH/ESP integrity. */          /* check AH/ESP integrity. */
         if (ipsec_used && last != NULL          if (last != NULL && ipsec4_in_reject_so(m, last->inp_socket)) {
             && ipsec4_in_reject_so(m, last->inp_socket)) {  
                 m_freem(m);                  m_freem(m);
                 IPSEC_STATINC(IPSEC_STAT_IN_POLVIO);                  IPSEC_STATINC(IPSEC_STAT_IN_POLVIO);
                 IP_STATDEC(IP_STAT_DELIVERED);                  IP_STATDEC(IP_STAT_DELIVERED);
Line 255  rip_pcbnotify(struct inpcbtable *table,
Line 247  rip_pcbnotify(struct inpcbtable *table,
     struct in_addr faddr, struct in_addr laddr, int proto, int errno,      struct in_addr faddr, struct in_addr laddr, int proto, int errno,
     void (*notify)(struct inpcb *, int))      void (*notify)(struct inpcb *, int))
 {  {
         struct inpcb_hdr *inph, *ninph;          struct inpcb *inp, *ninp;
         int nmatch;          int nmatch;
   
         nmatch = 0;          nmatch = 0;
         TAILQ_FOREACH_SAFE(inph, &table->inpt_queue, inph_queue, ninph) {          for (inp = (struct inpcb *)CIRCLEQ_FIRST(&table->inpt_queue);
                 struct inpcb *inp = (struct inpcb *)inph;              inp != (struct inpcb *)&table->inpt_queue;
               inp = ninp) {
                   ninp = (struct inpcb *)inp->inp_queue.cqe_next;
                 if (inp->inp_af != AF_INET)                  if (inp->inp_af != AF_INET)
                         continue;                          continue;
                 if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != proto)                  if (inp->inp_ip.ip_p && inp->inp_ip.ip_p != proto)
Line 382  rip_output(struct mbuf *m, ...)
Line 376  rip_output(struct mbuf *m, ...)
                 flags |= IP_RAWOUTPUT;                  flags |= IP_RAWOUTPUT;
                 IP_STATINC(IP_STAT_RAWOUT);                  IP_STATINC(IP_STAT_RAWOUT);
         }          }
           return (ip_output(m, opts, &inp->inp_route, flags, inp->inp_moptions,
         /*               inp->inp_socket, &inp->inp_errormtu));
          * IP output.  Note: if IP_RETURNMTU flag is set, the MTU size  
          * will be stored in inp_errormtu.  
          */  
         return ip_output(m, opts, &inp->inp_route, flags, inp->inp_moptions,  
              inp->inp_socket);  
 }  }
   
 /*  /*
Line 481  rip_ctloutput(int op, struct socket *so,
Line 470  rip_ctloutput(int op, struct socket *so,
 }  }
   
 int  int
 rip_connect_pcb(struct inpcb *inp, struct mbuf *nam)  rip_bind(struct inpcb *inp, struct mbuf *nam)
 {  {
         struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);          struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);
   
         if (nam->m_len != sizeof(*addr))          if (nam->m_len != sizeof(*addr))
                 return (EINVAL);                  return (EINVAL);
         if (IFNET_EMPTY())          if (TAILQ_FIRST(&ifnet) == 0)
                 return (EADDRNOTAVAIL);                  return (EADDRNOTAVAIL);
         if (addr->sin_family != AF_INET)          if (addr->sin_family != AF_INET)
                 return (EAFNOSUPPORT);                  return (EAFNOSUPPORT);
         inp->inp_faddr = addr->sin_addr;          if (!in_nullhost(addr->sin_addr) &&
               ifa_ifwithaddr(sintosa(addr)) == 0)
                   return (EADDRNOTAVAIL);
           inp->inp_laddr = addr->sin_addr;
         return (0);          return (0);
 }  }
   
 static void  int
 rip_disconnect1(struct inpcb *inp)  rip_connect(struct inpcb *inp, struct mbuf *nam)
 {  {
           struct sockaddr_in *addr = mtod(nam, struct sockaddr_in *);
   
         inp->inp_faddr = zeroin_addr;          if (nam->m_len != sizeof(*addr))
                   return (EINVAL);
           if (TAILQ_FIRST(&ifnet) == 0)
                   return (EADDRNOTAVAIL);
           if (addr->sin_family != AF_INET)
                   return (EAFNOSUPPORT);
           inp->inp_faddr = addr->sin_addr;
           return (0);
 }  }
   
 static int  void
 rip_attach(struct socket *so, int proto)  rip_disconnect(struct inpcb *inp)
 {  {
         struct inpcb *inp;  
         int error;  
   
         KASSERT(sotoinpcb(so) == NULL);          inp->inp_faddr = zeroin_addr;
         sosetlock(so);  
   
         if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {  
                 error = soreserve(so, rip_sendspace, rip_recvspace);  
                 if (error) {  
                         return error;  
                 }  
         }  
   
         error = in_pcballoc(so, &rawcbtable);  
         if (error) {  
                 return error;  
         }  
         inp = sotoinpcb(so);  
         inp->inp_ip.ip_p = proto;  
         KASSERT(solocked(so));  
   
         return 0;  
 }  }
   
 static void  u_long  rip_sendspace = RIPSNDQ;
 rip_detach(struct socket *so)  u_long  rip_recvspace = RIPRCVQ;
   
   /*ARGSUSED*/
   int
   rip_usrreq(struct socket *so, int req,
       struct mbuf *m, struct mbuf *nam, struct mbuf *control, struct lwp *l)
 {  {
         struct inpcb *inp;          struct inpcb *inp;
           int s;
         KASSERT(solocked(so));          int error = 0;
         inp = sotoinpcb(so);  
         KASSERT(inp != NULL);  
   
 #ifdef MROUTING  #ifdef MROUTING
         extern struct socket *ip_mrouter;          extern struct socket *ip_mrouter;
         if (so == ip_mrouter) {  
                 ip_mrouter_done();  
         }  
 #endif  #endif
         in_pcbdetach(inp);  
 }  
   
 static int  
 rip_accept(struct socket *so, struct mbuf *nam)  
 {  
         KASSERT(solocked(so));  
   
         panic("rip_accept");  
   
         return EOPNOTSUPP;          if (req == PRU_CONTROL)
 }                  return in_control(so, (long)m, nam, (struct ifnet *)control, l);
   
 static int          s = splsoftnet();
 rip_bind(struct socket *so, struct mbuf *nam, struct lwp *l)  
 {  
         struct inpcb *inp = sotoinpcb(so);  
         struct sockaddr_in *addr;  
         int error = 0;  
         int s;  
   
         KASSERT(solocked(so));          if (req == PRU_PURGEIF) {
         KASSERT(inp != NULL);                  mutex_enter(softnet_lock);
         KASSERT(nam != NULL);                  in_pcbpurgeif0(&rawcbtable, (struct ifnet *)control);
                   in_purgeif((struct ifnet *)control);
                   in_pcbpurgeif(&rawcbtable, (struct ifnet *)control);
                   mutex_exit(softnet_lock);
                   splx(s);
                   return (0);
           }
   
         s = splsoftnet();          inp = sotoinpcb(so);
         addr = mtod(nam, struct sockaddr_in *);  #ifdef DIAGNOSTIC
         if (nam->m_len != sizeof(*addr)) {          if (req != PRU_SEND && req != PRU_SENDOOB && control)
                   panic("rip_usrreq: unexpected control mbuf");
   #endif
           if (inp == NULL && req != PRU_ATTACH) {
                 error = EINVAL;                  error = EINVAL;
                 goto release;                  goto release;
         }          }
         if (IFNET_EMPTY()) {  
                 error = EADDRNOTAVAIL;  
                 goto release;  
         }  
         if (addr->sin_family != AF_INET) {  
                 error = EAFNOSUPPORT;  
                 goto release;  
         }  
         if (!in_nullhost(addr->sin_addr) &&  
             ifa_ifwithaddr(sintosa(addr)) == 0) {  
                 error = EADDRNOTAVAIL;  
                 goto release;  
         }  
         inp->inp_laddr = addr->sin_addr;  
   
 release:  
         splx(s);  
         return error;  
 }  
   
 static int  
 rip_listen(struct socket *so, struct lwp *l)  
 {  
         KASSERT(solocked(so));  
   
         return EOPNOTSUPP;  
 }  
   
 static int  
 rip_connect(struct socket *so, struct mbuf *nam, struct lwp *l)  
 {  
         struct inpcb *inp = sotoinpcb(so);  
         int error = 0;  
         int s;  
   
         KASSERT(solocked(so));          switch (req) {
         KASSERT(inp != NULL);  
         KASSERT(nam != NULL);  
   
         s = splsoftnet();          case PRU_ATTACH:
         error = rip_connect_pcb(inp, nam);                  sosetlock(so);
         if (! error)                  if (inp != 0) {
                 soisconnected(so);                          error = EISCONN;
         splx(s);                          break;
                   }
   
         return error;                  if (l == NULL) {
 }                          error = EACCES;
                           break;
                   }
   
 static int                  /* XXX: raw socket permissions are checked in socreate() */
 rip_connect2(struct socket *so, struct socket *so2)  
 {  
         KASSERT(solocked(so));  
   
         return EOPNOTSUPP;                  if (so->so_snd.sb_hiwat == 0 || so->so_rcv.sb_hiwat == 0) {
 }                          error = soreserve(so, rip_sendspace, rip_recvspace);
                           if (error)
                                   break;
                   }
                   error = in_pcballoc(so, &rawcbtable);
                   if (error)
                           break;
                   inp = sotoinpcb(so);
                   inp->inp_ip.ip_p = (long)nam;
                   break;
   
 static int          case PRU_DETACH:
 rip_disconnect(struct socket *so)  #ifdef MROUTING
 {                  if (so == ip_mrouter)
         struct inpcb *inp = sotoinpcb(so);                          ip_mrouter_done();
         int s;  #endif
                   in_pcbdetach(inp);
                   break;
   
         KASSERT(solocked(so));          case PRU_BIND:
         KASSERT(inp != NULL);                  error = rip_bind(inp, nam);
                   break;
   
         s = splsoftnet();          case PRU_LISTEN:
         soisdisconnected(so);                  error = EOPNOTSUPP;
         rip_disconnect1(inp);                  break;
         splx(s);  
   
         return 0;          case PRU_CONNECT:
 }                  error = rip_connect(inp, nam);
                   if (error)
                           break;
                   soisconnected(so);
                   break;
   
 static int          case PRU_CONNECT2:
 rip_shutdown(struct socket *so)                  error = EOPNOTSUPP;
 {                  break;
         int s;  
   
         KASSERT(solocked(so));          case PRU_DISCONNECT:
                   soisdisconnected(so);
                   rip_disconnect(inp);
                   break;
   
         /*          /*
          * Mark the connection as being incapable of further input.           * Mark the connection as being incapable of further input.
          */           */
         s = splsoftnet();          case PRU_SHUTDOWN:
         socantsendmore(so);                  socantsendmore(so);
         splx(s);                  break;
   
         return 0;  
 }  
   
 static int  
 rip_abort(struct socket *so)  
 {  
         KASSERT(solocked(so));  
   
         panic("rip_abort");  
   
         return EOPNOTSUPP;  
 }  
   
 static int  
 rip_ioctl(struct socket *so, u_long cmd, void *nam, struct ifnet *ifp)  
 {  
         return in_control(so, cmd, nam, ifp);  
 }  
   
 static int  
 rip_stat(struct socket *so, struct stat *ub)  
 {  
         KASSERT(solocked(so));  
   
         /* stat: don't bother with a blocksize. */  
         return 0;  
 }  
   
 static int  
 rip_peeraddr(struct socket *so, struct mbuf *nam)  
 {  
         int s;  
   
         KASSERT(solocked(so));  
         KASSERT(sotoinpcb(so) != NULL);  
         KASSERT(nam != NULL);  
   
         s = splsoftnet();  
         in_setpeeraddr(sotoinpcb(so), nam);  
         splx(s);  
   
         return 0;  
 }  
   
 static int  
 rip_sockaddr(struct socket *so, struct mbuf *nam)  
 {  
         int s;  
   
         KASSERT(solocked(so));  
         KASSERT(sotoinpcb(so) != NULL);  
         KASSERT(nam != NULL);  
   
         s = splsoftnet();  
         in_setsockaddr(sotoinpcb(so), nam);  
         splx(s);  
   
         return 0;  
 }  
   
 static int  
 rip_rcvd(struct socket *so, int flags, struct lwp *l)  
 {  
         KASSERT(solocked(so));  
   
         return EOPNOTSUPP;  
 }  
   
 static int  
 rip_recvoob(struct socket *so, struct mbuf *m, int flags)  
 {  
         KASSERT(solocked(so));  
   
         return EOPNOTSUPP;  
 }  
   
 static int  
 rip_send(struct socket *so, struct mbuf *m, struct mbuf *nam,  
     struct mbuf *control, struct lwp *l)  
 {  
         struct inpcb *inp = sotoinpcb(so);  
         int error = 0;  
         int s;  
   
         KASSERT(solocked(so));          case PRU_RCVD:
         KASSERT(inp != NULL);                  error = EOPNOTSUPP;
         KASSERT(m != NULL);                  break;
   
         /*          /*
          * Ship a packet out.  The appropriate raw output           * Ship a packet out.  The appropriate raw output
          * routine handles any massaging necessary.           * routine handles any massaging necessary.
          */           */
         if (control && control->m_len) {          case PRU_SEND:
                 m_freem(control);                  if (control && control->m_len) {
                 m_freem(m);                          m_freem(control);
                 return EINVAL;  
         }  
   
         s = splsoftnet();  
         if (nam) {  
                 if ((so->so_state & SS_ISCONNECTED) != 0) {  
                         error = EISCONN;  
                         goto die;  
                 }  
                 error = rip_connect_pcb(inp, nam);  
                 if (error) {  
                 die:  
                         m_freem(m);                          m_freem(m);
                         splx(s);                          error = EINVAL;
                         return error;                          break;
                 }  
         } else {  
                 if ((so->so_state & SS_ISCONNECTED) == 0) {  
                         error = ENOTCONN;  
                         goto die;  
                 }                  }
           {
                   if (nam) {
                           if ((so->so_state & SS_ISCONNECTED) != 0) {
                                   error = EISCONN;
                                   goto die;
                           }
                           error = rip_connect(inp, nam);
                           if (error) {
                           die:
                                   m_freem(m);
                                   break;
                           }
                   } else {
                           if ((so->so_state & SS_ISCONNECTED) == 0) {
                                   error = ENOTCONN;
                                   goto die;
                           }
                   }
                   error = rip_output(m, inp);
                   if (nam)
                           rip_disconnect(inp);
         }          }
         error = rip_output(m, inp);                  break;
         if (nam)  
                 rip_disconnect1(inp);  
   
         splx(s);          case PRU_SENSE:
         return error;                  /*
 }                   * stat: don't bother with a blocksize.
                    */
                   splx(s);
                   return (0);
   
 static int          case PRU_RCVOOB:
 rip_sendoob(struct socket *so, struct mbuf *m, struct mbuf *control)                  error = EOPNOTSUPP;
 {                  break;
         KASSERT(solocked(so));  
   
         m_freem(m);          case PRU_SENDOOB:
         m_freem(control);                  m_freem(control);
                   m_freem(m);
                   error = EOPNOTSUPP;
                   break;
   
         return EOPNOTSUPP;          case PRU_SOCKADDR:
 }                  in_setsockaddr(inp, nam);
                   break;
   
 static int          case PRU_PEERADDR:
 rip_purgeif(struct socket *so, struct ifnet *ifp)                  in_setpeeraddr(inp, nam);
 {                  break;
         int s;  
   
         s = splsoftnet();          default:
         mutex_enter(softnet_lock);                  panic("rip_usrreq");
         in_pcbpurgeif0(&rawcbtable, ifp);          }
         in_purgeif(ifp);  
         in_pcbpurgeif(&rawcbtable, ifp);  
         mutex_exit(softnet_lock);  
         splx(s);  
   
         return 0;  release:
           splx(s);
           return (error);
 }  }
   
 int  
 rip_usrreq(struct socket *so, int req, struct mbuf *m, struct mbuf *nam,  
     struct mbuf *control, struct lwp *l)  
 {  
         KASSERT(req != PRU_ATTACH);  
         KASSERT(req != PRU_DETACH);  
         KASSERT(req != PRU_ACCEPT);  
         KASSERT(req != PRU_BIND);  
         KASSERT(req != PRU_LISTEN);  
         KASSERT(req != PRU_CONNECT);  
         KASSERT(req != PRU_CONNECT2);  
         KASSERT(req != PRU_DISCONNECT);  
         KASSERT(req != PRU_SHUTDOWN);  
         KASSERT(req != PRU_ABORT);  
         KASSERT(req != PRU_CONTROL);  
         KASSERT(req != PRU_SENSE);  
         KASSERT(req != PRU_PEERADDR);  
         KASSERT(req != PRU_SOCKADDR);  
         KASSERT(req != PRU_RCVD);  
         KASSERT(req != PRU_RCVOOB);  
         KASSERT(req != PRU_SEND);  
         KASSERT(req != PRU_SENDOOB);  
         KASSERT(req != PRU_PURGEIF);  
   
         KASSERT(solocked(so));  
   
         if (sotoinpcb(so) == NULL)  
                 return EINVAL;  
   
         panic("rip_usrreq");  
   
         return 0;  
 }  
   
 PR_WRAP_USRREQS(rip)  
 #define rip_attach      rip_attach_wrapper  
 #define rip_detach      rip_detach_wrapper  
 #define rip_accept      rip_accept_wrapper  
 #define rip_bind        rip_bind_wrapper  
 #define rip_listen      rip_listen_wrapper  
 #define rip_connect     rip_connect_wrapper  
 #define rip_connect2    rip_connect2_wrapper  
 #define rip_disconnect  rip_disconnect_wrapper  
 #define rip_shutdown    rip_shutdown_wrapper  
 #define rip_abort       rip_abort_wrapper  
 #define rip_ioctl       rip_ioctl_wrapper  
 #define rip_stat        rip_stat_wrapper  
 #define rip_peeraddr    rip_peeraddr_wrapper  
 #define rip_sockaddr    rip_sockaddr_wrapper  
 #define rip_rcvd        rip_rcvd_wrapper  
 #define rip_recvoob     rip_recvoob_wrapper  
 #define rip_send        rip_send_wrapper  
 #define rip_sendoob     rip_sendoob_wrapper  
 #define rip_purgeif     rip_purgeif_wrapper  
 #define rip_usrreq      rip_usrreq_wrapper  
   
 const struct pr_usrreqs rip_usrreqs = {  
         .pr_attach      = rip_attach,  
         .pr_detach      = rip_detach,  
         .pr_accept      = rip_accept,  
         .pr_bind        = rip_bind,  
         .pr_listen      = rip_listen,  
         .pr_connect     = rip_connect,  
         .pr_connect2    = rip_connect2,  
         .pr_disconnect  = rip_disconnect,  
         .pr_shutdown    = rip_shutdown,  
         .pr_abort       = rip_abort,  
         .pr_ioctl       = rip_ioctl,  
         .pr_stat        = rip_stat,  
         .pr_peeraddr    = rip_peeraddr,  
         .pr_sockaddr    = rip_sockaddr,  
         .pr_rcvd        = rip_rcvd,  
         .pr_recvoob     = rip_recvoob,  
         .pr_send        = rip_send,  
         .pr_sendoob     = rip_sendoob,  
         .pr_purgeif     = rip_purgeif,  
         .pr_generic     = rip_usrreq,  
 };  
   
 static void  static void
 sysctl_net_inet_raw_setup(struct sysctllog **clog)  sysctl_net_inet_raw_setup(struct sysctllog **clog)
 {  {
   
         sysctl_createv(clog, 0, NULL, NULL,          sysctl_createv(clog, 0, NULL, NULL,
                        CTLFLAG_PERMANENT,                         CTLFLAG_PERMANENT,
                          CTLTYPE_NODE, "net", NULL,
                          NULL, 0, NULL, 0,
                          CTL_NET, CTL_EOL);
           sysctl_createv(clog, 0, NULL, NULL,
                          CTLFLAG_PERMANENT,
                        CTLTYPE_NODE, "inet", NULL,                         CTLTYPE_NODE, "inet", NULL,
                        NULL, 0, NULL, 0,                         NULL, 0, NULL, 0,
                        CTL_NET, PF_INET, CTL_EOL);                         CTL_NET, PF_INET, CTL_EOL);

Legend:
Removed from v.1.114.2.3  
changed lines
  Added in v.1.115

CVSweb <webmaster@jp.NetBSD.org>