Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeTunFile ¶
MakeTunFile returns an os.File object from a TUN file descriptor `fd`. The returned os.File holds a separate reference to the underlying file, so the file will not be closed until both `fd` and the os.File are separately closed. (UNIX only.)
func ProcessInputPackets ¶
ProcessInputPackets reads packets from a TUN device `tun` and writes them to `tunnel`.
Types ¶
type Tunnel ¶
type Tunnel interface { // IsConnected indicates whether the tunnel is in a connected state. IsConnected() bool // Disconnect disconnects the tunnel. Disconnect() // Write writes input data to the TUN interface. Write(data []byte) (int, error) }
Tunnel represents a session on a TUN device.
Click to show internal directories.
Click to hide internal directories.