net

package
v0.0.0-...-080cee2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoConnectSettings

type AutoConnectSettings struct {
	Priority *int32
	Retries  *int32
	State    bool
}

type ConfigItem

type ConfigItem struct {
	Conn   gonm.Connection
	Device gonm.Device
	Prio   int
}

ConfigItem A simple priority based list

type ConfigPrioList

type ConfigPrioList []ConfigItem

type ConnectionNotAvailable

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

func (*ConnectionNotAvailable) Error

func (e *ConnectionNotAvailable) Error() string

type ConnectionSettings

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

type DNSResult

type DNSResult struct {
	V4 []uint32
	V6 [][]byte
}

type GsmNetworkConfig

type GsmNetworkConfig struct {
	NetworkConfig
	// contains filtered or unexported fields
}

func NewGSMNetworkConfig

func NewGSMNetworkConfig(APN string, Username string, Password string) GsmNetworkConfig

type NetworkConfig

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

func NewNetworkConfig

func NewNetworkConfig() NetworkConfig

func NewWiredNetworkConfig

func NewWiredNetworkConfig() NetworkConfig

func (*NetworkConfig) WithAutoconnect

func (nc *NetworkConfig) WithAutoconnect(acSetting *AutoConnectSettings) *NetworkConfig

func (*NetworkConfig) WithCustomDNS

func (nc *NetworkConfig) WithCustomDNS(customDNS []string) *NetworkConfig

func (*NetworkConfig) WithDeviceName

func (nc *NetworkConfig) WithDeviceName(name string) *NetworkConfig

func (*NetworkConfig) WithDeviceType

func (nc *NetworkConfig) WithDeviceType(t NetworkInterfaceType) *NetworkConfig

WithDeviceType Sets the device type for the network configuration Please only use this if you know what you are doing

func (*NetworkConfig) WithName

func (nc *NetworkConfig) WithName(name string) *NetworkConfig

func (*NetworkConfig) WithUUID

func (nc *NetworkConfig) WithUUID(uuidstr string) *NetworkConfig

func (*NetworkConfig) WithV4Automatic

func (nc *NetworkConfig) WithV4Automatic() *NetworkConfig

func (*NetworkConfig) WithV4Static

func (nc *NetworkConfig) WithV4Static(net *V4Config) *NetworkConfig

func (*NetworkConfig) WithV6AddrModeEUI64

func (nc *NetworkConfig) WithV6AddrModeEUI64() *NetworkConfig

func (*NetworkConfig) WithV6Automatic

func (nc *NetworkConfig) WithV6Automatic() *NetworkConfig

func (*NetworkConfig) WithV6Static

func (nc *NetworkConfig) WithV6Static(net *V6Config) *NetworkConfig

type NetworkDevice

type NetworkDevice struct {
	Type NetworkInterfaceType
	// contains filtered or unexported fields
}

type NetworkService

type NetworkService interface {
	GetConnectionStateStr(NetworkInterfaceType) (string, error)
	IsNetworkTypeActive(NetworkInterfaceType) (bool, error)
	SetDeviceStateByType(NetworkInterfaceType, bool) error
	HasConnectivity() bool
	Shutdown()

	EnforceNetworkPriority() error

	// CreateConnection create a connection a connection
	CreateConnection(config interface{}) error
	// contains filtered or unexported methods
}

func NewService

func NewService(sysdc *systemd.Connector) (NetworkService, error)

type Static

type Static struct {
	Network netip.Prefix
	Gateway netip.Addr
}

type V4Config

type V4Config struct {
	Static *Static
}

type V6Config

type V6Config struct {
	Static *Static
	// contains filtered or unexported fields
}

type WirelessNetworkConfig

type WirelessNetworkConfig struct {
	NetworkConfig
	// contains filtered or unexported fields
}

func NewWirelessConfigFromNetworkConfig

func NewWirelessConfigFromNetworkConfig(SSID string, PSK string, networkconf NetworkConfig) WirelessNetworkConfig

func NewWirelessNetworkConfig

func NewWirelessNetworkConfig(SSID string, PSK string) WirelessNetworkConfig

Jump to

Keyboard shortcuts

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