embassy-net

Crates

git

Versions

default

Flavors

Skip to main content

Module raw

Module raw 

Source
Expand description

Raw sockets.

A raw socket sends and receives whole packets, headers included.

Raw sockets can be bound in two modes, each behind its own cargo feature:

  • Ethernet mode (RawMode::Ethernet, feature raw-ethernet): whole Ethernet frames, optionally filtered by ethertype.
  • IP mode (RawMode::Ip, feature raw-ip): whole IP packets on all interfaces. The socket may be bound to an IP version and/or an IP protocol, both optional.

Structs§

EthernetProtocol
Ethernet protocol type.
IfaceHandle
A handle to an interface added to a [Stack].
IpProtocol
IP datagram encapsulated protocol.
PacketMeta
Metadata associated with a packet.
RawSocket
An Raw socket.

Enums§

BindError
Error returned by RawSocket::bind.
IpVersion
Internet protocol version.
RawMode
The mode of a raw socket, set by [RawSocket::bind].
RecvError
Error returned by RawSocket::recv.
SendError
Error returned by RawSocket::send and RawSocket::send_with.