From 50bbf3a39c1faf35533fd841416ebfc9c0ca5d60 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Fri, 16 Feb 2024 18:58:20 +0000 Subject: [PATCH] redox add new netinet constants --- libc-test/semver/redox.txt | 12 ++++++++++++ src/unix/redox/mod.rs | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/libc-test/semver/redox.txt b/libc-test/semver/redox.txt index 80095a09f5345..48b1e3c18278e 100644 --- a/libc-test/semver/redox.txt +++ b/libc-test/semver/redox.txt @@ -96,6 +96,17 @@ EUSERS EXFULL FIONREAD IMAXBEL +IP_RECVTOS +IP_TOS +IPPROTO_ICMP +IPPROTO_IDP +IPPROTO_IGMP +IPPROTO_IP +IPPROTO_IPV6 +IPPROTO_MAX +IPPROTO_PUP +IPPROTO_TCP +IPPROTO_UDP IPV6_ADD_MEMBERSHIP IPV6_DROP_MEMBERSHIP IUCLC @@ -129,6 +140,7 @@ SIGPWR SIGSTKFLT SOCK_CLOEXEC SOCK_NONBLOCK +SOCK_RAW SO_BSDCOMPAT SO_DOMAIN SO_NO_CHECK diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index e219695107d7b..017d5038905f6 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -585,7 +585,13 @@ pub const IP_MULTICAST_TTL: ::c_int = 33; pub const IP_MULTICAST_LOOP: ::c_int = 34; pub const IP_ADD_MEMBERSHIP: ::c_int = 35; pub const IP_DROP_MEMBERSHIP: ::c_int = 36; +pub const IP_TOS: ::c_int = 1; +pub const IP_RECVTOS: ::c_int = 2; +pub const IPPROTO_IGMP: ::c_int = 2; +pub const IPPROTO_PUP: ::c_int = 12; +pub const IPPROTO_IDP: ::c_int = 22; pub const IPPROTO_RAW: ::c_int = 255; +pub const IPPROTO_MAX: ::c_int = 255; // } // netinet/tcp.h @@ -810,6 +816,7 @@ pub const SO_PROTOCOL: ::c_int = 38; pub const SO_DOMAIN: ::c_int = 39; pub const SOCK_STREAM: ::c_int = 1; pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_RAW: ::c_int = 3; pub const SOCK_NONBLOCK: ::c_int = 0o4_000; pub const SOCK_CLOEXEC: ::c_int = 0o2_000_000; pub const SOCK_SEQPACKET: ::c_int = 5;