Skip to content

Commit

Permalink
fix(abi): remove unused IP types
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed May 7, 2024
1 parent 3dbc0ee commit 4e91a64
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions hermit-abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 4e91a64

Please sign in to comment.