diff --git a/src/core/libraries/network/net.h b/src/core/libraries/network/net.h index 3dfe6b32888..eb1d0796a17 100644 --- a/src/core/libraries/network/net.h +++ b/src/core/libraries/network/net.h @@ -59,22 +59,23 @@ enum OrbisNetSocketOption : u32 { ORBIS_NET_SO_KEEPALIVE = 0x00000008, ORBIS_NET_SO_BROADCAST = 0x00000020, ORBIS_NET_SO_LINGER = 0x00000080, - ORBIS_NET_SO_OOBINLINE = 0x00000100, ORBIS_NET_SO_REUSEPORT = 0x00000200, - ORBIS_NET_SO_ONESBCAST = 0x00000800, - ORBIS_NET_SO_USECRYPTO = 0x00001000, - ORBIS_NET_SO_USESIGNATURE = 0x00002000, + ORBIS_NET_SO_ONESBCAST = 0x00010000, + ORBIS_NET_SO_USECRYPTO = 0x00020000, + ORBIS_NET_SO_USESIGNATURE = 0x00040000, ORBIS_NET_SO_SNDBUF = 0x1001, ORBIS_NET_SO_RCVBUF = 0x1002, - ORBIS_NET_SO_SNDLOWAT = 0x1003, - ORBIS_NET_SO_RCVLOWAT = 0x1004, - ORBIS_NET_SO_SNDTIMEO = 0x1005, - ORBIS_NET_SO_RCVTIMEO = 0x1006, ORBIS_NET_SO_ERROR = 0x1007, ORBIS_NET_SO_TYPE = 0x1008, - ORBIS_NET_SO_NBIO = 0x1100, - ORBIS_NET_SO_TPPOLICY = 0x1101, - ORBIS_NET_SO_NAME = 0x1102 + ORBIS_NET_SO_SNDTIMEO = 0x1105, + ORBIS_NET_SO_RCVTIMEO = 0x1106, + ORBIS_NET_SO_ERROR_EX = 0x1107, + ORBIS_NET_SO_ACCEPTTIMEO = 0x1108, + ORBIS_NET_SO_CONNECTTIMEO = 0x1109, + ORBIS_NET_SO_NBIO = 0x1200, + ORBIS_NET_SO_POLICY = 0x1201, + ORBIS_NET_SO_NAME = 0x1202, + ORBIS_NET_SO_PRIORITY = 0x1203 }; struct OrbisNetSockaddr { diff --git a/src/core/libraries/network/net_error.h b/src/core/libraries/network/net_error.h index 74059047231..a085d8aa57c 100644 --- a/src/core/libraries/network/net_error.h +++ b/src/core/libraries/network/net_error.h @@ -6,6 +6,8 @@ // net errno codes constexpr int ORBIS_NET_EBADF = 9; +constexpr int ORBIS_NET_EFAULT = 14; // error codes constexpr int ORBIS_NET_ERROR_EBADF = 0x80410109; +constexpr int ORBIS_NET_ERROR_EFAULT = 0x8041010e; diff --git a/src/core/libraries/network/posix_sockets.cpp b/src/core/libraries/network/posix_sockets.cpp index f08b483c5e1..bd8ab64063f 100644 --- a/src/core/libraries/network/posix_sockets.cpp +++ b/src/core/libraries/network/posix_sockets.cpp @@ -48,6 +48,9 @@ int PosixSocket::SetSocketOptions(int level, int optname, const void* optval, un case ORBIS_NET_SO_BROADCAST: return ConvertReturnErrorCode( setsockopt(sock, level, SO_BROADCAST, (const char*)optval, optlen)); + case ORBIS_NET_SO_SNDTIMEO: + return ConvertReturnErrorCode( + setsockopt(sock, level, SO_SNDTIMEO, (const char*)optval, optlen)); } } UNREACHABLE_MSG("Unknown level ={} optname ={}", level, optname);