Home
last modified time | relevance | path

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

/DragonOS/kernel/src/net/socket/
H A Dinet.rs13 event_poll::EPollEventType, net_core::poll_ifaces, Endpoint, Protocol, ShutdownType,
107 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint) { in read() argument
120 Endpoint::Ip(Some(wire::IpEndpoint { in read()
129 return (Err(SystemError::EAGAIN_OR_EWOULDBLOCK), Endpoint::Ip(None)); in read()
138 fn write(&self, buf: &[u8], to: Option<Endpoint>) -> Result<usize, SystemError> { in write()
155 if let Some(Endpoint::Ip(Some(endpoint))) = to { in write()
214 fn connect(&mut self, _endpoint: Endpoint) -> Result<(), SystemError> { in connect()
245 remote_endpoint: Option<Endpoint>, // 记录远程endpoint提供给connect(), 应该使用IP地址。
296 fn do_bind(&self, socket: &mut udp::Socket, endpoint: Endpoint) -> Result<(), SystemError> { in do_bind()
297 if let Endpoint::Ip(Some(mut ip)) = endpoint { in do_bind()
[all …]
H A Dunix.rs4 use crate::{libs::spinlock::SpinLock, net::Endpoint};
63 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint) { in read() argument
71 (Ok(len), Endpoint::Inode(self.peer_inode.clone())) in read()
74 fn write(&self, buf: &[u8], _to: Option<Endpoint>) -> Result<usize, SystemError> { in write()
84 fn connect(&mut self, endpoint: Endpoint) -> Result<(), SystemError> { in connect()
89 if let Endpoint::Inode(inode) = endpoint { in connect()
174 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint) { in read() argument
182 (Ok(len), Endpoint::Inode(self.peer_inode.clone())) in read()
185 fn write(&self, buf: &[u8], _to: Option<Endpoint>) -> Result<usize, SystemError> { in write()
195 fn connect(&mut self, endpoint: Endpoint) -> Result<(), SystemError> { in connect()
[all …]
H A Dmod.rs41 Endpoint, Protocol, ShutdownType,
104 fn read(&self, buf: &mut [u8]) -> (Result<usize, SystemError>, Endpoint); in read() argument
112 fn write(&self, buf: &[u8], to: Option<Endpoint>) -> Result<usize, SystemError>; in write()
124 fn connect(&mut self, _endpoint: Endpoint) -> Result<(), SystemError>; in connect()
133 fn bind(&mut self, _endpoint: Endpoint) -> Result<(), SystemError> { in bind()
162 fn accept(&mut self) -> Result<(Box<dyn Socket>, Endpoint), SystemError> { in accept() argument
169 fn endpoint(&self) -> Option<Endpoint> { in endpoint() argument
176 fn peer_endpoint(&self) -> Option<Endpoint> { in peer_endpoint() argument
311 if let Some(Endpoint::Ip(Some(ip))) = socket.endpoint() { in do_close()
/DragonOS/kernel/src/net/
H A Dsyscall.rs23 Endpoint, Protocol, ShutdownType,
85 .connect(Endpoint::Inode(Some(inode1.clone())))?; in socketpair()
88 .connect(Endpoint::Inode(Some(inode0.clone())))?; in socketpair()
198 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in connect()
215 let endpoint: Endpoint = SockAddr::to_endpoint(addr, addrlen)?; in bind()
463 let endpoint: Endpoint = socket.endpoint().ok_or(SystemError::EINVAL)?; in getsockname()
493 let endpoint: Endpoint = socket.peer_endpoint().ok_or(SystemError::EINVAL)?; in getpeername()
562 pub fn to_endpoint(addr: *const SockAddr, len: usize) -> Result<Endpoint, SystemError> { in to_endpoint() argument
584 return Ok(Endpoint::Ip(Some(wire::IpEndpoint::new(ip, port)))); in to_endpoint()
606 return Ok(Endpoint::Inode(socketinode.cloned())); in to_endpoint()
[all …]
H A Dmod.rs41 pub enum Endpoint { enum