Move smoltcp-related code to bigtcp

This commit is contained in:
Ruihan Li
2024-09-06 18:49:37 +08:00
committed by Tate, Hongliang Tian
parent 9fba9445bd
commit 67d3682116
39 changed files with 542 additions and 382 deletions

View File

@ -5,14 +5,6 @@ mod common;
mod datagram;
pub mod stream;
pub use addr::{IpAddress, IpEndpoint, Ipv4Address, PortNum};
use addr::UNSPECIFIED_LOCAL_ENDPOINT;
pub use datagram::DatagramSocket;
pub use stream::StreamSocket;
/// A local endpoint, which indicates that the local endpoint is unspecified.
///
/// According to the Linux man pages and the Linux implementation, `getsockname()` will _not_ fail
/// even if the socket is unbound. Instead, it will return an unspecified socket address. This
/// unspecified endpoint helps with that.
const UNSPECIFIED_LOCAL_ENDPOINT: IpEndpoint =
IpEndpoint::new(IpAddress::Ipv4(Ipv4Address::UNSPECIFIED), 0);