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 ¶
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.
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 .
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.
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.
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 .
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
const ( RoamStateIdle = "idle" RoamStateAssociation = "association" RoamStateConfiguration = "configuration" RoamStateReady = "ready" )
Roam state values defined in dbus-constants.h
const ( SecurityWPA = "wpa" SecurityWEP = "wep" SecurityRSN = "rsn" Security8021x = "802_1x" SecurityPSK = "psk" SecurityNone = "none" )
Security options defined in dbus-constants.h
const ( MacPolicyHardware = "Hardware" MacPolicyFullRandom = "FullRandom" MacPolicyOUIRandom = "OUIRandom" MacPolicyPersistentRandom = "PersistentRandom" MacPolicyNonPersistentRandom = "NonPersistentRandom" )
MAC randomization policy constants defined in dbus-constants.h
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" )
const ( ProfilePropertyCheckPortalList = "CheckPortalList" ProfilePropertyEntries = "Entries" ProfilePropertyName = "Name" ProfilePropertyPortalURL = "PortalURL" ProfilePropertyPortalCheckInterval = "PortalCheckInterval" ProfilePropertyServices = "Services" ProfilePropertyUserHash = "UserHash" ProfilePropertyProhibitedTechnologies = "ProhibitedTechnologies" ProfilePropertyArpGateway = "ArpGateway" ProfilePropertyNoAutoConnectTechnologies = "NoAutoConnectTechnologies" )
Profile property names.
const ( ProfileEntryPropertyName = "Name" ProfileEntryPropertyType = "Type" )
Profile entry property names.
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.
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
const ( WakeOnWiFiFeaturesDarkConnect = "darkconnect" WakeOnWiFiFeaturesNone = "none" )
WakeOnWiFi features.
const ( WakeOnWiFiReasonDisconnect = "WiFi.Disconnect" WakeOnWiFiReasonPattern = "WiFi.Pattern" WakeOnWiFiReasonSSID = "WiFi.SSID" WakeOnWiFiReasonUnknown = "Unknown" )
LastWakeReason values.
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
const (
DefaultTimeout = 30 * time.Second
)
Timeout constants for shill tests.
const (
// OperatorUUIDKey is the unique identifier of the carrier in the shill DB.
OperatorUUIDKey = "uuid"
)
Cellular Operator info values defined in dbus-constants.h
const (
ServiceErrorNoFailure = "no-failure"
)
Service Error values
const ServiceKeyMgmtIEEE8021X = "IEEE8021X"
ServiceKeyMgmtIEEE8021X is a value of EAPKeyMgmt.
const ServiceProviderOverridePath = "/var/cache/shill/serviceproviders-exclusive-override.pbf"
ServiceProviderOverridePath isth path of the modb file to override serviceproviders.pbf
Variables ¶
var ServiceConnectedStates = []interface{}{ ServiceStatePortal, ServiceStateNoConnectivity, ServiceStateRedirectFound, ServiceStatePortalSuspected, ServiceStateOnline, ServiceStateReady, }
ServiceConnectedStates is a list of service states that are considered connected.
Functions ¶
This section is empty.
Types ¶
type AllowedEntry ¶
AllowedEntry defines the error log entry that is allowed/expected.
func InitializeAllowedEntries ¶
func InitializeAllowedEntries() []AllowedEntry
InitializeAllowedEntries returns the allowed log entries with Counter = 0.