shillconst

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package shillconst defines the constants of shill service. This is defined under common/ as they might be used in both local and remote tests.

Index

Constants

View Source
const (
	TypeEthernet = "ethernet"
	TypeWifi     = "wifi"
	TypeCellular = "cellular"
	TypeVPN      = "vpn"
	TypePPPoE    = "pppoe"
)

Type values defined in dbus-constants.h The values are used both for Service type and Technology type.

View Source
const (
	// Device property names.
	DevicePropertyAddress         = "Address"
	DevicePropertyDBusObject      = "DBus.Object"
	DevicePropertyInhibited       = "Inhibited"
	DevicePropertyInterface       = "Interface"
	DevicePropertyPowered         = "Powered"
	DevicePropertyType            = "Type"
	DevicePropertySelectedService = "SelectedService"

	// Cellular device property names.
	DevicePropertyCellularAPNList            = "Cellular.APNList"
	DevicePropertyCellularHomeProvider       = "Cellular.HomeProvider"
	DevicePropertyCellularICCID              = "Cellular.ICCID"
	DevicePropertyCellularPolicyAllowRoaming = "Cellular.PolicyAllowRoaming"
	DevicePropertyCellularSIMPresent         = "Cellular.SIMPresent"
	DevicePropertyCellularSIMSlotInfo        = "Cellular.SIMSlotInfo"
	DevicePropertyCellularSIMLockStatus      = "Cellular.SIMLockStatus"

	// Keys into the dictionaries exposed as properties
	DevicePropertyCellularSIMLockStatusLockType    = "LockType"
	DevicePropertyCellularSIMLockStatusLockEnabled = "LockEnabled"
	DevicePropertyCellularSIMLockStatusRetriesLeft = "RetriesLeft"

	// Valid values taken by properties exposed by shill.
	DevicePropertyValueSIMLockTypePIN = "sim-pin"
	DevicePropertyValueSIMLockTypePUK = "sim-puk"

	// Ethernet device property names.
	DevicePropertyEthernetBusType   = "Ethernet.DeviceBusType"
	DevicePropertyEthernetLinkUp    = "Ethernet.LinkUp"
	DevicePropertyEthernetMACSource = "Ethernet.UsbEthernetMacAddressSource"
	DevicePropertyEapDetected       = "EapAuthenticatorDetected"
	DevicePropertyEapCompleted      = "EapAuthenticationCompleted"

	// WiFi device property names.
	DevicePropertyWiFiBgscanMethod           = "BgscanMethod"
	DevicePropertyWiFiScanInterval           = "ScanInterval"
	DevicePropertyWiFiBgscanShortInterval    = "BgscanShortInterval"
	DevicePropertyMACAddrRandomEnabled       = "MACAddressRandomizationEnabled"
	DevicePropertyMACAddrRandomSupported     = "MACAddressRandomizationSupported"
	DevicePropertyScanning                   = "Scanning" // Also for cellular.
	DevicePropertyWakeOnWiFiAllowed          = "WakeOnWiFiAllowed"
	DevicePropertyWakeOnWiFiFeaturesEnabled  = "WakeOnWiFiFeaturesEnabled"
	DevicePropertyLastWakeReason             = "LastWakeReason"
	DevicePropertyNetDetectScanPeriodSeconds = "NetDetectScanPeriodSeconds"
)

Device property names defined in dbus-constants.h .

View Source
const (
	IPConfigPropertyAddress                   = "Address"
	IPConfigPropertyNameServers               = "NameServers"
	IPConfigPropertyBroadcast                 = "Broadcast"
	IPConfigPropertyDomainName                = "DomainName"
	IPConfigPropertyGateway                   = "Gateway"
	IPConfigPropertyMethod                    = "Method"
	IPConfigPropertyMtu                       = "Mtu"
	IPConfigPropertyPeerAddress               = "PeerAddress"
	IPConfigPropertyPrefixlen                 = "Prefixlen"
	IPConfigPropertyVendorEncapsulatedOptions = "VendorEncapsulatedOptions"
	IPConfigPropertyWebProxyAutoDiscoveryURL  = "WebProxyAutoDiscoveryUrl"
	IPConfigPropertyiSNSOptionData            = "iSNSOptionData"
)

IPConfig property names.

View Source
const (
	ManagerPropertyActiveProfile          = "ActiveProfile"
	ManagerPropertyAvailableTechnologies  = "AvailableTechnologies"
	ManagerPropertyDevices                = "Devices"
	ManagerPropertyEnabledTechnologies    = "EnabledTechnologies"
	ManagerPropertyProfiles               = "Profiles"
	ManagerPropertyProhibitedTechnologies = "ProhibitedTechnologies"
	ManagerPropertyServices               = "Services"
	ManagerPropertyServiceCompleteList    = "ServiceCompleteList"
	ManagerPropertyGlobalFTEnabled        = "WiFi.GlobalFTEnabled"
	ManagerPropertyScanAllowRoam          = "WiFi.ScanAllowRoam"
	ManagerPropertyDOHProviders           = "DNSProxyDOHProviders"
)

