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

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

Diff for /src/sys/netinet6/ip6_input.c between version 1.98 and 1.98.2.1

version 1.98, 2007/03/07 22:20:04 version 1.98.2.1, 2007/04/10 13:26:51
Line 183  ip6_init()
Line 183  ip6_init()
   
         ip6_init2((void *)0);          ip6_init2((void *)0);
 #ifdef GATEWAY  #ifdef GATEWAY
         ip6flow_init();          ip6flow_init(ip6_hashsize);
 #endif  #endif
   
 #ifdef PFIL_HOOKS  #ifdef PFIL_HOOKS
Line 1611  ip6_delaux(m)
Line 1611  ip6_delaux(m)
  * we could reduce this value, call ip6flow_reap();   * we could reduce this value, call ip6flow_reap();
  */   */
 static int  static int
 sysctl_net_inet_ip6_maxflows(SYSCTLFN_ARGS)  sysctl_net_inet6_ip6_maxflows(SYSCTLFN_ARGS)
 {  {
         int s;          int s;
   
         s = sysctl_lookup(SYSCTLFN_CALL(rnode));          s = sysctl_lookup(SYSCTLFN_CALL(rnode));
         if (s)          if (s || newp == NULL)
                 return (s);                  return (s);
   
         s = splsoftnet();          s = splsoftnet();
Line 1625  sysctl_net_inet_ip6_maxflows(SYSCTLFN_AR
Line 1625  sysctl_net_inet_ip6_maxflows(SYSCTLFN_AR
   
         return (0);          return (0);
 }  }
   
   static int
   sysctl_net_inet6_ip6_hashsize(SYSCTLFN_ARGS)
   {
           int error, tmp;
           struct sysctlnode node;
   
           node = *rnode;
           tmp = ip6_hashsize;
           node.sysctl_data = &tmp;
           error = sysctl_lookup(SYSCTLFN_CALL(&node));
           if (error || newp == NULL)
                   return (error);
   
           if ((tmp & (tmp - 1)) == 0 && tmp != 0) {
                   /*
                    * Can only fail due to malloc()
                    */
                   if (ip6flow_invalidate_all(tmp))
                           return ENOMEM;
           } else {
                   /*
                    * EINVAL if not a power of 2
                    */
                   return EINVAL;
           }
   
           return (0);
   }
 #endif /* GATEWAY */  #endif /* GATEWAY */
   
 /*  /*
Line 1915  SYSCTL_SETUP(sysctl_net_inet6_ip6_setup,
Line 1944  SYSCTL_SETUP(sysctl_net_inet6_ip6_setup,
                         CTLFLAG_PERMANENT|CTLFLAG_READWRITE,                          CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
                         CTLTYPE_INT, "maxflows",                          CTLTYPE_INT, "maxflows",
                         SYSCTL_DESCR("Number of flows for fast forwarding (IPv6)"),                          SYSCTL_DESCR("Number of flows for fast forwarding (IPv6)"),
                         sysctl_net_inet_ip6_maxflows, 0, &ip6_maxflows, 0,                          sysctl_net_inet6_ip6_maxflows, 0, &ip6_maxflows, 0,
                           CTL_NET, PF_INET6, IPPROTO_IPV6,
                           CTL_CREATE, CTL_EOL);
           sysctl_createv(clog, 0, NULL, NULL,
                           CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
                           CTLTYPE_INT, "hashsize",
                           SYSCTL_DESCR("Size of hash table for fast forwarding (IPv6)"),
                           sysctl_net_inet6_ip6_hashsize, 0, &ip6_hashsize, 0,
                         CTL_NET, PF_INET6, IPPROTO_IPV6,                          CTL_NET, PF_INET6, IPPROTO_IPV6,
                         CTL_CREATE, CTL_EOL);                          CTL_CREATE, CTL_EOL);
 #endif  #endif

Legend:
Removed from v.1.98  
changed lines
  Added in v.1.98.2.1

CVSweb <webmaster@jp.NetBSD.org>