Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linux/linux_socket.c
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
#define SECURITY_CONTEXT_STRING "unconfined" | #define SECURITY_CONTEXT_STRING "unconfined" | ||||
static int linux_sendmsg_common(struct thread *, l_int, struct l_msghdr *, | static int linux_sendmsg_common(struct thread *, l_int, struct l_msghdr *, | ||||
l_uint); | l_uint); | ||||
static int linux_recvmsg_common(struct thread *, l_int, struct l_msghdr *, | static int linux_recvmsg_common(struct thread *, l_int, struct l_msghdr *, | ||||
l_uint, struct msghdr *); | l_uint, struct msghdr *); | ||||
static int linux_set_socket_flags(int, int *); | static int linux_set_socket_flags(int, int *); | ||||
#define SOL_NETLINK 270 | |||||
static int | static int | ||||
linux_to_bsd_sockopt_level(int level) | linux_to_bsd_sockopt_level(int level) | ||||
{ | { | ||||
if (level == LINUX_SOL_SOCKET) | if (level == LINUX_SOL_SOCKET) | ||||
return (SOL_SOCKET); | return (SOL_SOCKET); | ||||
/* Remaining values are RFC-defined protocol numbers. */ | /* Remaining values are RFC-defined protocol numbers. */ | ||||
return (level); | return (level); | ||||
▲ Show 20 Lines • Show All 1,983 Lines • ▼ Show 20 Lines | case IPPROTO_IP: | ||||
} | } | ||||
name = linux_to_bsd_ip_sockopt(args->optname); | name = linux_to_bsd_ip_sockopt(args->optname); | ||||
break; | break; | ||||
case IPPROTO_IPV6: | case IPPROTO_IPV6: | ||||
name = linux_to_bsd_ip6_sockopt(args->optname); | name = linux_to_bsd_ip6_sockopt(args->optname); | ||||
break; | break; | ||||
case IPPROTO_TCP: | case IPPROTO_TCP: | ||||
name = linux_to_bsd_tcp_sockopt(args->optname); | name = linux_to_bsd_tcp_sockopt(args->optname); | ||||
break; | |||||
case SOL_NETLINK: | |||||
level = SOL_SOCKET; | |||||
name = args->optname; | |||||
break; | break; | ||||
default: | default: | ||||
name = -1; | name = -1; | ||||
break; | break; | ||||
} | } | ||||
if (name < 0) { | if (name < 0) { | ||||
if (name == -1) | if (name == -1) | ||||
linux_msg(curthread, | linux_msg(curthread, | ||||
▲ Show 20 Lines • Show All 470 Lines • Show Last 20 Lines |