From 661faa98d1400afeccb32f1c69dd18381bcb1380 Mon Sep 17 00:00:00 2001 From: Stefan Lankes Date: Tue, 27 Feb 2024 09:48:53 +0100 Subject: [PATCH] synchronize naming of constants with hermit-abi --- src/syscalls/socket.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/syscalls/socket.rs b/src/syscalls/socket.rs index 4a20bc0133..ef785823fd 100644 --- a/src/syscalls/socket.rs +++ b/src/syscalls/socket.rs @@ -27,18 +27,22 @@ pub const IPV6_ADD_MEMBERSHIP: i32 = 12; pub const IPV6_DROP_MEMBERSHIP: i32 = 13; pub const IPV6_MULTICAST_LOOP: i32 = 19; pub const IPV6_V6ONLY: i32 = 27; +pub const IP_TOS: i32 = 1; pub const IP_TTL: i32 = 2; pub const IP_MULTICAST_TTL: i32 = 5; pub const IP_MULTICAST_LOOP: i32 = 7; pub const IP_ADD_MEMBERSHIP: i32 = 3; pub const IP_DROP_MEMBERSHIP: i32 = 4; pub const SOL_SOCKET: i32 = 4095; -pub const SO_BROADCAST: i32 = 32; -pub const SO_ERROR: i32 = 4103; -pub const SO_RCVTIMEO: i32 = 4102; -pub const SO_REUSEADDR: i32 = 4; -pub const SO_SNDTIMEO: i32 = 4101; -pub const SO_LINGER: i32 = 128; +pub const SO_REUSEADDR: i32 = 0x0004; +pub const SO_KEEPALIVE: i32 = 0x0008; +pub const SO_BROADCAST: i32 = 0x0020; +pub const SO_LINGER: i32 = 0x0080; +pub const SO_SNDBUF: i32 = 0x1001; +pub const SO_RCVBUF: i32 = 0x1002; +pub const SO_SNDTIMEO: i32 = 0x1005; +pub const SO_RCVTIMEO: i32 = 0x1006; +pub const SO_ERROR: i32 = 0x1007; pub const TCP_NODELAY: i32 = 1; pub const MSG_PEEK: i32 = 1; pub const EAI_NONAME: i32 = -2200;