xarxa

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:

  • 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 by Stack::raw_socket.
RawSocketIter
Iterator over the raw sockets of a Stack, returned by Stack::raw_sockets.

Enums§

BindError
Error returned by RawSocket::bind.
RawMode
The mode of a raw socket, set by RawSocket::bind.
RecvError
Error returned by RawSocket::recv and the peek methods.
SendError
Error returned by RawSocket::send_slice and RawSocket::send_with.