stack

package
v0.0.0-...-0a45832 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

nolint:exhaustive,godot

nolint: wrapcheck,godot,deadcode,unused

nolint:errcheck,exhaustivestruct,exhaustruct,godot

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkParams

type NetworkParams struct {
	// Socket file descriptor
	Fd int
	// The vm's MAC address provided by Virtualization.Framework
	HardwareAddr net.HardwareAddr
	// Enables debug logging
	Debug bool
	// First IP address of the subnet operated by macOS's built-in DHCP server.
	// The running vms get IP address assigned from the (StartAddr + 1) - EndAddr range.
	// The StartAddr will be the gateway address exclusively.
	// Default StartAddr is 192.168.64.1.
	StartAddr netaddr.IP
	// Last IP address of the subnet operated by macOS's built-in DHCP server.
	// Default StartAddr is 192.168.64.255.
	EndAddr netaddr.IP
	// The default ubnet mask is 255.255.255.0
	SubnetMask netaddr.IP
}

NetworkParams is a collection of parameters needed for vmnet

type Stack

type Stack struct {
	// Network parameters passed to vmnet
	NetworkParams
	// contains filtered or unexported fields
}

Stack orchestrates the duplex socket communication

func NewNetwork

func NewNetwork(p NetworkParams) (*Stack, error)

NewNetwork creates a new Network.

- NAT provided by vmnet

- vmenet(n) interface

- bridge100 interface

func (*Stack) Run

func (s *Stack) Run(ctx context.Context) error

Run the networking stack.

Jump to

Keyboard shortcuts

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