Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/raw_ip.c
| Show First 20 Lines • Show All 627 Lines • ▼ Show 20 Lines | |||||
| */ | */ | ||||
| int | int | ||||
| rip_ctloutput(struct socket *so, struct sockopt *sopt) | rip_ctloutput(struct socket *so, struct sockopt *sopt) | ||||
| { | { | ||||
| struct inpcb *inp = sotoinpcb(so); | struct inpcb *inp = sotoinpcb(so); | ||||
| int error, optval; | int error, optval; | ||||
| if (sopt->sopt_level != IPPROTO_IP) { | if (sopt->sopt_level != IPPROTO_IP) { | ||||
| if ((sopt->sopt_level == SOL_SOCKET) && | if (sopt->sopt_dir == SOPT_SET && | ||||
| (sopt->sopt_name == SO_SETFIB)) { | sopt->sopt_level == SOL_SOCKET && | ||||
| INP_WLOCK(inp); | sopt->sopt_name == SO_SETFIB) | ||||
| inp->inp_inc.inc_fibnum = so->so_fibnum; | return (ip_ctloutput(so, sopt)); | ||||
| INP_WUNLOCK(inp); | |||||
| return (0); | |||||
| } | |||||
| return (EINVAL); | return (EINVAL); | ||||
| } | } | ||||
| error = 0; | error = 0; | ||||
| switch (sopt->sopt_dir) { | switch (sopt->sopt_dir) { | ||||
| case SOPT_GET: | case SOPT_GET: | ||||
| switch (sopt->sopt_name) { | switch (sopt->sopt_name) { | ||||
| case IP_HDRINCL: | case IP_HDRINCL: | ||||
| ▲ Show 20 Lines • Show All 449 Lines • Show Last 20 Lines | |||||