bridge

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package bridge is responsible for bridging linux tuns over network connections.

Index

Constants

View Source
const (
	// IfaceNameMaxLen is the maximum allowed length of tun interface names in bytes (not runes).
	IfaceNameMaxLen = 16
)

Variables

View Source
var (

	// ErrMTU indicates that a packet is too large for the tun MTU.
	ErrMTU = errors.New("packet too large for MTU")
)

Functions

func Connect

func Connect(ctx context.Context, log logr.Logger, conn net.Conn, tunIfaceName string) error

Connect attaches to the linux tun named as in tunIfaceName and exchanges its packets over the given conn with another Connect instance. Any errors are returned. Packets transmitted over the conn are prepended with a uint16 indicating the full length of the following packet.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL