Skip to content

Commit 4114e16

Browse files
committed
socket: add missing docs for ethernet sockets
1 parent 22634d0 commit 4114e16

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Enable `smoltcp::phy::RawSocket` and `smoltcp::phy::TunTapInterface`, respective
205205

206206
These features are enabled by default.
207207

208-
### Features `socket-raw`, `socket-udp`, `socket-tcp`, `socket-icmp`, `socket-dhcpv4`, `socket-dns`
208+
### Features `socket-eth`, `socket-raw`, `socket-udp`, `socket-tcp`, `socket-icmp`, `socket-dhcpv4`, `socket-dns`
209209

210210
Enable the corresponding socket type.
211211

src/socket/eth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ impl core::fmt::Display for EthMetadata {
8080
}
8181
}
8282

83-
/// A Eth packet metadata.
83+
/// An Ethernet packet metadata.
8484
pub type PacketMetadata = crate::storage::PacketMetadata<EthMetadata>;
8585

86-
/// A Eth packet ring buffer.
86+
/// An Ethernet packet ring buffer.
8787
pub type PacketBuffer<'a> = crate::storage::PacketBuffer<'a, EthMetadata>;
8888

8989
pub type Ethertype = u16;

src/socket/raw.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ pub type PacketBuffer<'a> = crate::storage::PacketBuffer<'a, ()>;
8282
///
8383
/// A raw socket may be bound to a specific IP protocol, and owns
8484
/// transmit and receive packet buffers.
85+
///
86+
/// A raw socket can only handle IP-based traffic, for raw ethernet
87+
/// traffic look at `eth::Socket`.
8588
#[derive(Debug)]
8689
pub struct Socket<'a> {
8790
ip_version: Option<IpVersion>,

0 commit comments

Comments
 (0)