Skip to content

Commit 52d67c9

Browse files
committed
socket: add ethernet socket to sockets enum
1 parent 3fcff84 commit 52d67c9

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/iface/interface/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,10 @@ impl Interface {
734734
Packet::new(ip, IpPayload::Udp(udp, dns)),
735735
)
736736
}),
737+
#[cfg(feature = "socket-eth")]
738+
Socket::Eth(_socket) => {
739+
todo!();
740+
}
737741
};
738742

739743
match result {

src/socket/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ pub enum Socket<'a> {
7171
Dhcpv4(dhcpv4::Socket<'a>),
7272
#[cfg(feature = "socket-dns")]
7373
Dns(dns::Socket<'a>),
74+
#[cfg(feature = "socket-eth")]
75+
Eth(eth::Socket<'a>),
7476
}
7577

7678
impl<'a> Socket<'a> {
@@ -88,6 +90,8 @@ impl<'a> Socket<'a> {
8890
Socket::Dhcpv4(s) => s.poll_at(cx),
8991
#[cfg(feature = "socket-dns")]
9092
Socket::Dns(s) => s.poll_at(cx),
93+
#[cfg(feature = "socket-eth")]
94+
Socket::Eth(s) => s.poll_at(cx),
9195
}
9296
}
9397
}
@@ -141,3 +145,5 @@ from_socket!(tcp::Socket<'a>, Tcp);
141145
from_socket!(dhcpv4::Socket<'a>, Dhcpv4);
142146
#[cfg(feature = "socket-dns")]
143147
from_socket!(dns::Socket<'a>, Dns);
148+
#[cfg(feature = "socket-eth")]
149+
from_socket!(eth::Socket<'a>, Eth);

0 commit comments

Comments
 (0)