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, featureraw-ethernet): whole Ethernet frames, optionally filtered by ethertype. - IP mode (
RawMode::Ip, featureraw-ip): whole IP packets on all interfaces. The socket may be bound to an IP version and/or an IP protocol, both optional.
Structs§
- Ethernet
Protocol - Ethernet protocol type.
- Iface
Handle - A handle to an interface added to a [
Stack]. - IpProtocol
- IP datagram encapsulated protocol.
- Packet
Meta - Metadata associated with a packet.
- RawSocket
- An Raw socket.
Enums§
- Bind
Error - Error returned by
RawSocket::bind. - IpVersion
- Internet protocol version.
- RawMode
- The mode of a raw socket, set by [
RawSocket::bind]. - Recv
Error - Error returned by
RawSocket::recv. - Send
Error - Error returned by
RawSocket::sendandRawSocket::send_with.