Home
last modified time | relevance | path

Searched refs:Endpoint (Results 1 – 3 of 3) sorted by relevance

/DragonOS-0.1.7/kernel/src/net/
Dsocket.rs21 use super::{net_core::poll_ifaces, Endpoint, Protocol, Socket, NET_DRIVERS};
161 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint) { in read() argument
173 Endpoint::Ip(Some(smoltcp::wire::IpEndpoint { in read()
182 return (Err(SystemError::EAGAIN_OR_EWOULDBLOCK), Endpoint::Ip(None)); in read()
192 fn write(&self, buf: &[u8], to: Option<super::Endpoint>) -> Result<usize, SystemError> { in write()
208 if let Some(Endpoint::Ip(Some(endpoint))) = to { in write()
269 fn connect(&mut self, _endpoint: super::Endpoint) -> Result<(), SystemError> { in connect()
288 remote_endpoint: Option<Endpoint>, // 记录远程endpoint提供给connect(), 应该使用IP地址。
327 fn do_bind(&self, socket: &mut udp::Socket, endpoint: Endpoint) -> Result<(), SystemError> { in do_bind()
328 if let Endpoint::Ip(Some(ip)) = endpoint { in do_bind()
[all …]
Dmod.rs57 pub enum Endpoint { enum
72 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint); in read() argument
80 fn write(&self, buf: &[u8], to: Option<Endpoint>) -> Result<usize, SystemError>; in write()
92 fn connect(&mut self, endpoint: Endpoint) -> Result<(), SystemError>; in connect()
101 fn bind(&mut self, _endpoint: Endpoint) -> Result<(), SystemError> { in bind()
130 fn accept(&mut self) -> Result<(Box<dyn Socket>, Endpoint), SystemError> { in accept() argument
137 fn endpoint(&self) -> Option<Endpoint> { in endpoint() argument
144 fn peer_endpoint(&self) -> Option<Endpoint> { in peer_endpoint() argument
Dsyscall.rs20 Endpoint, Protocol, ShutdownType, Socket,
231 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in do_connect()
259 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in do_bind()
565 let endpoint: Endpoint = socket.endpoint().ok_or(SystemError::EINVAL)?; in do_getsockname()
605 let endpoint: Endpoint = socket.peer_endpoint().ok_or(SystemError::EINVAL)?; in do_getpeername()
673 pub fn to_endpoint(addr: *const SockAddr, len: usize) -> Result<Endpoint, SystemError> { in to_endpoint() argument
698 return Ok(Endpoint::Ip(Some(wire::IpEndpoint::new(ip, port)))); in to_endpoint()
768 impl From<Endpoint> for SockAddr {
769 fn from(value: Endpoint) -> Self { in from()
771 Endpoint::Ip(ip_endpoint) => { in from()
[all …]