From 4e91a64633e4a84fcc4d7e2ca86679e3c8f420ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Tue, 7 May 2024 15:43:14 +0200 Subject: [PATCH] fix(abi): remove unused IP types MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- hermit-abi/src/lib.rs | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/hermit-abi/src/lib.rs b/hermit-abi/src/lib.rs index 5e7fcb6b1..8292ad05d 100644 --- a/hermit-abi/src/lib.rs +++ b/hermit-abi/src/lib.rs @@ -39,10 +39,6 @@ pub const HIGH_PRIO: Priority = Priority::from(3); pub const NORMAL_PRIO: Priority = Priority::from(2); pub const LOW_PRIO: Priority = Priority::from(1); -/// A handle, identifying a socket -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default, Hash)] -pub struct Handle(usize); - pub const FUTEX_RELATIVE_TIMEOUT: u32 = 1; pub const CLOCK_REALTIME: clockid_t = 1; pub const CLOCK_MONOTONIC: clockid_t = 4; @@ -87,34 +83,6 @@ pub struct timeval { pub tv_usec: suseconds_t, } -/// Internet protocol version. -#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)] -pub enum Version { - Unspecified, - Ipv4, - Ipv6, -} - -/// A four-octet IPv4 address. -#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default)] -pub struct Ipv4Address(pub [u8; 4]); - -/// A sixteen-octet IPv6 address. -#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Default)] -pub struct Ipv6Address(pub [u8; 16]); - -/// An internetworking address. -#[derive(Debug, Hash, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)] -pub enum IpAddress { - /// An unspecified address. - /// May be used as a placeholder for storage where the address is not assigned yet. - Unspecified, - /// An IPv4 address. - Ipv4(Ipv4Address), - /// An IPv6 address. - Ipv6(Ipv6Address), -} - /// The largest number `rand` will return pub const RAND_MAX: i32 = 2_147_483_647;