networkmanager

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0 Imports: 1 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CheckpointCreateCall   = "org.freedesktop.NetworkManager.CheckpointCreate"
	CheckpointDestroyCall  = "org.freedesktop.NetworkManager.CheckpointDestroy"
	CheckpointRollbackCall = "org.freedesktop.NetworkManager.CheckpointRollback"

	NmCheckpointCreateFlagNone                 = 0x00
	NmCheckpointCreateFlagDestroyAll           = 0x01
	NmCheckpointCreateFlagDeleteNewConnections = 0x02
	NmCheckpointCreateFlagDisconnectNewDevices = 0x03

	NmCheckpointNoTimeout = 0
)
View Source
const (
	InterfacePath = "org.freedesktop.NetworkManager"
	ObjectPath    = "/org/freedesktop/NetworkManager"
)
View Source
const (
	ActiveConnectionsProperty          = "org.freedesktop.NetworkManager.ActiveConnections"
	ActiveConnectionConnectionProperty = "org.freedesktop.NetworkManager.Connection.Active.Connection"
	SettingsObjectPath                 = "/org/freedesktop/NetworkManager/Settings"
	SettingsListConnectionsCall        = "org.freedesktop.NetworkManager.Settings.ListConnections"
	SettingsAddConnectionCall          = "org.freedesktop.NetworkManager.Settings.AddConnection"
	SettingsConnectionGetSettingsCall  = "org.freedesktop.NetworkManager.Settings.Connection.GetSettings"
	SettingsConnectionUpdateCall       = "org.freedesktop.NetworkManager.Settings.Connection.Update"
	SettingsConnectionDeleteCall       = "org.freedesktop.NetworkManager.Settings.Connection.Delete"
	ActivateConnectionCall             = "org.freedesktop.NetworkManager.ActivateConnection"
	DeactivateConnectionCall           = "org.freedesktop.NetworkManager.DeactivateConnection"
)
View Source
const (
	GetDevicesCall           = "org.freedesktop.NetworkManager.GetDevices"
	GetDeviceByIpIfaceCall   = "org.freedesktop.NetworkManager.GetDeviceByIpIface"
	DeviceInterfaceProperty  = "org.freedesktop.NetworkManager.Device.Interface"
	DeviceDeviceTypeProperty = "org.freedesktop.NetworkManager.Device.DeviceType"
	DeviceStateProperty      = "org.freedesktop.NetworkManager.Device.State"
)
View Source
const (
	VersionProperty = "org.freedesktop.NetworkManager.Version"
)

Variables

This section is empty.

Functions

func DbusSettingsToNative

func DbusSettingsToNative(dbusSettings map[string]map[string]dbus.Variant) map[string]map[string]interface{}

func NativeSettingsToDbus

func NativeSettingsToDbus(settings map[string]map[string]interface{}) map[string]map[string]dbus.Variant

Types

type ActiveConnection

type ActiveConnection struct {
	Connection *Connection
	// contains filtered or unexported fields
}

type Checkpoint

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

type Client

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

func NewClient

func NewClient() (*Client, error)

func NewClientPrivate

func NewClientPrivate() (*Client, error)

func (*Client) ActivateConnection

func (client *Client) ActivateConnection(connection *Connection) error

func (*Client) AddConnection

func (client *Client) AddConnection(settings map[string]map[string]interface{}) error

func (*Client) CheckpointCreate

func (client *Client) CheckpointCreate(devices []*Device, timeout uint, flags uint) (*Checkpoint, error)

func (*Client) CheckpointDestroy

func (client *Client) CheckpointDestroy(checkpoint *Checkpoint) error

func (*Client) CheckpointRollback

func (client *Client) CheckpointRollback(checkpoint *Checkpoint) (map[string]uint, error)

TODO: wrap return value

func (*Client) Close

func (client *Client) Close()

func (*Client) DeactivateConnection

func (client *Client) DeactivateConnection(activeConnection *ActiveConnection) error

func (*Client) GetDeviceByIpIface

func (client *Client) GetDeviceByIpIface(ifname string) (*Device, error)

func (*Client) GetDevices

func (client *Client) GetDevices() ([]*Device, error)

func (*Client) GetVersion added in v0.3.0

func (client *Client) GetVersion() (string, error)

func (*Client) ListActiveConnections

func (client *Client) ListActiveConnections() []*ActiveConnection

func (*Client) ListConnections

func (client *Client) ListConnections() ([]*Connection, error)

type Connection

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

func (*Connection) Delete

func (connection *Connection) Delete() error

func (*Connection) GetSettings

func (connection *Connection) GetSettings() (map[string]map[string]interface{}, error)

func (*Connection) Update

func (connection *Connection) Update(newSettings map[string]map[string]interface{}) error

type Device

type Device struct {
	Interface string
	Type      DeviceType
	State     DeviceState
	// contains filtered or unexported fields
}

type DeviceState

type DeviceState string
const (
	DeviceStateUnknown      DeviceState = "unknown"
	DeviceStateUnmanaged    DeviceState = "unmanaged"
	DeviceStateUnavailable  DeviceState = "unavailable"
	DeviceStateDisconnected DeviceState = "disconnected"
	DeviceStatePrepare      DeviceState = "prepare"
	DeviceStateConfig       DeviceState = "config"
	DeviceStateNeedAuth     DeviceState = "need-auth"
	DeviceStateIPConfig     DeviceState = "ip-config"
	DeviceStateIPCheck      DeviceState = "ip-check"
	DeviceStateSecondaries  DeviceState = "secondaries"
	DeviceStateActivated    DeviceState = "activated"
	DeviceStateDeactivating DeviceState = "deactivating"
	DeviceStateFailed       DeviceState = "failed"
)

type DeviceType

type DeviceType string
const (
	DeviceTypeUnknown     DeviceType = "unknown"
	DeviceTypeGeneric     DeviceType = "generic"
	DeviceTypeEthernet    DeviceType = "ethernet"
	DeviceTypeWifi        DeviceType = "wifi"
	DeviceTypeUnused1     DeviceType = "unused1"
	DeviceTypeUnused2     DeviceType = "unused2"
	DeviceTypeBluetooth   DeviceType = "bluetooth"
	DeviceTypeOlcpMesh    DeviceType = "olcp-mesh"
	DeviceTypeWimax       DeviceType = "wimax"
	DeviceTypeModem       DeviceType = "modem"
	DeviceTypeInifiniband DeviceType = "inifiniband"
	DeviceTypeBond        DeviceType = "bond"
	DeviceTypeVlan        DeviceType = "vlan"
	DeviceTypeAdsl        DeviceType = "adsl"
	DeviceTypeBridge      DeviceType = "bridge"
	DeviceTypeTeam        DeviceType = "team"
	DeviceTypeTun         DeviceType = "tun"
	DeviceTypeIpTunnel    DeviceType = "ip-tunnel"
	DeviceTypeMacvlan     DeviceType = "macvlan"
	DeviceTypeVxlan       DeviceType = "vxlan"
	DeviceTypeVeth        DeviceType = "veth"
	DeviceTypeMacsec      DeviceType = "macsec"
	DeviceTypeDummy       DeviceType = "dummy"
)

Jump to

Keyboard shortcuts

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