version 1.163.14.1, 2008/06/02 13:24:25 |
version 1.170, 2008/04/24 11:38:38 |
|
|
MOWNER_ATTACH(&udp_rx_mowner); |
MOWNER_ATTACH(&udp_rx_mowner); |
MOWNER_ATTACH(&udp_mowner); |
MOWNER_ATTACH(&udp_mowner); |
|
|
#ifdef INET |
|
udpstat_percpu = percpu_alloc(sizeof(uint64_t) * UDP_NSTATS); |
udpstat_percpu = percpu_alloc(sizeof(uint64_t) * UDP_NSTATS); |
#endif |
|
#ifdef INET6 |
|
udp6stat_percpu = percpu_alloc(sizeof(uint64_t) * UDP6_NSTATS); |
|
#endif |
|
} |
} |
|
|
/* |
/* |
|
|
static int |
static int |
sysctl_net_inet_udp_stats(SYSCTLFN_ARGS) |
sysctl_net_inet_udp_stats(SYSCTLFN_ARGS) |
{ |
{ |
|
netstat_sysctl_context ctx; |
|
uint64_t udps[UDP_NSTATS]; |
|
|
return (NETSTAT_SYSCTL(udpstat_percpu, UDP_NSTATS)); |
ctx.ctx_stat = udpstat_percpu; |
|
ctx.ctx_counters = udps; |
|
ctx.ctx_ncounters = UDP_NSTATS; |
|
return (NETSTAT_SYSCTL(&ctx)); |
} |
} |
|
|
/* |
/* |