Manager property names.

View Source
const (
	// Service property names.
	ServicePropertyConnectable    = "Connectable"
	ServicePropertyDevice         = "Device"
	ServicePropertyError          = "Error"
	ServicePropertyName           = "Name"
	ServicePropertyType           = "Type"
	ServicePropertyIsConnected    = "IsConnected"
	ServicePropertyMode           = "Mode"
	ServicePropertyState          = "State"
	ServicePropertyStaticIPConfig = "StaticIPConfig"
	ServicePropertyStrength       = "Strength"
	ServicePropertyVisible        = "Visible"
	ServicePropertyAutoConnect    = "AutoConnect"
	ServicePropertyGUID           = "GUID"
	ServicePropertyProvider       = "Provider"

	// Cellular service property names.
	ServicePropertyCellularICCID         = "Cellular.ICCID"
	ServicePropertyCellularAllowRoaming  = "Cellular.AllowRoaming"
	ServicePropertyCellularLastGoodAPN   = "Cellular.LastGoodAPN"
	ServicePropertyCellularLastAttachAPN = "Cellular.LastAttachAPN"
	ServicePropertyCellularRoamingState  = "Cellular.RoamingState"

	// Keys into the dictionaries exposed as properties for LastAttachAPN and LastGoodAPN
	DevicePropertyCellularAPNInfoApnName   = "apn"
	DevicePropertyCellularAPNInfoApnSource = "apn_source"
	DevicePropertyCellularAPNInfoApnAttach = "attach"
	DevicePropertyCellularAPNInfoApnIPType = "ip_type"

	// WiFi service property names.
	ServicePropertyPassphrase          = "Passphrase"
	ServicePropertySecurityClass       = "SecurityClass"
	ServicePropertySSID                = "SSID"
	ServicePropertyWiFiBSSID           = "WiFi.BSSID"
	ServicePropertyWiFiFrequency       = "WiFi.Frequency"
	ServicePropertyWiFiFrequencyList   = "WiFi.FrequencyList"
	ServicePropertyWiFiHexSSID         = "WiFi.HexSSID"
	ServicePropertyWiFiHiddenSSID      = "WiFi.HiddenSSID"
	ServicePropertyWiFiRandomMACPolicy = "WiFi.RandomMACPolicy"
	ServicePropertyWiFiPhyMode         = "WiFi.PhyMode"
	ServicePropertyWiFiRekeyInProgress = "WiFi.RekeyInProgress"
	ServicePropertyWiFiRoamState       = "WiFi.RoamState"

	// EAP service property names.
	ServicePropertyEAPCACertPEM                   = "EAP.CACertPEM"
	ServicePropertyEAPMethod                      = "EAP.EAP"
	ServicePropertyEAPInnerEAP                    = "EAP.InnerEAP"
	ServicePropertyEAPIdentity                    = "EAP.Identity"
	ServicePropertyEAPPassword                    = "EAP.Password"
	ServicePropertyEAPPin                         = "EAP.PIN"
	ServicePropertyEAPCertID                      = "EAP.CertID"
	ServicePropertyEAPKeyID                       = "EAP.KeyID"
	ServicePropertyEAPKeyMgmt                     = "EAP.KeyMgmt"
	ServicePropertyEAPUseSystemCAs                = "EAP.UseSystemCAs"
	ServicePropertyEAPSubjectAlternativeNameMatch = "EAP.SubjectAlternativeNameMatch"
	ServicePropertyEAPDomainSuffixMatch           = "EAP.DomainSuffixMatch"
)

Service property names defined in dbus-constants.h .

View Source
const (
	ServiceStateIdle              = "idle"
	ServiceStateCarrier           = "carrier"
	ServiceStateAssociation       = "association"
	ServiceStateConfiguration     = "configuration"
	ServiceStateReady             = "ready"
	ServiceStatePortal            = "portal"
	ServiceStateNoConnectivity    = "no-connectivity"
	ServiceStateRedirectFound     = "redirect-found"
	ServiceStatePortalSuspected   = "portal-suspected"
	ServiceStateOffline           = "offline"
	ServiceStateOnline            = "online"
	ServiceStateDisconnect        = "disconnecting"
	ServiceStateFailure           = "failure"
	ServiceStateActivationFailure = "activation-failure"
)

Service state values defined in dbus-constants.h

View Source
const (
	RoamStateIdle          = "idle"
	RoamStateAssociation   = "association"
	RoamStateConfiguration = "configuration"
	RoamStateReady         = "ready"
)

Roam state values defined in dbus-constants.h

View Source
const (
	SecurityWPA   = "wpa"
	SecurityWEP   = "wep"
	SecurityRSN   = "rsn"
	Security8021x = "802_1x"
	SecurityPSK   = "psk"
	SecurityNone  = "none"
)

