MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ff_setsockopt

Function ff_setsockopt

lib/ff_syscall_wrapper.c:967–991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965}
966
967int
968ff_setsockopt(int s, int level, int optname, const void *optval,
969 socklen_t optlen)
970{
971 int rc;
972
973 if (level == LINUX_SOL_SOCKET)
974 level = SOL_SOCKET;
975
976 optname = linux2freebsd_opt(level, optname);
977 if (optname < 0) {
978 rc = EINVAL;
979 goto kern_fail;
980 }
981
982 if ((rc = kern_setsockopt(curthread, s, level, optname,
983 __DECONST(void *, optval), UIO_USERSPACE, optlen)))
984 goto kern_fail;
985
986 return (rc);
987
988kern_fail:
989 ff_os_errno(rc);
990 return (-1);
991}
992
993int
994ff_setsockopt_freebsd(int s, int level, int optname,

Callers

nothing calls this directly

Calls 3

linux2freebsd_optFunction · 0.85
kern_setsockoptFunction · 0.85
ff_os_errnoFunction · 0.85

Tested by

no test coverage detected