Skip to main content

Module tun

Module tun 

Source
Expand description

FIPS TUN Interface

Manages the TUN device for sending and receiving IPv6 packets. The TUN interface presents FIPS addresses to the local system, allowing standard socket applications to communicate over the mesh.

Platform-specific implementations:

  • Linux: Uses the tun crate with rtnetlink for interface configuration
  • macOS: Uses the tun crate with ifconfig/route for interface configuration
  • Windows: Uses the wintun crate for TUN device support

Structs§

TunDevice
FIPS TUN device wrapper.
TunOutboundRx
TunOutboundTx
TunTx
Channel sender for packets to be written to TUN.
TunWriter
Writer thread for TUN device.

Enums§

TunError
Errors that can occur with TUN operations.
TunState
TUN device state.

Functions§

log_ipv6_packet
Log basic information about an IPv6 packet at TRACE level.
shutdown_tun_interface
Shutdown and delete a TUN interface by name.

Type Aliases§

PathMtuLookup
Read-only handle to the per-destination path MTU map. Populated by the discovery handler on LookupResponse; read by the TUN reader (outbound clamp) and writer (inbound clamp) at TCP MSS clamp time. Keyed by FipsAddress (16 bytes, the IPv6 form of a fips peer address).