Skip to content

Commit

Permalink
use more valid file name for the socket interface
Browse files Browse the repository at this point in the history
  • Loading branch information
stlankes committed Feb 17, 2024
1 parent d374f28 commit 55c620e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
8 changes: 7 additions & 1 deletion src/fd/socket/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ use smoltcp::wire::{IpEndpoint, IpListenEndpoint};
use crate::executor::block_on;
use crate::executor::network::{now, Handle, NetworkState, NIC};
use crate::fd::{IoCtl, IoError, ObjectInterface, PollEvent, SocketOption};
use crate::syscalls::net::*;
use crate::DEFAULT_KEEP_ALIVE_INTERVAL;

/// further receives will be disallowed
pub const SHUT_RD: i32 = 0;
/// further sends will be disallowed
pub const SHUT_WR: i32 = 1;
/// further sends and receives will be disallowed
pub const SHUT_RDWR: i32 = 2;

fn get_ephemeral_port() -> u16 {
static LOCAL_ENDPOINT: AtomicU16 = AtomicU16::new(49152);

Expand Down
4 changes: 2 additions & 2 deletions src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ mod futex;
mod interfaces;
#[cfg(feature = "newlib")]
mod lwip;
#[cfg(all(any(feature = "tcp", feature = "udp"), not(feature = "newlib")))]
pub mod net;
mod processor;
#[cfg(feature = "newlib")]
mod recmutex;
mod semaphore;
#[cfg(all(any(feature = "tcp", feature = "udp"), not(feature = "newlib")))]
pub mod socket;
mod spinlock;
mod system;
#[cfg(feature = "common-os")]
Expand Down
3 changes: 0 additions & 3 deletions src/syscalls/net.rs → src/syscalls/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ 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 SHUT_RD: i32 = 0;
pub const SHUT_WR: i32 = 1;
pub const SHUT_RDWR: i32 = 2;
pub const SOL_SOCKET: i32 = 4095;
pub const SO_BROADCAST: i32 = 32;
pub const SO_ERROR: i32 = 4103;
Expand Down

0 comments on commit 55c620e

Please sign in to comment.