Remove WPA2 and WPA3 service together
[platform/upstream/connman.git] / doc / service-api.txt
1 Service hierarchy
2 =================
3
4 Service         net.connman
5 Interface       net.connman.Service
6 Object path     [variable prefix]/{service0,service1,...}
7
8 Methods         dict GetProperties()  [deprecated]
9
10                         Returns properties for the service object. See
11                         the properties section for available properties.
12
13                         Usage of this method is highly discouraged. Use
14                         the Manager.GetServices() method instead.
15
16                         Possible Errors: [service].Error.InvalidArguments
17
18                 void SetProperty(string name, variant value)
19
20                         Changes the value of the specified property. Only
21                         properties that are listed as read-write are
22                         changeable. On success a PropertyChanged signal
23                         will be emitted.
24
25                         Properties cannot be set for hidden WiFi service
26                         entries or provisioned services.
27
28                         Possible Errors: [service].Error.InvalidArguments
29                                          [service].Error.InvalidProperty
30
31                 void ClearProperty(string name)
32
33                         Clears the value of the specified property. Only
34                         the readonly Error property can be cleared using
35                         this method call. When cleared the service is reset
36                         to the idle state.
37
38                         Possible Errors: [service].Error.InvalidProperty
39
40                 void Connect()
41
42                         Connect this service. It will attempt to connect
43                         WiFi or Bluetooth services.
44
45                         For Ethernet devices this method can only be used
46                         if it has previously been disconnected. Otherwise
47                         the plugging of a cable will trigger connecting
48                         automatically. If no cable is plugged in this method
49                         will fail.
50
51                         This method call will only return in case of an
52                         error or when the service is fully connected. So
53                         setting a longer D-Bus timeout might be a really
54                         good idea.
55
56                         Calling Connect() on a hidden WiFi service entry will
57                         query the missing SSID via the Agent API causing a
58                         WiFi service with the given SSID to be scanned,
59                         created and connected.
60
61                         Possible Errors: [service].Error.InvalidArguments
62
63                 void Disconnect()
64
65                         Disconnect this service. If the service is not
66                         connected an error message will be generated.
67
68                         On Ethernet devices this will disconnect the IP
69                         details from the service. It will not magically
70                         unplug the cable. When no cable is plugged in this
71                         method will fail.
72
73                         This method can also be used to abort a previous
74                         connection attempt via the Connect method.
75
76                         Hidden WiFi service entries cannot be disconnected
77                         as they always stay in idle state.
78
79                         Possible Errors: [service].Error.InvalidArguments
80
81                 void Remove()
82
83                         A successfully connected service with Favorite=true
84                         can be removed this way. If it is connected, it will
85                         be automatically disconnected first.
86
87                         If the service requires a passphrase it will be
88                         cleared and forgotten when removing.
89
90                         This is similar to setting the Favorite property
91                         to false, but that is currently not supported.
92
93                         In the case a connection attempt failed and the
94                         service is in the state "failure", "idle" or
95                         "disconnect", this method can also be used
96                         to reset the service.
97
98                         Calling this method on Ethernet devices, hidden WiFi
99                         services or provisioned services will cause an error
100                         message. It is not possible to remove these kind of
101                         services.
102
103                         Possible Errors: [service].Error.InvalidArguments
104
105                 void MoveBefore(object service)
106
107                         If a service has been used before, this allows a
108                         reorder of the favorite services.
109
110                         Possible Errors: [service].Error.InvalidArguments
111
112                 void MoveAfter(object service)
113
114                         If a service has been used before, this allows a
115                         reorder of the favorite services.
116
117                         Possible Errors: [service].Error.InvalidArguments
118
119                 void ResetCounters()  [experimental]
120
121                         Reset the counter statistics.
122
123                         Possible Errors: None
124
125 Signals         PropertyChanged(string name, variant value)
126
127                         This signal indicates a changed value of the given
128                         property.
129
130 Properties      string State [readonly]
131
132                         The service state information.
133
134                         Valid states are "idle", "failure", "association",
135                         "configuration", "ready", "disconnect" and "online".
136
137                         The "ready" state signals a successfully
138                         connected device. "online" signals that an
139                         Internet connection is available and has been
140                         verified.
141
142                         See doc/overview-api.txt for more information about
143                         state transitions.
144
145                 string Error [readonly]
146
147                         The service error status details.
148
149                         When error occur during connection or disconnection
150                         the detailed information is represented in this
151                         property to help the user interface to present the
152                         user with alternate options.
153
154                         This property is only valid when the service is in
155                         the "failure" state. Otherwise it might be empty or
156                         not present at all.
157
158                         Currently defined error codes are: "out-of-range",
159                         "pin-missing", "dhcp-failed", "connect-failed",
160                         "login-failed", "auth-failed" and "invalid-key".
161
162                 string Name [readonly]
163
164                         The service name (for example "Wireless" etc.)
165
166                         This name can be used for directly displaying it in
167                         the application. It has pure informational purpose
168                         and no attempt should be made to translate it.
169
170                         For Ethernet devices and hidden WiFi networks this
171                         property is not present.
172
173                 string Type [readonly]
174
175                         The service type (for example "ethernet", "wifi" etc.)
176
177                         This information should only be used to determine
178                         advanced properties or showing the correct icon
179                         to the user.
180
181                         Together with a missing Name property, this can
182                         be used to identify hidden WiFi networks.
183
184                 array{string} Security [readonly]
185
186                         If the service type is WiFi, then this property is
187                         present and contains the list of security methods
188                         or key management settings.
189
190                         Possible values are "none", "wep", "psk", "ieee8021x",
191                         and also "wps" and "wps_advertising".
192
193                         Value "wps" means that the service supports WPS. A
194                         service advertising itself as WPS registrar contains
195                         the additional value "wps_advertising" for as long as
196                         it is advertising. That is, while "wps_advertising" is
197                         listed, WPS is active and it should be possible to
198                         connect to the corresponding service via WPS.
199
200                         This property might be only present for WiFi
201                         services.
202
203                 string BSSID [readonly]
204
205                         If the service type is WiFi, then this property
206                         indicates the BSSID of the service.
207
208                 uint32 MaxRate [readonly]
209
210                         If the service type is WiFi, then this property
211                         indicates the Maximum speed(bps) of the service.
212
213                 uint16 Frequency [readonly]
214
215                         If the service type is WiFi, then this property
216                         indicates the frequency band(MHz) of the service.
217
218                 string EncryptionMode [readonly]
219
220                         If the service type is WiFi, then this property
221                         indicates the key encryption mode.
222
223                         Possible values are "none", "wep", "tkip", "aes"
224                         and "mixed".
225
226                         This property might be only present for WiFi
227                         services.
228
229                 uint8 Strength [readonly]
230
231                         Indicates the signal strength of the service. This
232                         is a normalized value between 0 and 100.
233
234                         This property will not be present for Ethernet
235                         devices.
236
237                 boolean Favorite [readonly]
238
239                         Will be true if a cable is plugged in or the user
240                         selected and successfully connected to this service.
241
242                         This value is automatically changed and to revert
243                         it back to false the Remove() method needs to be
244                         used.
245
246                 boolean Immutable [readonly]
247
248                         This value will be set to true if the service is
249                         configured externally via a configuration file.
250
251                         The only valid operations are Connect(), Disconnect()
252                         and changing the AutoConnect property. The Remove()
253                         method will result in an error.
254
255                 boolean AutoConnect [readwrite]
256
257                         If set to true, this service will auto-connect
258                         when no other connection is available.
259
260                         The service won't auto-connect while roaming.
261
262                         For favorite services it is possible to change
263                         this value to prevent or permit automatic
264                         connection attempts.
265
266                 boolean Roaming [readonly]
267
268                         This property indicates if this service is roaming.
269
270                         In the case of Cellular services this normally
271                         indicates connections to a foreign provider when
272                         traveling abroad.
273
274                 array{string} Nameservers [readonly]
275
276                         The list of currently active nameservers for this
277                         service. If the server is not in READY or ONLINE
278                         state than this list will be empty.
279
280                         Global nameservers are automatically added to this
281                         list. The array represents a sorted list of the
282                         current nameservers. The first one has the highest
283                         priority and is used by default.
284
285                         When using DHCP this array represents the nameservers
286                         provided by the network. In case of manual settings,
287                         the ones from Nameservers.Configuration are used.
288
289                 array{string} Nameservers.Configuration [readwrite]
290
291                         The list of manually configured domain name
292                         servers. Some cellular networks don't provide
293                         correct name servers and this allows for an
294                         override.
295
296                         This array is sorted by priority and the first
297                         entry in the list represents the nameserver with
298                         the highest priority.
299
300                         When using manual configuration and no global
301                         nameservers are configured, then it is useful
302                         to configure this setting.
303
304                         Changes to the domain name servers can be done
305                         at any time. It will not cause a disconnect of
306                         the service. However there might be small window
307                         where name resolution might fail.
308
309                 array{string} Timeservers [readonly]
310
311                         The list of currently active timeservers for this
312                         service. If the server is not in READY or ONLINE
313                         state than this list will be empty.
314
315                 array{string} Timeservers.Configuration [readwrite]
316
317                         The list of manually configured time servers.
318
319                         The first entry in the list represents the
320                         timeserver with the highest priority.
321
322                         When using manual configuration this setting
323                         is useful to override all the other timeserver
324                         settings. This is service specific, hence only
325                         the values for the default service are used.
326
327                         Changes to this property will result in restart
328                         of NTP query.
329
330                 array{string} Domains [readonly]
331
332                         The list of currently used search domains taken
333                         from Domains.Configurations if set, otherwise a
334                         domain name if provided by DHCP or VPNs.
335
336                 array{string} Domains.Configuration [readwrite]
337
338                         The list of manually configured search domains.
339
340                 dict IPv4 [readonly]
341
342                         string Method [readonly]
343
344                                 Possible values are "dhcp", "manual", "auto"
345                                 and "off".
346
347                                 It could be "auto" in case address was got
348                                 through IPv4LL after DHCP failed. In this
349                                 case also IPv4.Configuration will become
350                                 "auto" to allow user to ask for a DHCP
351                                 address at any time.
352
353                                 The value "fixed" indicates an IP address
354                                 that can not be modified. For example
355                                 cellular networks return fixed information.
356
357                         string Address [readonly]
358
359                                 The current configured IPv4 address.
360
361                         string Netmask [readonly]
362
363                                 The current configured IPv4 netmask.
364
365                         string Gateway [readonly]
366
367                                 The current configured IPv4 gateway.
368
369                 dict IPv4.Configuration [readwrite]
370
371                         Same values as IPv4 property. The IPv4 represents
372                         the actual system configuration while this allows
373                         user configuration.
374
375                         Changing these settings will cause a state change
376                         of the service. The service will become unavailable
377                         until the new configuration has been successfully
378                         installed.
379
380                 dict IPv6 [readonly]
381
382                         string Method [readonly]
383
384                                 Possible values are "auto", "manual", "6to4"
385                                 and "off".
386
387                                 The value "fixed" indicates an IP address
388                                 that can not be modified. For example
389                                 cellular networks return fixed information.
390                                 The value "6to4" is returned if 6to4 tunnel
391                                 is created by connman. The tunnel can only be
392                                 created if method was set to "auto" by the
393                                 user. User cannot set the method to "6to4".
394
395                         string Address [readonly]
396
397                                 The current configured IPv6 address.
398
399                         uint8 PrefixLength [readonly]
400
401                                 The prefix length of the IPv6 address.
402
403                         string Gateway [readonly]
404
405                                 The current configured IPv6 gateway.
406
407                         string Privacy [readonly]
408
409                                 Enable or disable IPv6 privacy extension
410                                 that is described in RFC 4941. The value
411                                 has only meaning if Method is set to "auto".
412
413                                 Value "disabled" means that privacy extension
414                                 is disabled and normal autoconf addresses are
415                                 used.
416
417                                 Value "enabled" means that privacy extension is
418                                 enabled and system prefers to use public
419                                 addresses over temporary addresses.
420
421                                 Value "prefered" means that privacy extension is
422                                 enabled and system prefers temporary addresses
423                                 over public addresses.
424
425                                 Default value is "disabled".
426
427                 dict IPv6.Configuration [readwrite]
428
429                         Same values as IPv6 property. The IPv6 represents
430                         the actual system configuration while this allows
431                         user configuration.
432
433                         Changing these settings will cause a state change
434                         of the service. The service will become unavailable
435                         until the new configuration has been successfully
436                         installed.
437
438                 dict Proxy [readonly]
439
440                         string Method [readonly]
441
442                                 Possible values are "direct", "auto" and
443                                 "manual".
444
445                                 In case of "auto" method, the URL file can be
446                                 provided unless you want to let DHCP/WPAD
447                                 auto-discover to be tried. In such case if DHCP
448                                 and WPAD auto-discover methods fails then
449                                 method will be "direct".
450
451                                 In case of "direct" no additional information
452                                 are provided. For the "manual" method the
453                                 Servers have to be set, Excludes is optional.
454
455                         string URL [readonly]
456
457                                 Automatic proxy configuration URL. Used by
458                                 "auto" method.
459
460                         array{string} Servers [readonly]
461
462                                 Used when "manual" method is set.
463
464                                 List of proxy URIs. The URI without a protocol
465                                 will be interpreted as the generic proxy URI.
466                                 All others will target a specific protocol and
467                                 only once.
468
469                                 Example for generic proxy server entry would
470                                 be like this: "server.example.com:911".
471
472                         array{string} Excludes [readonly]
473
474                                 Used when "manual" method is set.
475
476                                 List of hosts which can be accessed directly.
477
478                 dict Proxy.Configuration [readwrite]
479
480                         Same values as Proxy property. The Proxy represents
481                         the actual system configuration while this allows
482                         user configuration.
483
484                         If "auto" method is set with an empty URL, then
485                         DHCP/WPAD auto-discover will be tried. Otherwise the
486                         specified URL will be used.
487
488                 dict Provider [readonly]
489
490                         string Host [readonly]
491
492                                 VPN host IP.
493
494                         string Domain [readonly]
495
496                                 VPN Domain.
497
498                         string Name [readonly]
499
500                                 VPN provider Name.
501
502                         string Type [readonly]
503
504                                 VPN provider type.
505
506                 dict Ethernet [readonly]
507
508                         string Method [readonly]
509
510                                 Possible values are "auto" and "manual".
511
512                         string Interface [readonly]
513
514                                 Interface name (for example eth0).
515
516                         string Address [readonly]
517
518                                 Ethernet device address (MAC address).
519
520                         uint16 MTU [readonly]
521
522                                 The Ethernet MTU (default is 1500).
523
524                         uint16 Speed [readonly] [deprecated]
525
526                                 Selected speed of the line.
527
528                                 This information is not available.
529
530                         string Duplex [readonly] [deprecated]
531
532                                 Selected duplex settings of the line.
533                                 Possible values are "half" and "full".
534
535                                 This information is not available.
536
537                 bool mDNS [readonly]
538
539                         Whether or not mDNS support is enabled. Note
540                         that mDNS requires a DNS backend which
541                         supports it. Currently the only DNS backend
542                         which supports mDNS is systemd-resolved.
543
544                 bool mDNS.Configuration [readwrite]
545
546                         Same values as mDNS property. The mDNS
547                         represents the actual system configuration
548                         while this allows user configuration.
549
550                 dict LastAddressConflict [readonly]
551
552                         This property contains information about the previously detected
553                         address conflict. If there has been no address conflict then
554                         IPv4 Address is "0.0.0.0", Ethernet Address is "00:00:00:00:00:00",
555                         Timestamp is zero and Resolved is true.
556
557                         dict IPv4 [readonly]
558
559                                 string Address [readonly]
560
561                                 The IPv4 address which had a conflict.
562
563                         dict Ethernet [readonly]
564
565                                 string Address [readonly]
566
567                                 The ethernet device address (MAC address) of the conflicting
568                                 host.
569
570                         int64 Timestamp [readonly]
571
572                                 A timestamp when the conflict was detected in microseconds
573                                 since January 1, 1970 UTC.
574
575                         bool Resolved [readonly]
576
577                                 Set to false when an address conflict occurs.
578                                 If a previous conflict could be resolved by probing another
579                                 IPv4 address (which is not an IPv4LL) then this boolean is set
580                                 to true.