| version 1.268, 2008/04/24 11:38:37 |
version 1.268.2.1, 2008/05/16 02:25:41 |
|
|
| * 2. Redistributions in binary form must reproduce the above copyright |
* 2. Redistributions in binary form must reproduce the above copyright |
| * notice, this list of conditions and the following disclaimer in the |
* notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. |
* documentation and/or other materials provided with the distribution. |
| * 3. All advertising materials mentioning features or use of this software |
|
| * must display the following acknowledgement: |
|
| * This product includes software developed by the NetBSD |
|
| * Foundation, Inc. and its contributors. |
|
| * 4. Neither the name of The NetBSD Foundation nor the names of its |
|
| * contributors may be used to endorse or promote products derived |
|
| * from this software without specific prior written permission. |
|
| * |
* |
| * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS |
| * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
|
|
| ip_nmbclusters_changed(); |
ip_nmbclusters_changed(); |
| |
|
| TAILQ_INIT(&in_ifaddrhead); |
TAILQ_INIT(&in_ifaddrhead); |
| in_ifaddrhashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IFADDR, |
in_ifaddrhashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, true, |
| M_WAITOK, &in_ifaddrhash); |
&in_ifaddrhash); |
| in_multihashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, M_IPMADDR, |
in_multihashtbl = hashinit(IN_IFADDR_HASH_SIZE, HASH_LIST, true, |
| M_WAITOK, &in_multihash); |
&in_multihash); |
| ip_mtudisc_timeout_q = rt_timer_queue_create(ip_mtudisc_timeout); |
ip_mtudisc_timeout_q = rt_timer_queue_create(ip_mtudisc_timeout); |
| #ifdef GATEWAY |
#ifdef GATEWAY |
| ipflow_init(ip_hashsize); |
ipflow_init(ip_hashsize); |
| Line 1443 ip_slowtimo(void) |
|
| Line 1436 ip_slowtimo(void) |
|
| } |
} |
| |
|
| /* |
/* |
| * Drain off all datagram fragments. |
* Drain off all datagram fragments. Don't acquire softnet_lock as |
| |
* can be called from hardware interrupt context. |
| */ |
*/ |
| void |
void |
| ip_drain(void) |
ip_drain(void) |
| { |
{ |
| |
|
| mutex_enter(softnet_lock); |
|
| KERNEL_LOCK(1, NULL); |
KERNEL_LOCK(1, NULL); |
| |
|
| /* |
/* |
|
|
| } |
} |
| |
|
| KERNEL_UNLOCK_ONE(NULL); |
KERNEL_UNLOCK_ONE(NULL); |
| mutex_exit(softnet_lock); |
|
| } |
} |
| |
|
| /* |
/* |
| Line 2210 sysctl_net_inet_ip_hashsize(SYSCTLFN_ARG |
|
| Line 2202 sysctl_net_inet_ip_hashsize(SYSCTLFN_ARG |
|
| static int |
static int |
| sysctl_net_inet_ip_stats(SYSCTLFN_ARGS) |
sysctl_net_inet_ip_stats(SYSCTLFN_ARGS) |
| { |
{ |
| netstat_sysctl_context ctx; |
|
| uint64_t ips[IP_NSTATS]; |
|
| |
|
| ctx.ctx_stat = ipstat_percpu; |
return (NETSTAT_SYSCTL(ipstat_percpu, IP_NSTATS)); |
| ctx.ctx_counters = ips; |
|
| ctx.ctx_ncounters = IP_NSTATS; |
|
| return (NETSTAT_SYSCTL(&ctx)); |
|
| } |
} |
| |
|
| SYSCTL_SETUP(sysctl_net_inet_ip_setup, "sysctl net.inet.ip subtree setup") |
SYSCTL_SETUP(sysctl_net_inet_ip_setup, "sysctl net.inet.ip subtree setup") |