Skip to main content

Crate yip_device

Crate yip_device 

Source
Expand description

L3 (TUN) and L2 (TAP) tunnel endpoints behind one trait. Real device I/O lands in M4; this milestone fixes the public surface.

Structs§

TunReader
The read half of a split TunTap.
TunTap
A TUN (L3) or TAP (L2) tunnel device.
TunWriter
The write half of a split TunTap.

Enums§

DeviceError
Errors creating or configuring a tunnel device.
DeviceKind
Whether a device operates at L3 (IP) or L2 (Ethernet).

Constants§

TUNSETVNETHDR
Alias for TUNSETVNETHDRSZ.
TUNSETVNETHDRSZ
VNET_HDR_LEN
Length (bytes) of the virtio_net_hdr prefix on every TUN read/write when TunTap::vnet_hdr_len is Some. Kept as its own constant (rather than depending on yip-io) so yip-device has no dependency on yip-io.

Traits§

Device
A tunnel endpoint that yields and accepts inner frames. Implemented in M4.