network

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package network provides VM networking.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CNISetup

func CNISetup(_, _, _, cniBinDir string) error

CNISetup runs a CNI plugin to configure networking.

func CNITeardown

func CNITeardown(_, _, _, _ string) error

CNITeardown removes CNI configuration for a VM.

Types

type TapManager

type TapManager struct {
	// contains filtered or unexported fields
}

TapManager manages TAP devices for microVM networking.

func NewTapManager

func NewTapManager(bridge, subnet string) *TapManager

NewTapManager creates a TAP device manager.

func (*TapManager) CreateTap

func (t *TapManager) CreateTap(vmID string) (string, error)

CreateTap creates a TAP device for a VM.

func (*TapManager) DeleteTap

func (t *TapManager) DeleteTap(tapName string) error

DeleteTap removes a TAP device.

func (*TapManager) EnableMasquerade

func (t *TapManager) EnableMasquerade() error

EnableMasquerade enables NAT for the bridge subnet.

func (*TapManager) SetupBridge

func (t *TapManager) SetupBridge() error

SetupBridge creates or ensures a bridge device exists.

func (*TapManager) TeardownBridge

func (t *TapManager) TeardownBridge()

TeardownBridge removes the bridge device.

Jump to

Keyboard shortcuts

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