Expand description
Raw sockets.
A raw socket sends and receives whole packets, headers included.
Raw sockets can be bound in two modes:
- Ethernet mode (
RawMode::Ethernet): whole Ethernet frames on one interface. The socket is bound to that interface, and optionally to an ethertype. - IP mode (
RawMode::Ip): whole IP packets on all interfaces. The socket may be bound to an IP version and/or an IP protocol, both optional.
Structs§
- RawHandle
- A handle to a raw socket added to a
Stack. - RawSocket
- A raw socket borrowed from a
Stack, returned byStack::raw_socket. - RawSocket
Iter - Iterator over the raw sockets of a
Stack, returned byStack::raw_sockets.
Enums§
- Bind
Error - Error returned by
RawSocket::bind. - RawMode
- The mode of a raw socket, set by
RawSocket::bind. - Recv
Error - Error returned by
RawSocket::recvand the peek methods. - Send
Error - Error returned by
RawSocket::send_sliceandRawSocket::send_with.