12345678910111213141516171819202122232425262728293031323334353637383940 |
- use crate::{filesystem::vfs::InodeId, net::socket};
- use alloc::{string::String, sync::Arc};
- pub use smoltcp::wire::IpEndpoint;
- #[derive(Debug, Clone)]
- pub enum Endpoint {
-
- LinkLayer(LinkLayerEndpoint),
-
- Ip(IpEndpoint),
-
- Inode((Arc<socket::Inode>, String)),
-
- Unixpath((InodeId, String)),
- }
- #[derive(Debug, Clone)]
- pub struct LinkLayerEndpoint {
-
- pub interface: usize,
- }
- impl LinkLayerEndpoint {
-
-
-
-
-
- pub fn new(interface: usize) -> Self {
- Self { interface }
- }
- }
- impl From<IpEndpoint> for Endpoint {
- fn from(endpoint: IpEndpoint) -> Self {
- Self::Ip(endpoint)
- }
- }
|