trunks

package
v0.0.0-...-5a973d2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package trunks define the trunk runtime

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) (bool, error)

Exists check if a folder or a file exists

Types

type ACM

type ACM struct {
	Weight   float64 `yaml:"weight"`
	Duration int     `yaml:"duration"`
}

ACM struct

type Bandwidth

type Bandwidth struct {
	Forward float64 `yaml:"forward"`
	Return  float64 `yaml:"return"`
}

Bandwidth struct

type Delay

type Delay struct {
	Value  float64 `yaml:"value"`
	Offset float64 `yaml:"offset"`
}

Delay struct

type NIC

type NIC struct {
	ST string `yaml:"st"`
	GW string `yaml:"gw"`
}

Interfaces struct

type TrunksConfig

type TrunksConfig struct {
	NIC                NIC       `yaml:"nic"`
	Bandwidth          Bandwidth `yaml:"bandwidth"`
	Delay              Delay     `yaml:"delay"`
	ACMList            []*ACM    `yaml:"acm"`
	QoS                bool
	Logs               string
	KernelVersionCheck bool
	ACMEnabled         bool
	ACMCounter         int
	ACMIndex           int
	CurrentACM         *ACM
}

TrunksConfig struct

func InitTrunks

func InitTrunks(file string, qos bool, logs string, acm bool, disable_kernel_version_check bool) (*TrunksConfig, error)

InitTrunks initialize the trunks module

func ParseConf

func ParseConf(file string) (*TrunksConfig, error)

ParseConf read the yaml file and populate the Config instancce

func (*TrunksConfig) CheckInterfaces

func (t *TrunksConfig) CheckInterfaces() error

CheckInterfaces checks if the interfaces exist

func (*TrunksConfig) FindInterfaces

func (t *TrunksConfig) FindInterfaces() error

func (*TrunksConfig) FlushTables

func (t *TrunksConfig) FlushTables() error

func (*TrunksConfig) Run

func (t *TrunksConfig) Run()

Run the Trunk link

func (*TrunksConfig) RunACM

func (t *TrunksConfig) RunACM(qos bool)

RunACM simulate the used by the DVB-S2/RCS2 system

Jump to

Keyboard shortcuts

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