version 1.96.2.1, 2008/05/18 12:35:35 |
version 1.97, 2008/04/23 06:09:05 |
Line 293 rip6_input(struct mbuf **mp, int *offp, |
|
Line 293 rip6_input(struct mbuf **mp, int *offp, |
|
return IPPROTO_DONE; |
return IPPROTO_DONE; |
} |
} |
|
|
void * |
void |
rip6_ctlinput(int cmd, const struct sockaddr *sa, void *d) |
rip6_ctlinput(int cmd, const struct sockaddr *sa, void *d) |
{ |
{ |
struct ip6_hdr *ip6; |
struct ip6_hdr *ip6; |
Line 305 rip6_ctlinput(int cmd, const struct sock |
|
Line 305 rip6_ctlinput(int cmd, const struct sock |
|
|
|
if (sa->sa_family != AF_INET6 || |
if (sa->sa_family != AF_INET6 || |
sa->sa_len != sizeof(struct sockaddr_in6)) |
sa->sa_len != sizeof(struct sockaddr_in6)) |
return NULL;; |
return; |
|
|
if ((unsigned)cmd >= PRC_NCMDS) |
if ((unsigned)cmd >= PRC_NCMDS) |
return NULL;; |
return; |
if (PRC_IS_REDIRECT(cmd)) |
if (PRC_IS_REDIRECT(cmd)) |
notify = in6_rtchange, d = NULL; |
notify = in6_rtchange, d = NULL; |
else if (cmd == PRC_HOSTDEAD) |
else if (cmd == PRC_HOSTDEAD) |
Line 316 rip6_ctlinput(int cmd, const struct sock |
|
Line 316 rip6_ctlinput(int cmd, const struct sock |
|
else if (cmd == PRC_MSGSIZE) |
else if (cmd == PRC_MSGSIZE) |
; /* special code is present, see below */ |
; /* special code is present, see below */ |
else if (inet6ctlerrmap[cmd] == 0) |
else if (inet6ctlerrmap[cmd] == 0) |
return NULL;; |
return; |
|
|
/* if the parameter is from icmp6, decode it. */ |
/* if the parameter is from icmp6, decode it. */ |
if (d != NULL) { |
if (d != NULL) { |
Line 385 rip6_ctlinput(int cmd, const struct sock |
|
Line 385 rip6_ctlinput(int cmd, const struct sock |
|
|
|
(void) in6_pcbnotify(&raw6cbtable, sa, 0, |
(void) in6_pcbnotify(&raw6cbtable, sa, 0, |
(const struct sockaddr *)sa6_src, 0, cmd, cmdarg, notify); |
(const struct sockaddr *)sa6_src, 0, cmd, cmdarg, notify); |
return NULL; |
|
} |
} |
|
|
/* |
/* |
Line 628 rip6_usrreq(struct socket *so, int req, |
|
Line 627 rip6_usrreq(struct socket *so, int req, |
|
(struct ifnet *)control, l); |
(struct ifnet *)control, l); |
|
|
if (req == PRU_PURGEIF) { |
if (req == PRU_PURGEIF) { |
mutex_enter(softnet_lock); |
|
in6_pcbpurgeif0(&raw6cbtable, (struct ifnet *)control); |
in6_pcbpurgeif0(&raw6cbtable, (struct ifnet *)control); |
in6_purgeif((struct ifnet *)control); |
in6_purgeif((struct ifnet *)control); |
in6_pcbpurgeif(&raw6cbtable, (struct ifnet *)control); |
in6_pcbpurgeif(&raw6cbtable, (struct ifnet *)control); |
mutex_exit(softnet_lock); |
|
return 0; |
return 0; |
} |
} |
|
|
switch (req) { |
switch (req) { |
case PRU_ATTACH: |
case PRU_ATTACH: |
sosetlock(so); |
|
if (in6p != NULL) |
if (in6p != NULL) |
panic("rip6_attach"); |
panic("rip6_attach"); |
if (!priv) { |
if (!priv) { |
Line 873 rip6_usrreq(struct socket *so, int req, |
|
Line 869 rip6_usrreq(struct socket *so, int req, |
|
static int |
static int |
sysctl_net_inet6_raw6_stats(SYSCTLFN_ARGS) |
sysctl_net_inet6_raw6_stats(SYSCTLFN_ARGS) |
{ |
{ |
|
netstat_sysctl_context ctx; |
|
uint64_t rip6s[RIP6_NSTATS]; |
|
|
return (NETSTAT_SYSCTL(rip6stat_percpu, RIP6_NSTATS)); |
ctx.ctx_stat = rip6stat_percpu; |
|
ctx.ctx_counters = rip6s; |
|
ctx.ctx_ncounters = RIP6_NSTATS; |
|
return (NETSTAT_SYSCTL(&ctx)); |
} |
} |
|
|
SYSCTL_SETUP(sysctl_net_inet6_raw6_setup, "sysctl net.inet6.raw6 subtree setup") |
SYSCTL_SETUP(sysctl_net_inet6_raw6_setup, "sysctl net.inet6.raw6 subtree setup") |