Home | History | Annotate | Download | only in onc
      1 // Copyright 2013 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 #ifndef COMPONENTS_ONC_ONC_CONSTANTS_H_
      5 #define COMPONENTS_ONC_ONC_CONSTANTS_H_
      6 
      7 #include "components/onc/onc_export.h"
      8 
      9 // Constants for ONC properties.
     10 namespace onc {
     11 
     12 // Indicates from which source an ONC blob comes from.
     13 enum ONCSource {
     14   ONC_SOURCE_NONE,
     15   ONC_SOURCE_USER_IMPORT,
     16   ONC_SOURCE_DEVICE_POLICY,
     17   ONC_SOURCE_USER_POLICY,
     18 };
     19 
     20 // These keys are used to augment the dictionary resulting from merging the
     21 // different settings and policies.
     22 
     23 // The setting that Shill declared to be using. For example, if no policy and no
     24 // user setting exists, Shill might still report a property like network
     25 // security options or a SSID.
     26 ONC_EXPORT extern const char kAugmentationActiveSetting[];
     27 // The one of different setting sources (user/device policy, user/shared
     28 // settings) that has highest priority over the others.
     29 ONC_EXPORT extern const char kAugmentationEffectiveSetting[];
     30 ONC_EXPORT extern const char kAugmentationUnmanaged[];
     31 ONC_EXPORT extern const char kAugmentationUserPolicy[];
     32 ONC_EXPORT extern const char kAugmentationDevicePolicy[];
     33 ONC_EXPORT extern const char kAugmentationUserSetting[];
     34 ONC_EXPORT extern const char kAugmentationSharedSetting[];
     35 ONC_EXPORT extern const char kAugmentationUserEditable[];
     36 ONC_EXPORT extern const char kAugmentationDeviceEditable[];
     37 
     38 // This is no ONC key or value but used for logging only.
     39 // TODO(pneubeck): Remove.
     40 ONC_EXPORT extern const char kNetworkConfiguration[];
     41 
     42 // Common keys/values.
     43 ONC_EXPORT extern const char kRecommended[];
     44 ONC_EXPORT extern const char kRemove[];
     45 
     46 // Top Level Configuration
     47 namespace toplevel_config {
     48 ONC_EXPORT extern const char kCertificates[];
     49 ONC_EXPORT extern const char kEncryptedConfiguration[];
     50 ONC_EXPORT extern const char kNetworkConfigurations[];
     51 ONC_EXPORT extern const char kGlobalNetworkConfiguration[];
     52 ONC_EXPORT extern const char kType[];
     53 ONC_EXPORT extern const char kUnencryptedConfiguration[];
     54 }  // namespace toplevel_config
     55 
     56 // NetworkConfiguration.
     57 namespace network_config {
     58 ONC_EXPORT extern const char kCellular[];
     59 ONC_EXPORT extern const char kEthernet[];
     60 ONC_EXPORT extern const char kGUID[];
     61 ONC_EXPORT extern const char kIPConfigs[];
     62 ONC_EXPORT extern const char kName[];
     63 ONC_EXPORT extern const char kNameServers[];
     64 ONC_EXPORT extern const char kProxySettings[];
     65 ONC_EXPORT extern const char kSearchDomains[];
     66 ONC_EXPORT extern const char kServicePath[];
     67 ONC_EXPORT extern const char kConnectionState[];
     68 ONC_EXPORT extern const char kType[];
     69 ONC_EXPORT extern const char kVPN[];
     70 ONC_EXPORT extern const char kWiFi[];
     71 }  // namespace network_config
     72 
     73 namespace network_type {
     74 ONC_EXPORT extern const char kAllTypes[];
     75 ONC_EXPORT extern const char kCellular[];
     76 ONC_EXPORT extern const char kEthernet[];
     77 ONC_EXPORT extern const char kVPN[];
     78 ONC_EXPORT extern const char kWiFi[];
     79 }  // namespace network_type
     80 
     81 namespace cellular {
     82 ONC_EXPORT extern const char kActivateOverNonCellularNetwork[];
     83 ONC_EXPORT extern const char kActivationState[];
     84 ONC_EXPORT extern const char kAllowRoaming[];
     85 ONC_EXPORT extern const char kAPN[];
     86 ONC_EXPORT extern const char kAPNList[];
     87 ONC_EXPORT extern const char kCarrier[];
     88 ONC_EXPORT extern const char kESN[];
     89 ONC_EXPORT extern const char kFamily[];
     90 ONC_EXPORT extern const char kFirmwareRevision[];
     91 ONC_EXPORT extern const char kFoundNetworks[];
     92 ONC_EXPORT extern const char kHardwareRevision[];
     93 ONC_EXPORT extern const char kHomeProvider[];
     94 ONC_EXPORT extern const char kICCID[];
     95 ONC_EXPORT extern const char kIMEI[];
     96 ONC_EXPORT extern const char kIMSI[];
     97 ONC_EXPORT extern const char kManufacturer[];
     98 ONC_EXPORT extern const char kMDN[];
     99 ONC_EXPORT extern const char kMEID[];
    100 ONC_EXPORT extern const char kMIN[];
    101 ONC_EXPORT extern const char kModelID[];
    102 ONC_EXPORT extern const char kNetworkTechnology[];
    103 ONC_EXPORT extern const char kPRLVersion[];
    104 ONC_EXPORT extern const char kProviderRequiresRoaming[];
    105 ONC_EXPORT extern const char kRoamingState[];
    106 ONC_EXPORT extern const char kSelectedNetwork[];
    107 ONC_EXPORT extern const char kServingOperator[];
    108 ONC_EXPORT extern const char kSIMLockStatus[];
    109 ONC_EXPORT extern const char kSIMPresent[];
    110 ONC_EXPORT extern const char kSupportedCarriers[];
    111 ONC_EXPORT extern const char kSupportNetworkScan[];
    112 }  // namespace cellular
    113 
    114 namespace cellular_provider {
    115 ONC_EXPORT extern const char kCode[];
    116 ONC_EXPORT extern const char kCountry[];
    117 ONC_EXPORT extern const char kName[];
    118 }  // namespace cellular_provider
    119 
    120 namespace cellular_apn {
    121 ONC_EXPORT extern const char kName[];
    122 ONC_EXPORT extern const char kUsername[];
    123 ONC_EXPORT extern const char kPassword[];
    124 }  // namespace cellular_apn
    125 
    126 
    127 namespace connection_state {
    128 ONC_EXPORT extern const char kConnected[];
    129 ONC_EXPORT extern const char kConnecting[];
    130 ONC_EXPORT extern const char kNotConnected[];
    131 }  // namespace connection_state
    132 
    133 namespace ipconfig {
    134 ONC_EXPORT extern const char kGateway[];
    135 ONC_EXPORT extern const char kIPAddress[];
    136 ONC_EXPORT extern const char kIPv4[];
    137 ONC_EXPORT extern const char kIPv6[];
    138 ONC_EXPORT extern const char kRoutingPrefix[];
    139 ONC_EXPORT extern const char kType[];
    140 }  // namespace ipconfig
    141 
    142 namespace ethernet {
    143 ONC_EXPORT extern const char kAuthentication[];
    144 ONC_EXPORT extern const char kEAP[];
    145 ONC_EXPORT extern const char kNone[];
    146 ONC_EXPORT extern const char k8021X[];
    147 }  // namespace ethernet
    148 
    149 namespace wifi {
    150 ONC_EXPORT extern const char kAutoConnect[];
    151 ONC_EXPORT extern const char kBSSID[];
    152 ONC_EXPORT extern const char kEAP[];
    153 ONC_EXPORT extern const char kFrequency[];
    154 ONC_EXPORT extern const char kFrequencyList[];
    155 ONC_EXPORT extern const char kHiddenSSID[];
    156 ONC_EXPORT extern const char kNone[];
    157 ONC_EXPORT extern const char kPassphrase[];
    158 ONC_EXPORT extern const char kProxyURL[];
    159 ONC_EXPORT extern const char kSSID[];
    160 ONC_EXPORT extern const char kSecurity[];
    161 ONC_EXPORT extern const char kSignalStrength[];
    162 ONC_EXPORT extern const char kWEP_PSK[];
    163 ONC_EXPORT extern const char kWEP_8021X[];
    164 ONC_EXPORT extern const char kWPA_PSK[];
    165 ONC_EXPORT extern const char kWPA2_PSK[];
    166 ONC_EXPORT extern const char kWPA_EAP[];
    167 }  // namespace wifi
    168 
    169 namespace certificate {
    170 ONC_EXPORT extern const char kAuthority[];
    171 ONC_EXPORT extern const char kClient[];
    172 ONC_EXPORT extern const char kCommonName[];
    173 ONC_EXPORT extern const char kEmailAddress[];
    174 ONC_EXPORT extern const char kEnrollmentURI[];
    175 ONC_EXPORT extern const char kGUID[];
    176 ONC_EXPORT extern const char kIssuerCARef[];
    177 ONC_EXPORT extern const char kIssuerCAPEMs[];
    178 ONC_EXPORT extern const char kIssuer[];
    179 ONC_EXPORT extern const char kLocality[];
    180 ONC_EXPORT extern const char kNone[];
    181 ONC_EXPORT extern const char kOrganization[];
    182 ONC_EXPORT extern const char kOrganizationalUnit[];
    183 ONC_EXPORT extern const char kPKCS12[];
    184 ONC_EXPORT extern const char kPattern[];
    185 ONC_EXPORT extern const char kRef[];
    186 ONC_EXPORT extern const char kServer[];
    187 ONC_EXPORT extern const char kSubject[];
    188 ONC_EXPORT extern const char kTrustBits[];
    189 ONC_EXPORT extern const char kType[];
    190 ONC_EXPORT extern const char kWeb[];
    191 ONC_EXPORT extern const char kX509[];
    192 }  // namespace certificate
    193 
    194 namespace encrypted {
    195 ONC_EXPORT extern const char kAES256[];
    196 ONC_EXPORT extern const char kCipher[];
    197 ONC_EXPORT extern const char kCiphertext[];
    198 ONC_EXPORT extern const char kHMACMethod[];
    199 ONC_EXPORT extern const char kHMAC[];
    200 ONC_EXPORT extern const char kIV[];
    201 ONC_EXPORT extern const char kIterations[];
    202 ONC_EXPORT extern const char kPBKDF2[];
    203 ONC_EXPORT extern const char kSHA1[];
    204 ONC_EXPORT extern const char kSalt[];
    205 ONC_EXPORT extern const char kStretch[];
    206 }  // namespace encrypted
    207 
    208 namespace eap {
    209 ONC_EXPORT extern const char kAnonymousIdentity[];
    210 ONC_EXPORT extern const char kAutomatic[];
    211 ONC_EXPORT extern const char kClientCertPattern[];
    212 ONC_EXPORT extern const char kClientCertRef[];
    213 ONC_EXPORT extern const char kClientCertType[];
    214 ONC_EXPORT extern const char kEAP_AKA[];
    215 ONC_EXPORT extern const char kEAP_FAST[];
    216 ONC_EXPORT extern const char kEAP_SIM[];
    217 ONC_EXPORT extern const char kEAP_TLS[];
    218 ONC_EXPORT extern const char kEAP_TTLS[];
    219 ONC_EXPORT extern const char kIdentity[];
    220 ONC_EXPORT extern const char kInner[];
    221 ONC_EXPORT extern const char kLEAP[];
    222 ONC_EXPORT extern const char kMD5[];
    223 ONC_EXPORT extern const char kMSCHAPv2[];
    224 ONC_EXPORT extern const char kOuter[];
    225 ONC_EXPORT extern const char kPAP[];
    226 ONC_EXPORT extern const char kPEAP[];
    227 ONC_EXPORT extern const char kPassword[];
    228 ONC_EXPORT extern const char kSaveCredentials[];
    229 ONC_EXPORT extern const char kServerCAPEMs[];
    230 ONC_EXPORT extern const char kServerCARef[];
    231 ONC_EXPORT extern const char kServerCARefs[];
    232 ONC_EXPORT extern const char kUseSystemCAs[];
    233 }  // namespace eap
    234 
    235 namespace vpn {
    236 ONC_EXPORT extern const char kAutoConnect[];
    237 ONC_EXPORT extern const char kClientCertPattern[];
    238 ONC_EXPORT extern const char kClientCertRef[];
    239 ONC_EXPORT extern const char kClientCertType[];
    240 ONC_EXPORT extern const char kHost[];
    241 ONC_EXPORT extern const char kIPsec[];
    242 ONC_EXPORT extern const char kL2TP[];
    243 ONC_EXPORT extern const char kOpenVPN[];
    244 ONC_EXPORT extern const char kPassword[];
    245 ONC_EXPORT extern const char kSaveCredentials[];
    246 ONC_EXPORT extern const char kTypeL2TP_IPsec[];
    247 ONC_EXPORT extern const char kType[];
    248 ONC_EXPORT extern const char kUsername[];
    249 }  // namespace vpn
    250 
    251 namespace ipsec {
    252 ONC_EXPORT extern const char kAuthenticationType[];
    253 ONC_EXPORT extern const char kCert[];
    254 ONC_EXPORT extern const char kEAP[];
    255 ONC_EXPORT extern const char kGroup[];
    256 ONC_EXPORT extern const char kIKEVersion[];
    257 ONC_EXPORT extern const char kPSK[];
    258 ONC_EXPORT extern const char kServerCAPEMs[];
    259 ONC_EXPORT extern const char kServerCARef[];
    260 ONC_EXPORT extern const char kServerCARefs[];
    261 ONC_EXPORT extern const char kXAUTH[];
    262 }  // namespace ipsec
    263 
    264 namespace openvpn {
    265 ONC_EXPORT extern const char kAuthNoCache[];
    266 ONC_EXPORT extern const char kAuthRetry[];
    267 ONC_EXPORT extern const char kAuth[];
    268 ONC_EXPORT extern const char kCipher[];
    269 ONC_EXPORT extern const char kCompLZO[];
    270 ONC_EXPORT extern const char kCompNoAdapt[];
    271 ONC_EXPORT extern const char kInteract[];
    272 ONC_EXPORT extern const char kKeyDirection[];
    273 ONC_EXPORT extern const char kNoInteract[];
    274 ONC_EXPORT extern const char kNone[];
    275 ONC_EXPORT extern const char kNsCertType[];
    276 ONC_EXPORT extern const char kPort[];
    277 ONC_EXPORT extern const char kProto[];
    278 ONC_EXPORT extern const char kPushPeerInfo[];
    279 ONC_EXPORT extern const char kRemoteCertEKU[];
    280 ONC_EXPORT extern const char kRemoteCertKU[];
    281 ONC_EXPORT extern const char kRemoteCertTLS[];
    282 ONC_EXPORT extern const char kRenegSec[];
    283 ONC_EXPORT extern const char kServerCAPEMs[];
    284 ONC_EXPORT extern const char kServerCARef[];
    285 ONC_EXPORT extern const char kServerCARefs[];
    286 ONC_EXPORT extern const char kServerCertPEM[];
    287 ONC_EXPORT extern const char kServerCertRef[];
    288 ONC_EXPORT extern const char kServerPollTimeout[];
    289 ONC_EXPORT extern const char kServer[];
    290 ONC_EXPORT extern const char kShaper[];
    291 ONC_EXPORT extern const char kStaticChallenge[];
    292 ONC_EXPORT extern const char kTLSAuthContents[];
    293 ONC_EXPORT extern const char kTLSRemote[];
    294 ONC_EXPORT extern const char kVerb[];
    295 ONC_EXPORT extern const char kVerifyHash[];
    296 ONC_EXPORT extern const char kVerifyX509[];
    297 }  // namespace openvpn
    298 
    299 namespace verify_x509 {
    300 ONC_EXPORT extern const char kName[];
    301 ONC_EXPORT extern const char kType[];
    302 
    303 namespace types {
    304 ONC_EXPORT extern const char kName[];
    305 ONC_EXPORT extern const char kNamePrefix[];
    306 ONC_EXPORT extern const char kSubject[];
    307 }  // namespace types
    308 }  // namespace verify_x509
    309 
    310 namespace substitutes {
    311 ONC_EXPORT extern const char kEmailField[];
    312 ONC_EXPORT extern const char kLoginIDField[];
    313 }  // namespace substitutes
    314 
    315 namespace proxy {
    316 ONC_EXPORT extern const char kDirect[];
    317 ONC_EXPORT extern const char kExcludeDomains[];
    318 ONC_EXPORT extern const char kFtp[];
    319 ONC_EXPORT extern const char kHost[];
    320 ONC_EXPORT extern const char kHttp[];
    321 ONC_EXPORT extern const char kHttps[];
    322 ONC_EXPORT extern const char kManual[];
    323 ONC_EXPORT extern const char kPAC[];
    324 ONC_EXPORT extern const char kPort[];
    325 ONC_EXPORT extern const char kSocks[];
    326 ONC_EXPORT extern const char kType[];
    327 ONC_EXPORT extern const char kWPAD[];
    328 }  // namespace proxy
    329 
    330 namespace global_network_config {
    331 ONC_EXPORT extern const char kAllowOnlyPolicyNetworksToAutoconnect[];
    332 }  // global_network_config
    333 
    334 }  // namespace onc
    335 
    336 #endif  // COMPONENTS_ONC_ONC_CONSTANTS_H_
    337 
    338