Security options defined in dbus-constants.h

View Source
const (
	MacPolicyHardware            = "Hardware"
	MacPolicyFullRandom          = "FullRandom"
	MacPolicyOUIRandom           = "OUIRandom"
	MacPolicyPersistentRandom    = "PersistentRandom"
	MacPolicyNonPersistentRandom = "NonPersistentRandom"
)

MAC randomization policy constants defined in dbus-constants.h

View Source
const (
	// DefaultProfileName is the name of default profile.
	DefaultProfileName = "default"
	// DefaultProfileObjectPath is the dbus object path of default profile.
	DefaultProfileObjectPath dbus.ObjectPath = "/profile/" + DefaultProfileName
	// DefaultProfilePath is the path of default profile.
	DefaultProfilePath = defaultStorageDir + DefaultProfileName + ".profile"
)
View Source
const (
	ProfilePropertyCheckPortalList           = "CheckPortalList"
	ProfilePropertyEntries                   = "Entries"
	ProfilePropertyName                      = "Name"
	ProfilePropertyPortalURL                 = "PortalURL"
	ProfilePropertyPortalCheckInterval       = "PortalCheckInterval"
	ProfilePropertyServices                  = "Services"
	ProfilePropertyUserHash                  = "UserHash"
	ProfilePropertyProhibitedTechnologies    = "ProhibitedTechnologies"
	ProfilePropertyArpGateway                = "ArpGateway"
	ProfilePropertyNoAutoConnectTechnologies = "NoAutoConnectTechnologies"
)

Profile property names.

View Source
const (
	ProfileEntryPropertyName = "Name"
	ProfileEntryPropertyType = "Type"
)

Profile entry property names.

View Source
const (
	DHCPPropertyHostname    = dhcpPropertyPrefix + "Hostname"
	DHCPPropertyVendorClass = dhcpPropertyPrefix + "VendorClass"
)

DHCP property names defined in dhcp/dhcp_properties.cc. These keys can be used in properties of both Manager or Service.

View Source
const (
	DeviceBgscanMethodSimple = "simple"
	DeviceBgscanMethodLearn  = "learn"
	DeviceBgscanMethodNone   = "none"
)

Device background scan methods. The values are from wpa_supplicant + "none" for no background scan. See:

https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf
platform2/shill/supplicant/wpa_supplicant.cc
View Source
const (
	WakeOnWiFiFeaturesDarkConnect = "darkconnect"
	WakeOnWiFiFeaturesNone        = "none"
)

WakeOnWiFi features.

View Source
const (
	WakeOnWiFiReasonDisconnect = "WiFi.Disconnect"
	WakeOnWiFiReasonPattern    = "WiFi.Pattern"
	WakeOnWiFiReasonSSID       = "WiFi.SSID"
	WakeOnWiFiReasonUnknown    = "Unknown"
)

LastWakeReason values.

View Source
const (
	ErrorMatchingServiceNotFound = "Matching service was not found"
	ErrorModemNotStarted         = "Modem not started"
	// For error org.freedesktop.ModemManager1.Error.MobileEquipment.IncorrectPin.
	ErrorIncorrectPin = "IncorrectPin"
	// For error org.freedesktop.ModemManager1.Error.MobileEquipment.IncorrectPassword.
	ErrorIncorrectPassword = "Incorrect password"
	ErrorPinFailure        = "Failure"
	// For error org.freedesktop.ModemManager1.Error.MobileEquipment.SimPuk.
	ErrorPukRequired = "SIM PUK required"
	ErrorPinBlocked  = "PinBlocked"
)

DBus Errors

View Source
const (
	DefaultTimeout = 30 * time.Second
)

Timeout constants for shill tests.

View Source
const (
	// OperatorUUIDKey is the unique identifier of the carrier in the shill DB.
	OperatorUUIDKey = "uuid"
)

Cellular Operator info values defined in dbus-constants.h

View Source
const (
	ServiceErrorNoFailure = "no-failure"
)

Service Error values

View Source
const ServiceKeyMgmtIEEE8021X = "IEEE8021X"

ServiceKeyMgmtIEEE8021X is a value of EAPKeyMgmt.

View Source
const ServiceProviderOverridePath = "/usr/share/shill/serviceproviders-exclusive-override.pbf"

ServiceProviderOverridePath isth path of the modb file to override serviceproviders.pbf

Variables

ServiceConnectedStates is a list of service states that are considered connected.

Functions

This section is empty.

Types

type AllowedEntry

type AllowedEntry struct {
	Program      string
	FileName     string
	MessageRegex string
	Counter      int
}

AllowedEntry defines the error log entry that is allowed/expected.

func InitializeAllowedEntries

func InitializeAllowedEntries() []AllowedEntry

InitializeAllowedEntries returns the allowed log entries with Counter = 0.

Jump to

Keyboard shortcuts

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