summaryrefslogtreecommitdiffstats
path: root/components/onc/onc_constants.h
blob: 5db4c920954b2241e2f78b6b199900a6362270e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_ONC_ONC_CONSTANTS_H_
#define COMPONENTS_ONC_ONC_CONSTANTS_H_

#include <string>

#include "components/onc/onc_export.h"

// Constants for ONC properties.
namespace onc {

// Indicates from which source an ONC blob comes from.
enum ONCSource {
  ONC_SOURCE_NONE,
  ONC_SOURCE_USER_IMPORT,
  ONC_SOURCE_DEVICE_POLICY,
  ONC_SOURCE_USER_POLICY,
};

// These keys are used to augment the dictionary resulting from merging the
// different settings and policies.

// The setting that Shill declared to be using. For example, if no policy and no
// user setting exists, Shill might still report a property like network
// security options or a SSID.
ONC_EXPORT extern const char kAugmentationActiveSetting[];
// The one of different setting sources (user/device policy, user/shared
// settings) that has highest priority over the others.
ONC_EXPORT extern const char kAugmentationEffectiveSetting[];
ONC_EXPORT extern const char kAugmentationUnmanaged[];
ONC_EXPORT extern const char kAugmentationUserPolicy[];
ONC_EXPORT extern const char kAugmentationDevicePolicy[];
ONC_EXPORT extern const char kAugmentationUserSetting[];
ONC_EXPORT extern const char kAugmentationSharedSetting[];
ONC_EXPORT extern const char kAugmentationUserEditable[];
ONC_EXPORT extern const char kAugmentationDeviceEditable[];

// This is no ONC key or value but used for logging only.
// TODO(pneubeck): Remove.
ONC_EXPORT extern const char kNetworkConfiguration[];

// Common keys/values.
ONC_EXPORT extern const char kRecommended[];
ONC_EXPORT extern const char kRemove[];

// Top Level Configuration
namespace toplevel_config {
ONC_EXPORT extern const char kCertificates[];
ONC_EXPORT extern const char kEncryptedConfiguration[];
ONC_EXPORT extern const char kNetworkConfigurations[];
ONC_EXPORT extern const char kGlobalNetworkConfiguration[];
ONC_EXPORT extern const char kType[];
ONC_EXPORT extern const char kUnencryptedConfiguration[];
}  // namespace toplevel_config

// NetworkConfiguration.
namespace network_config {
ONC_EXPORT extern const char kCellular[];
ONC_EXPORT extern const char kDevice[];
ONC_EXPORT extern const char kEthernet[];
ONC_EXPORT extern const char kGUID[];
ONC_EXPORT extern const char kIPConfigs[];
ONC_EXPORT extern const char kMacAddress[];
ONC_EXPORT extern const char kName[];
ONC_EXPORT extern const char kNameServers[];
ONC_EXPORT extern const char kProxySettings[];
ONC_EXPORT extern const char kSearchDomains[];
ONC_EXPORT extern const char kConnectionState[];
ONC_EXPORT extern const char kConnectable[];
ONC_EXPORT extern const char kErrorState[];
ONC_EXPORT extern const char kType[];
ONC_EXPORT extern const char kVPN[];
ONC_EXPORT extern const char kWiFi[];

ONC_EXPORT extern std::string CellularProperty(const std::string& property);
ONC_EXPORT extern std::string VpnProperty(const std::string& property);
ONC_EXPORT extern std::string WifiProperty(const std::string& property);

}  // namespace network_config

namespace network_type {
ONC_EXPORT extern const char kCellular[];
ONC_EXPORT extern const char kEthernet[];
ONC_EXPORT extern const char kVPN[];
ONC_EXPORT extern const char kWiFi[];
ONC_EXPORT extern const char kWimax[];
// Patterns matching multiple types, not part of the ONC spec.
ONC_EXPORT extern const char kAllTypes[];
ONC_EXPORT extern const char kWireless[];
}  // namespace network_type

namespace cellular {
ONC_EXPORT extern const char kActivationState[];
ONC_EXPORT extern const char kActivationType[];
ONC_EXPORT extern const char kAllowRoaming[];
ONC_EXPORT extern const char kAPN[];
ONC_EXPORT extern const char kAPNList[];
ONC_EXPORT extern const char kCarrier[];
ONC_EXPORT extern const char kESN[];
ONC_EXPORT extern const char kFamily[];
ONC_EXPORT extern const char kFirmwareRevision[];
ONC_EXPORT extern const char kFoundNetworks[];
ONC_EXPORT extern const char kHardwareRevision[];
ONC_EXPORT extern const char kHomeProvider[];
ONC_EXPORT extern const char kICCID[];
ONC_EXPORT extern const char kIMEI[];
ONC_EXPORT extern const char kIMSI[];
ONC_EXPORT extern const char kManufacturer[];
ONC_EXPORT extern const char kMDN[];
ONC_EXPORT extern const char kMEID[];
ONC_EXPORT extern const char kMIN[];
ONC_EXPORT extern const char kModelID[];
ONC_EXPORT extern const char kNetworkTechnology[];
ONC_EXPORT extern const char kPRLVersion[];
ONC_EXPORT extern const char kProviderRequiresRoaming[];
ONC_EXPORT extern const char kRoamingState[];
ONC_EXPORT extern const char kSelectedNetwork[];
ONC_EXPORT extern const char kServingOperator[];
ONC_EXPORT extern const char kSIMLockStatus[];
ONC_EXPORT extern const char kSIMPresent[];
ONC_EXPORT extern const char kSupportedCarriers[];
ONC_EXPORT extern const char kSupportNetworkScan[];
}  // namespace cellular

namespace cellular_provider {
ONC_EXPORT extern const char kCode[];
ONC_EXPORT extern const char kCountry[];
ONC_EXPORT extern const char kName[];
}  // namespace cellular_provider

namespace cellular_apn {
ONC_EXPORT extern const char kName[];
ONC_EXPORT extern const char kUsername[];
ONC_EXPORT extern const char kPassword[];
ONC_EXPORT extern const char kLocalizedName[];
ONC_EXPORT extern const char kLanguage[];
}  // namespace cellular_apn

namespace cellular_found_network {
ONC_EXPORT extern const char kStatus[];
ONC_EXPORT extern const char kNetworkId[];
ONC_EXPORT extern const char kShortName[];
ONC_EXPORT extern const char kLongName[];
ONC_EXPORT extern const char kTechnology[];
}  // namespace cellular_found_network

namespace sim_lock_status {
ONC_EXPORT extern const char kLockEnabled[];
ONC_EXPORT extern const char kLockType[];
ONC_EXPORT extern const char kRetriesLeft[];
}  // namespace sim_lock_status

namespace connection_state {
ONC_EXPORT extern const char kConnected[];
ONC_EXPORT extern const char kConnecting[];
ONC_EXPORT extern const char kNotConnected[];
}  // namespace connection_state

namespace ipconfig {
ONC_EXPORT extern const char kGateway[];
ONC_EXPORT extern const char kIPAddress[];
ONC_EXPORT extern const char kIPv4[];
ONC_EXPORT extern const char kIPv6[];
ONC_EXPORT extern const char kNameServers[];
ONC_EXPORT extern const char kRoutingPrefix[];
ONC_EXPORT extern const char kType[];
}  // namespace ipconfig

namespace ethernet {
ONC_EXPORT extern const char kAuthentication[];
ONC_EXPORT extern const char kAuthenticationNone[];
ONC_EXPORT extern const char kEAP[];
ONC_EXPORT extern const char k8021X[];
}  // namespace ethernet

namespace wifi {
ONC_EXPORT extern const char kAutoConnect[];
ONC_EXPORT extern const char kBSSID[];
ONC_EXPORT extern const char kEAP[];
ONC_EXPORT extern const char kFrequency[];
ONC_EXPORT extern const char kFrequencyList[];
ONC_EXPORT extern const char kHiddenSSID[];
ONC_EXPORT extern const char kPassphrase[];
ONC_EXPORT extern const char kProxyURL[];
ONC_EXPORT extern const char kSSID[];
ONC_EXPORT extern const char kSecurity[];
ONC_EXPORT extern const char kSecurityNone[];
ONC_EXPORT extern const char kSignalStrength[];
ONC_EXPORT extern const char kWEP_PSK[];
ONC_EXPORT extern const char kWEP_8021X[];
ONC_EXPORT extern const char kWPA_PSK[];
ONC_EXPORT extern const char kWPA2_PSK[];
ONC_EXPORT extern const char kWPA_EAP[];
}  // namespace wifi

namespace client_cert {
ONC_EXPORT extern const char kClientCertPattern[];
ONC_EXPORT extern const char kClientCertRef[];
ONC_EXPORT extern const char kClientCertType[];
ONC_EXPORT extern const char kClientCertTypeNone[];
ONC_EXPORT extern const char kCommonName[];
ONC_EXPORT extern const char kEmailAddress[];
ONC_EXPORT extern const char kEnrollmentURI[];
ONC_EXPORT extern const char kIssuerCARef[];
ONC_EXPORT extern const char kIssuerCAPEMs[];
ONC_EXPORT extern const char kIssuer[];
ONC_EXPORT extern const char kLocality[];
ONC_EXPORT extern const char kOrganization[];
ONC_EXPORT extern const char kOrganizationalUnit[];
ONC_EXPORT extern const char kPattern[];
ONC_EXPORT extern const char kRef[];
ONC_EXPORT extern const char kSubject[];
}  // namespace client_cert

namespace certificate {
ONC_EXPORT extern const char kAuthority[];
ONC_EXPORT extern const char kClient[];
ONC_EXPORT extern const char kGUID[];
ONC_EXPORT extern const char kPKCS12[];
ONC_EXPORT extern const char kServer[];
ONC_EXPORT extern const char kTrustBits[];
ONC_EXPORT extern const char kType[];
ONC_EXPORT extern const char kWeb[];
ONC_EXPORT extern const char kX509[];
}  // namespace certificate

namespace encrypted {
ONC_EXPORT extern const char kAES256[];
ONC_EXPORT extern const char kCipher[];
ONC_EXPORT extern const char kCiphertext[];
ONC_EXPORT extern const char kHMACMethod[];
ONC_EXPORT extern const char kHMAC[];
ONC_EXPORT extern const char kIV[];
ONC_EXPORT extern const char kIterations[];
ONC_EXPORT extern const char kPBKDF2[];
ONC_EXPORT extern const char kSHA1[];
ONC_EXPORT extern const char kSalt[];
ONC_EXPORT extern const char kStretch[];
}  // namespace encrypted

namespace eap {
ONC_EXPORT extern const char kAnonymousIdentity[];
ONC_EXPORT extern const char kAutomatic[];
ONC_EXPORT extern const char kEAP_AKA[];
ONC_EXPORT extern const char kEAP_FAST[];
ONC_EXPORT extern const char kEAP_SIM[];
ONC_EXPORT extern const char kEAP_TLS[];
ONC_EXPORT extern const char kEAP_TTLS[];
ONC_EXPORT extern const char kIdentity[];
ONC_EXPORT extern const char kInner[];
ONC_EXPORT extern const char kLEAP[];
ONC_EXPORT extern const char kMD5[];
ONC_EXPORT extern const char kMSCHAPv2[];
ONC_EXPORT extern const char kOuter[];
ONC_EXPORT extern const char kPAP[];
ONC_EXPORT extern const char kPEAP[];
ONC_EXPORT extern const char kPassword[];
ONC_EXPORT extern const char kSaveCredentials[];
ONC_EXPORT extern const char kServerCAPEMs[];
ONC_EXPORT extern const char kServerCARef[];
ONC_EXPORT extern const char kServerCARefs[];
ONC_EXPORT extern const char kUseSystemCAs[];
}  // namespace eap

namespace vpn {
ONC_EXPORT extern const char kAutoConnect[];
ONC_EXPORT extern const char kHost[];
ONC_EXPORT extern const char kIPsec[];
ONC_EXPORT extern const char kL2TP[];
ONC_EXPORT extern const char kOpenVPN[];
ONC_EXPORT extern const char kPassword[];
ONC_EXPORT extern const char kSaveCredentials[];
ONC_EXPORT extern const char kTypeL2TP_IPsec[];
ONC_EXPORT extern const char kType[];
ONC_EXPORT extern const char kUsername[];
}  // namespace vpn

namespace ipsec {
ONC_EXPORT extern const char kAuthenticationType[];
ONC_EXPORT extern const char kCert[];
ONC_EXPORT extern const char kEAP[];
ONC_EXPORT extern const char kGroup[];
ONC_EXPORT extern const char kIKEVersion[];
ONC_EXPORT extern const char kPSK[];
ONC_EXPORT extern const char kServerCAPEMs[];
ONC_EXPORT extern const char kServerCARef[];
ONC_EXPORT extern const char kServerCARefs[];
ONC_EXPORT extern const char kXAUTH[];
}  // namespace ipsec

namespace openvpn {
ONC_EXPORT extern const char kAuthNoCache[];
ONC_EXPORT extern const char kAuthRetry[];
ONC_EXPORT extern const char kAuth[];
ONC_EXPORT extern const char kCipher[];
ONC_EXPORT extern const char kCompLZO[];
ONC_EXPORT extern const char kCompNoAdapt[];
ONC_EXPORT extern const char kIgnoreDefaultRoute[];
ONC_EXPORT extern const char kInteract[];
ONC_EXPORT extern const char kKeyDirection[];
ONC_EXPORT extern const char kNoInteract[];
ONC_EXPORT extern const char kNone[];
ONC_EXPORT extern const char kNsCertType[];
ONC_EXPORT extern const char kPort[];
ONC_EXPORT extern const char kProto[];
ONC_EXPORT extern const char kPushPeerInfo[];
ONC_EXPORT extern const char kRemoteCertEKU[];
ONC_EXPORT extern const char kRemoteCertKU[];
ONC_EXPORT extern const char kRemoteCertTLS[];
ONC_EXPORT extern const char kRenegSec[];
ONC_EXPORT extern const char kServerCAPEMs[];
ONC_EXPORT extern const char kServerCARef[];
ONC_EXPORT extern const char kServerCARefs[];
ONC_EXPORT extern const char kServerCertPEM[];
ONC_EXPORT extern const char kServerCertRef[];
ONC_EXPORT extern const char kServerPollTimeout[];
ONC_EXPORT extern const char kServer[];
ONC_EXPORT extern const char kShaper[];
ONC_EXPORT extern const char kStaticChallenge[];
ONC_EXPORT extern const char kTLSAuthContents[];
ONC_EXPORT extern const char kTLSRemote[];
ONC_EXPORT extern const char kVerb[];
ONC_EXPORT extern const char kVerifyHash[];
ONC_EXPORT extern const char kVerifyX509[];
}  // namespace openvpn

namespace verify_x509 {
ONC_EXPORT extern const char kName[];
ONC_EXPORT extern const char kType[];

namespace types {
ONC_EXPORT extern const char kName[];
ONC_EXPORT extern const char kNamePrefix[];
ONC_EXPORT extern const char kSubject[];
}  // namespace types
}  // namespace verify_x509

namespace substitutes {
ONC_EXPORT extern const char kEmailField[];
ONC_EXPORT extern const char kLoginIDField[];
}  // namespace substitutes

namespace proxy {
ONC_EXPORT extern const char kDirect[];
ONC_EXPORT extern const char kExcludeDomains[];
ONC_EXPORT extern const char kFtp[];
ONC_EXPORT extern const char kHost[];
ONC_EXPORT extern const char kHttp[];
ONC_EXPORT extern const char kHttps[];
ONC_EXPORT extern const char kManual[];
ONC_EXPORT extern const char kPAC[];
ONC_EXPORT extern const char kPort[];
ONC_EXPORT extern const char kSocks[];
ONC_EXPORT extern const char kType[];
ONC_EXPORT extern const char kWPAD[];
}  // namespace proxy

namespace global_network_config {
ONC_EXPORT extern const char kAllowOnlyPolicyNetworksToAutoconnect[];
}  // global_network_config

}  // namespace onc

#endif  // COMPONENTS_ONC_ONC_CONSTANTS_H_