Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Subnet Number of bits in the subnet mask Subnet = "/10" // TapsPerBridge Number of taps per bridge TapsPerBridge = 1000 // NumBridges is the number of bridges for the TapManager NumBridges = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkInterface ¶
type NetworkInterface struct { BridgeName string MacAddress string HostDevName string PrimaryAddress string Subnet string GatewayAddress string }
NetworkInterface Network interface type, NI names are generated based on expected tap names
type TapManager ¶
type TapManager struct { sync.Mutex TapCountsPerBridge []int64 // contains filtered or unexported fields }
TapManager A Tap Manager
func (*TapManager) AddTap ¶
func (tm *TapManager) AddTap(tapName string) (*NetworkInterface, error)
AddTap Creates a new tap and returns the corresponding network interface
func (*TapManager) RemoveBridges ¶
func (tm *TapManager) RemoveBridges()
RemoveBridges Removes the bridges created by the tap manager
func (*TapManager) RemoveTap ¶
func (tm *TapManager) RemoveTap(tapName string) error
RemoveTap Removes the tap
Click to show internal directories.
Click to hide internal directories.