Imported Upstream version 1.38
[platform/upstream/connman.git] / doc / config-format.txt
index 7be6d05..cdde9cb 100644 (file)
@@ -5,30 +5,28 @@ Connman uses configuration files to provision existing services. Connman will
 be looking for its configuration files at STORAGEDIR which by default points
 to /var/lib/connman/. Configuration file names must not include other
 characters than letters or numbers and must have a .config suffix.
-Those configuration files are text files with a simple format and we typically
-have one file per provisioned network.
+Those configuration files are text files with a simple key-value pair format,
+organized into sections. Values do not comprise leading or trailing whitespace.
+We typically have one file per provisioned network.
 
 If the config file is removed, then Connman tries to remove the
-provisioned service. If individual service entry inside config is removed,
-then the corresponding provisioned service is removed. If service
-entry is changed, then corresponding service is removed and then
-immediately re-provisioned.
+provisioned services. If an individual service inside a config is removed,
+then the corresponding provisioned service is removed. If a service section
+is changed, then the corresponding service is removed and immediately
+re-provisioned.
 
 
-Global entry [global]
-=====================
+Global section [global]
+=======================
 
-These files can have an optional global entry describing the actual file.
-The 2 allowed fields for that entry are:
+These files can have an optional global section describing the actual file.
+The two allowed fields for this section are:
 - Name: Name of the network.
 - Description: Description of the network.
-- Protected: Configuration protection against being removed, modified or
-overwritten by a Manager.ProvisionService() call. If unset, this value defaults
-to TRUE, i.e. configs are protected by default.
 
 
-Service entry [service_*]
-=========================
+Service sections [service_*]
+============================
 
 Each provisioned service must start with the [service_*] tag. Replace * with
 an identifier unique to the config file.
@@ -37,25 +35,41 @@ Allowed fields:
 - Type: Service type. We currently only support wifi and ethernet.
 - IPv4: The IPv4 address, netmask and gateway. Format of the entry
   is network/netmask/gateway. The mask length can be used instead
-  of netmask.
+  of netmask. The gateway can be omitted if necessary.
+  The IPv4 field can also contain the string "off" or "dhcp".
+  If the setting is "off", then no IPv4 address is set to the interface.
+  If the setting is "dhcp", then DHCPv4 address resolution is activated.
   Example: 192.168.1.2/24/192.168.1.1
            192.168.200.100/255.255.255.0/192.168.200.1
+           10.0.0.2/24
 - IPv6: The IPv6 address, prefix length and gateway. Format of the entry
   is network/prefixlen/gateway. For IPv6 addresses only prefix length is
-  accepted.
+  accepted. The gateway can be omitted if necessary.
+  The IPv6 field can also contain the string "off" or "auto".
+  If the setting is "off", then no IPv6 address is set to the interface.
+  If the setting is "auto", then SLAAC or DHCPv6 is used.
   Example: 2001:db8::2/64/2001:db8::1
+           2001:db8::1:2:3:4/64
 - IPv6.Privacy: IPv6 privacy option. Value can be either "disabled",
-  "enabled" or "prefered". See use_tempaddr variable description in Linux
-  kernel Documentation/networking/ip-sysctl.txt file.
+  "enabled" or "preferred" (or the misspelled "prefered"). See use_tempaddr
+  variable description in Linux kernel Documentation/networking/ip-sysctl.txt
+  file.
 - MAC: MAC address of the interface where this setting should be applied.
   The MAC address is optional and if it is missing, then the first found
   interface is used. The byte values must have prefix 0 added,
   the bytes must be separated by ":" char and its length must be
   exactly 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1 + 2 = 17 characters.
+- DeviceName: The interface name where this setting should be applied, e.g.
+  eth0. The MAC address will take preference over DeviceName in matching.
 - Nameservers: Comma separated list of nameservers
 - SearchDomains: Comma separated list of DNS search domains
 - Timeservers: Comma separated list of timeservers
 - Domain: Domain name to be used
+- mDNS: Boolean value (true or false). True means that mDNS is enabled.
+  mDNS domains can be resolved and hostname is registered. False means
+  that all mDNS functionality for this service is disabled. Note that
+  not all DNS backends support mDNS: currently systemd-resolved is
+  the only DNS backend with mDNS.
 
 If IPv4 address is missing then DHCP is used. If IPv6 address is missing,
 then SLAAC or DHCPv6 is used.
@@ -63,8 +77,9 @@ then SLAAC or DHCPv6 is used.
 The following options are valid if Type is "wifi"
 - Name: A string representation of an 802.11 SSID. If the SSID field is
   present, the Name field is ignored.
-- SSID: A hexadecimal representation of an 802.11 SSID. If the SSID field is
-  omitted, the Name field is used instead.
+- SSID: A hexadecimal representation of an 802.11 SSID. Use this format to
+  encode special characters including starting or ending spaces. If the SSID
+  field is omitted, the Name field is used instead.
 - EAP: EAP type. We currently only support tls, ttls or peap.
 - CACertFile: File path to CA certificate file (PEM/DER).
 - ClientCertFile: File path to client certificate file (PEM/DER).
@@ -75,26 +90,39 @@ The following options are valid if Type is "wifi"
   passphrase. The PrivateKeyPassphrase field is ignored when this field is set
   to fsid.
 - Identity: Identity string for EAP.
+- AnonymousIdentity: Anonymous Identity string for EAP.
+- SubjectMatch: Substring to be matched against the subject of the
+  authentication server certificate for EAP.
+- AltSubjectMatch: Semicolon separated string of entries to be matched against
+  the alternative subject name of the authentication server certificate for EAP.
+- DomainSuffixMatch: Constraint for server domain name. If set, this FQDN is
+  used as a suffix match requirement for the authentication server certificate
+  for EAP.
+- DomainMatch: This FQDN is used as a full match requirement for the
+  authentication server certificate for EAP.
 - Phase2: Phase2 (inner authentication with TLS tunnel) authentication method.
   Prefix the value with "EAP-" to indicate the usage of an EAP-based inner
   authentication method (should only be used with EAP = TTLS).
 - Passphrase: RSN/WPA/WPA2 Passphrase
+- Security: The security type of the network. Possible values are 'psk'
+  (WPA/WPA2 PSK), 'ieee8021x' (WPA EAP), 'none' and 'wep'. When not set, the
+  default value is 'ieee8021x' if an EAP type is configured, 'psk' if a
+  passphrase is present and 'none' otherwise.
 - Hidden: If set to true, then this AP is hidden. If missing or set to false,
   then AP is not hidden.
 
 
-Example
-=======
+Examples
+========
 
 This is a configuration file for a network providing EAP-TLS, EAP-TTLS and
-EAP-PEAP services.
-The respective SSIDs are tls_ssid, ttls_ssid and peap_ssid and the file name
-is example.config.
+EAP-PEAP services. The respective SSIDs are tls_ssid, ttls_ssid and peap_ssid
+and the file name is example.config.
+
 Please note that the SSID entry is for hexadecimal encoded SSID (e.g. "SSID =
 746c735f73736964"). If your SSID does not contain any exotic character then
 you should use the Name entry instead (e.g. "Name = tls_ssid").
 
-
 example@example:[~]$ cat /var/lib/connman/example.config
 [global]
 Name = Example