Documentation ¶
Overview ¶
Generated by nm-generator nolint
Index ¶
- Constants
- func HandlePrepareForSleep(sleep bool)
- type Manager
- func (m *Manager) ActivateAccessPoint(uuid string, apPath, devPath dbus.ObjectPath) (connection dbus.ObjectPath, busErr *dbus.Error)
- func (m *Manager) ActivateConnection(uuid string, devPath dbus.ObjectPath) (cpath dbus.ObjectPath, busErr *dbus.Error)
- func (m *Manager) DeactivateConnection(uuid string) *dbus.Error
- func (m *Manager) DebugChangeAPChannel(band string) *dbus.Error
- func (m *Manager) DeleteConnection(uuid string) *dbus.Error
- func (m *Manager) DisableWirelessHotspotMode(devPath dbus.ObjectPath) *dbus.Error
- func (m *Manager) DisconnectDevice(devPath dbus.ObjectPath) *dbus.Error
- func (m *Manager) EnableDevice(devPath dbus.ObjectPath, enabled bool) *dbus.Error
- func (m *Manager) EnableWirelessHotspotMode(devPath dbus.ObjectPath) *dbus.Error
- func (m *Manager) GetAccessPoints(path dbus.ObjectPath) (apsJSON string, busErr *dbus.Error)
- func (m *Manager) GetActiveConnectionInfo() (acinfosJSON string, busErr *dbus.Error)
- func (m *Manager) GetAutoProxy() (proxyAuto string, err *dbus.Error)
- func (v *Manager) GetExportedMethods() dbusutil.ExportedMethods
- func (*Manager) GetInterfaceName() string
- func (m *Manager) GetProxy(proxyType string) (host, port string, busErr *dbus.Error)
- func (m *Manager) GetProxyIgnoreHosts() (ignoreHosts string, err *dbus.Error)
- func (m *Manager) GetProxyMethod() (proxyMode string, err *dbus.Error)
- func (m *Manager) GetSupportedConnectionTypes() (types []string, err *dbus.Error)
- func (m *Manager) IsDeviceEnabled(devPath dbus.ObjectPath) (enabled bool, busErr *dbus.Error)
- func (m *Manager) IsWirelessHotspotModeEnabled(devPath dbus.ObjectPath) (enabled bool, err *dbus.Error)
- func (m *Manager) ListDeviceConnections(devPath dbus.ObjectPath) (connections []dbus.ObjectPath, busErr *dbus.Error)
- func (m *Manager) RequestIPConflictCheck(ip, ifc string) *dbus.Error
- func (m *Manager) RequestWirelessScan() *dbus.Error
- func (m *Manager) SetAutoProxy(proxyAuto string) (busErr *dbus.Error)
- func (m *Manager) SetDeviceManaged(devPathOrIfc string, managed bool) *dbus.Error
- func (m *Manager) SetProxy(proxyType, host, port string) *dbus.Error
- func (m *Manager) SetProxyIgnoreHosts(ignoreHosts string) (busErr *dbus.Error)
- func (m *Manager) SetProxyMethod(proxyMode string) *dbus.Error
- type Module
- type NotifyManager
- type SecretAgent
- func (sa *SecretAgent) CancelGetSecrets(connectionPath dbus.ObjectPath, settingName string) *dbus.Error
- func (sa *SecretAgent) DeleteSecrets(connectionData map[string]map[string]dbus.Variant, ...) *dbus.Error
- func (v *SecretAgent) GetExportedMethods() dbusutil.ExportedMethods
- func (*SecretAgent) GetInterfaceName() string
- func (sa *SecretAgent) GetSecrets(connectionData map[string]map[string]dbus.Variant, ...) (secretsData map[string]map[string]dbus.Variant, busErr *dbus.Error)
- func (sa *SecretAgent) SaveSecrets(connectionData map[string]map[string]dbus.Variant, ...) *dbus.Error
- func (sa *SecretAgent) SaveSecretsDeepin(connectionData map[string]map[string]dbus.Variant, ...) *dbus.Error
- type SecretAgentSession
Constants ¶
const ( MM_MODEM_CAPABILITY_NONE = 0 MM_MODEM_CAPABILITY_POTS = 1 << 0 MM_MODEM_CAPABILITY_CDMA_EVDO = 1 << 1 MM_MODEM_CAPABILITY_GSM_UMTS = 1 << 2 MM_MODEM_CAPABILITY_LTE = 1 << 3 MM_MODEM_CAPABILITY_LTE_ADVANCED = 1 << 4 MM_MODEM_CAPABILITY_IRIDIUM = 1 << 5 MM_MODEM_CAPABILITY_ANY = 0xFFFFFFF )
modem capabilities
const ( MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN = 0 MM_MODEM_ACCESS_TECHNOLOGY_POTS = 1 << 0 MM_MODEM_ACCESS_TECHNOLOGY_GSM = 1 << 1 MM_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT = 1 << 2 MM_MODEM_ACCESS_TECHNOLOGY_GPRS = 1 << 3 MM_MODEM_ACCESS_TECHNOLOGY_EDGE = 1 << 4 MM_MODEM_ACCESS_TECHNOLOGY_UMTS = 1 << 5 MM_MODEM_ACCESS_TECHNOLOGY_HSDPA = 1 << 6 MM_MODEM_ACCESS_TECHNOLOGY_HSUPA = 1 << 7 MM_MODEM_ACCESS_TECHNOLOGY_HSPA = 1 << 8 MM_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS = 1 << 9 MM_MODEM_ACCESS_TECHNOLOGY_1XRTT = 1 << 10 MM_MODEM_ACCESS_TECHNOLOGY_EVDO0 = 1 << 11 MM_MODEM_ACCESS_TECHNOLOGY_EVDOA = 1 << 12 MM_MODEM_ACCESS_TECHNOLOGY_EVDOB = 1 << 13 MM_MODEM_ACCESS_TECHNOLOGY_LTE = 1 << 14 MM_MODEM_ACCESS_TECHNOLOGY_ANY = 0xFFFFFFFF )
modem network access technologies
const ( MM_MODEM_MODE_NONE = 0 MM_MODEM_MODE_CS = 1 << 0 MM_MODEM_MODE_2G = 1 << 1 MM_MODEM_MODE_3G = 1 << 2 MM_MODEM_MODE_4G = 1 << 3 MM_MODEM_MODE_ANY = 0xFFFFFFF )
modem modes
const ( CUSTOM_NM_DEVICE_STATE_REASON_CABLE_UNPLUGGED = iota + 1000 CUSTOM_NM_DEVICE_STATE_REASON_WIRELESS_DISABLED CUSTOM_NM_DEVICE_STATE_REASON_MODEM_NO_SIGNAL CUSTOM_NM_DEVICE_STATE_REASON_MODEM_WRONG_PLAN )
Custom device state reasons
const ( ETH_GSTRING_LEN = 32 ETH_SS_STATS = 1 ETH_SS_FEATURES = 4 ETHTOOL_GDRVINFO = 0x00000003 ETHTOOL_GSTRINGS = 0x0000001b ETHTOOL_GSTATS = 0x0000001d // other CMDs from ethtool-copy.h of ethtool-3.5 package ETHTOOL_GSET = 0x00000001 /* Get settings. */ ETHTOOL_SSET = 0x00000002 /* Set settings. */ ETHTOOL_GMSGLVL = 0x00000007 /* Get driver message level */ ETHTOOL_SMSGLVL = 0x00000008 /* Set driver msg level. */ ETHTOOL_GCHANNELS = 0x0000003c /* Get no of channels */ ETHTOOL_SCHANNELS = 0x0000003d /* Set no of channels */ ETHTOOL_GCOALESCE = 0x0000000e /* Get coalesce config */ /* Get link status for host, i.e. whether the interface *and* the * physical port (if there is one) are up (ethtool_value). */ ETHTOOL_GLINK = 0x0000000a ETHTOOL_GMODULEINFO = 0x00000042 /* Get plug-in module information */ ETHTOOL_GMODULEEEPROM = 0x00000043 /* Get plug-in module eeprom */ ETHTOOL_GPERMADDR = 0x00000020 ETHTOOL_GFEATURES = 0x0000003a /* Get device offload settings */ ETHTOOL_SFEATURES = 0x0000003b /* Change device offload settings */ ETHTOOL_GFLAGS = 0x00000025 /* Get flags bitmap(ethtool_value) */ ETHTOOL_GSSET_INFO = 0x00000037 /* Get string set info */ )
ethtool stats related constants.
const (
IFNAMSIZ = 16
)
Maximum size of an interface name
const (
SIOCETHTOOL = 0x8946
)
ioctl ethtool request
Variables ¶
This section is empty.
Functions ¶
func HandlePrepareForSleep ¶
func HandlePrepareForSleep(sleep bool)
Types ¶
type Manager ¶
type Manager struct { PropsMu sync.RWMutex // update by manager.go State uint32 // global networking state Connectivity uint32 NetworkingEnabled bool `prop:"access:rw"` // airplane mode for NetworkManager VpnEnabled bool `prop:"access:rw"` Devices string // array of device objects and marshaled by json Connections string // array of connection information and marshaled by json ActiveConnections string // array of connections that activated and marshaled by json WirelessAccessPoints string `prop:"access:r"` //用于读取AP // contains filtered or unexported fields }
Manager is the main DBus object for network module.
func NewManager ¶
func (*Manager) ActivateAccessPoint ¶
func (m *Manager) ActivateAccessPoint(uuid string, apPath, devPath dbus.ObjectPath) (connection dbus.ObjectPath, busErr *dbus.Error)
func (*Manager) ActivateConnection ¶
func (m *Manager) ActivateConnection(uuid string, devPath dbus.ObjectPath) ( cpath dbus.ObjectPath, busErr *dbus.Error)
func (*Manager) DeactivateConnection ¶
DeactivateConnection deactivate a target connection.
func (*Manager) DebugChangeAPChannel ¶
func (*Manager) DeleteConnection ¶
DeleteConnection delete a connection through uuid.
func (*Manager) DisableWirelessHotspotMode ¶
func (m *Manager) DisableWirelessHotspotMode(devPath dbus.ObjectPath) *dbus.Error
DisableWirelessHotspotMode will disconnect the device related hotspot connection.
func (*Manager) DisconnectDevice ¶
func (m *Manager) DisconnectDevice(devPath dbus.ObjectPath) *dbus.Error
DisconnectDevice will disconnect all connection in target device, DisconnectDevice is different with DeactivateConnection, for example if user deactivate current connection for a wireless device, NetworkManager will try to activate another access point if available then, but if call DisconnectDevice for the device, the device will keep disconnected later.
func (*Manager) EnableDevice ¶
func (*Manager) EnableWirelessHotspotMode ¶
func (m *Manager) EnableWirelessHotspotMode(devPath dbus.ObjectPath) *dbus.Error
EnableWirelessHotspotMode activate the device related hotspot connection, if the connection not exists will create one.
func (*Manager) GetAccessPoints ¶
GetAccessPoints return all access points object which marshaled by json.
func (*Manager) GetActiveConnectionInfo ¶
func (*Manager) GetAutoProxy ¶
GetAutoProxy get proxy PAC file URL for "auto" proxy mode, the value will keep there even the proxy mode is not "auto".
func (*Manager) GetExportedMethods ¶
func (v *Manager) GetExportedMethods() dbusutil.ExportedMethods
func (*Manager) GetInterfaceName ¶
func (*Manager) GetProxyIgnoreHosts ¶
GetProxyIgnoreHosts get the ignored hosts for proxy network which is a string separated by ",".
func (*Manager) GetProxyMethod ¶
GetProxyMethod get current proxy method, it would be "none", "manual" or "auto".
func (*Manager) GetSupportedConnectionTypes ¶
GetSupportedConnectionTypes return all supported connection types
func (*Manager) IsDeviceEnabled ¶
func (*Manager) IsWirelessHotspotModeEnabled ¶
func (m *Manager) IsWirelessHotspotModeEnabled(devPath dbus.ObjectPath) (enabled bool, err *dbus.Error)
IsWirelessHotspotModeEnabled check if the device related hotspot connection activated.
func (*Manager) ListDeviceConnections ¶
func (m *Manager) ListDeviceConnections(devPath dbus.ObjectPath) (connections []dbus.ObjectPath, busErr *dbus.Error)
ListDeviceConnections return the available connections for the device
func (*Manager) RequestIPConflictCheck ¶
func (*Manager) RequestWirelessScan ¶
RequestWirelessScan request all wireless devices re-scan access point list.
func (*Manager) SetAutoProxy ¶
func (*Manager) SetDeviceManaged ¶
SetDeviceManaged set target device managed or unmnaged from NetworkManager, and a little difference with other interface is that devPathOrIfc could be a device DBus path or the device interface name.
func (*Manager) SetProxyIgnoreHosts ¶
type NotifyManager ¶
type NotifyManager struct {
// contains filtered or unexported fields
}
type SecretAgent ¶
type SecretAgent struct {
// contains filtered or unexported fields
}
func (*SecretAgent) CancelGetSecrets ¶
func (sa *SecretAgent) CancelGetSecrets(connectionPath dbus.ObjectPath, settingName string) *dbus.Error
func (*SecretAgent) DeleteSecrets ¶
func (sa *SecretAgent) DeleteSecrets(connectionData map[string]map[string]dbus.Variant, connectionPath dbus.ObjectPath) *dbus.Error
func (*SecretAgent) GetExportedMethods ¶
func (v *SecretAgent) GetExportedMethods() dbusutil.ExportedMethods
func (*SecretAgent) GetInterfaceName ¶
func (*SecretAgent) GetInterfaceName() string
func (*SecretAgent) GetSecrets ¶
func (*SecretAgent) SaveSecrets ¶
func (sa *SecretAgent) SaveSecrets(connectionData map[string]map[string]dbus.Variant, connectionPath dbus.ObjectPath) *dbus.Error
func (*SecretAgent) SaveSecretsDeepin ¶
func (sa *SecretAgent) SaveSecretsDeepin(connectionData map[string]map[string]dbus.Variant, connectionPath dbus.ObjectPath) *dbus.Error
type SecretAgentSession ¶
type SecretAgentSession struct { }
func (*SecretAgentSession) GetInterfaceName ¶
func (*SecretAgentSession) GetInterfaceName() string
func (*SecretAgentSession) GetSystemBusName ¶
func (*SecretAgentSession) GetSystemBusName() (name string, busErr *dbus.Error)
Source Files ¶
- decode_ssid.go
- exported_methods_auto.go
- manager.go
- manager_accesspoint.go
- manager_active_conn.go
- manager_connection.go
- manager_dbusutil.go
- manager_device.go
- manager_ip_conflict.go
- manager_proxy.go
- manager_stub.go
- module.go
- nm_custom_type.go
- nm_key_converter.go
- nm_key_edit.go
- nm_key_type.go
- nm_setting_802_1x.go
- nm_setting_beans_gen.go
- nm_setting_ip4_config.go
- nm_setting_ip6_config.go
- nm_setting_vpn.go
- nm_setting_wired.go
- nm_setting_wireless.go
- nm_setting_wireless_security.go
- secret_agent.go
- state_handler.go
- sync_config.go
- utils.go
- utils_dbus.go
- utils_dbus_mm.go
- utils_dbus_nm.go
- utils_ethtool.go
- utils_ip.go
- utils_notify.go
- utils_udev.go