agent-api.txt (8797B)
1 Agent Manager hierarchy 2 ======================= 3 4 Service net.connman.iwd 5 Interface net.connman.iwd.AgentManager 6 Object path /net/connman/iwd 7 8 Methods void RegisterAgent(object path) 9 10 Register new agent for handling user secrets requests. 11 The agent object's methods on the net.connman.iwd.Agent 12 interface will be called when IWD needs to request 13 credentials for a connection to a network in station 14 mode. 15 16 Possible Errors: [service].InvalidArguments 17 [service].Failed 18 [service].AlreadyExists 19 20 void UnregisterAgent(object path) 21 22 Unregister an existing agent. 23 24 Possible Errors: [service].InvalidArguments 25 [service].Failed 26 [service].NotFound 27 28 void RegisterNetworkConfigurationAgent(object path) 29 30 Register the agent for handling IPv4 and IPv6 31 configuration setting. This method and its 32 corresponding unregister method are only supported 33 if network configuration is enabled: see 34 EnableNetworkConfiguration in iwd.config(5) and 35 NetworkConfigurationEnabled in 36 net.connman.iwd.Daemon.GetInfo in daemon-api.txt. 37 38 During a station-mode, AP-mode or P2P connection, IWD 39 will obtain the IP configuration values for a network 40 interface, either automatically from a remote server 41 (DHCP or otherwise), generate it or read it from a 42 settings file. If no network configuration agent is 43 present, IWD immediately writes (commits) those 44 values to the corresponding interface, the routing 45 table and communicates them to the resolver. If such 46 agent is registered, IWD requests the agent to do 47 this last step. 48 49 Connection success is not signalled until the agent 50 method has returned. The agent may also be invoked 51 during the connection lifetime whenever the IP 52 configuration changes and after a roam. The agent 53 object must have the NetworkConfigurationAgent 54 interface. 55 56 Possible Errors: [service].InvalidArguments 57 [service].Failed 58 [service].AlreadyExists 59 [service].NotSupported 60 61 void UnregisterNetworkConfigurationAgent(object path) 62 63 Unregister an existing network configuration agent. 64 65 Possible Errors: [service].InvalidArguments 66 [service].Failed 67 [service].NotFound 68 [service].NotAvailable 69 70 71 Agent hierarchy 72 =============== 73 74 Service unique name 75 Interface net.connman.iwd.Agent 76 Object path freely definable 77 78 Methods void Release() [noreply] 79 80 This method gets called when the service daemon 81 unregisters the agent. An agent can use it to do 82 cleanup tasks. There is no need to unregister the 83 agent, because when this method gets called it has 84 already been unregistered. 85 86 string RequestPassphrase(object network) 87 88 This method gets called when trying to connect to 89 a network and passphrase is required. 90 91 Possible Errors: net.connman.iwd.Agent.Error.Canceled 92 93 string RequestPrivateKeyPassphrase(object network) 94 95 This method gets called when connecting to 96 a network that requires authentication using a 97 locally-stored encrypted private key file, to 98 obtain that private key's encryption passphrase. 99 100 Possible Errors: net.connman.iwd.Agent.Error.Canceled 101 102 (string, string) RequestUserNameAndPassword(object network) 103 104 This method gets called when connecting to 105 a network that requires authentication using a 106 user name and password. 107 108 Possible Errors: net.connman.iwd.Agent.Error.Canceled 109 110 string RequestUserPassword(object network, string user) 111 112 This method gets called when connecting to 113 a network that requires authentication with a 114 user password. The user name is optionally passed 115 in the parameter. 116 117 Possible Errors: net.connman.iwd.Agent.Error.Canceled 118 119 void Cancel(string reason) [noreply] 120 121 This method gets called to indicate that the agent 122 request failed before a reply was returned. The 123 argument will indicate why the request is being 124 cancelled and may be "out-of-range", "user-canceled", 125 "timed-out" or "shutdown". 126 127 Examples Requesting a passphrase for WPA2 network 128 129 RequestPassphrase("/net/connman/iwd/0/3/54657374_psk") 130 ==> "secret123" 131 132 133 NetworkConfigurationAgent hierarchy [experimental] 134 =================================== 135 136 Service unique name 137 Interface net.connman.iwd.NetworkConfigurationAgent 138 Object path freely definable 139 140 Methods void Release() [noreply] 141 142 This method gets called when the service daemon 143 unregisters the agent. An agent can use it to do 144 cleanup tasks. There is no need to unregister the 145 agent, because when this method gets called it has 146 already been unregistered. 147 148 void ConfigureIPv4(object device, dict config) 149 150 This method gets called during connection setup 151 and later while the connection is operational 152 whenever a new set of IPv4 configuration values is to 153 be written to a network interface. The connection is 154 aborted if the method call returns an error or times 155 out. 156 157 In case of a station-mode connection, the 'device' 158 parameter points at an object with a 159 net.connman.iwd.Device interface whose Name property 160 contains the name of network interface. In case of a 161 P2P connection, the object will have 162 a net.connman.iwd.p2p.Peer interface whose 163 ConnectectedInterface property contains the name of 164 the target network interface. 165 166 The 'config' dictionary (a{sv}) maps string keys to 167 values of types defined per key. Each call receives 168 the full set of values which supersede those from 169 previous calls. 170 171 The following key/value pairs are defined, but more 172 may be added in future versions. 173 174 string Method - Indicates whether the local address 175 was set statically (value "static") or obtained 176 automatically such as through DHCP (value "auto"). 177 Even when addresses were obtained from the remote 178 end some configuration bits, such as DNS addresses, 179 may have been overridden locally. 180 181 array(dict) Addresses - Local IP addresses. Each 182 address is described by a set of key/value properties 183 as documented further down. 184 185 array(dict) Routes - Routes for on-link and off-link 186 prefixes/subnets and default routers. Each route is 187 described by a set of key/value properties as 188 documented further down. 189 190 array(string) DomainNameServers [optional] - Holds 191 the list of DNS server addresses configured if any 192 exist. 193 194 array(string) DomainNames [optional] - Holds the 195 network's local domain names if any exist. 196 197 string MDNS [optional] - One of "true", "false" and 198 "resolve". Controls whether Multicast DNS support is 199 to be enabled on the link. When set to "resolve", 200 only resolution is enabled, but not host or service 201 registration and announcement (see systemd.network(5).) 202 203 The following properties are defined for local 204 addresses, but more may be added in the future: 205 206 string Address - Holds the IP address string. 207 208 byte PrefixLength [optional] - Prefix length 209 associated with the address's subnet (IPv4 only). 210 211 string Broadcast [optional] - Broadcast address 212 associated with the address's subnet (IPv4 only). 213 214 uint32 ValidLifetime [optional] - Remaining validity 215 and ownership time for this address assignment/lease, 216 in seconds at the time of the method call. 217 If absent the address doesn't expire. 218 219 uint32 PreferredLifetime [optional] - Number of 220 seconds left at the time of the method call for this 221 address to be preferred over other addresses. 222 223 The following properties are defined for routes, 224 but more may be added in the future: 225 226 string, byte Destination [optional] - Holds the 227 route's destination IP prefix string and the prefix 228 length in bits. Absent for default routes. 229 230 string Router [optional] - Holds the router's IP 231 address. Absent for on-link routes. 232 233 string PreferredSource [optional] - Route source IP 234 address. 235 236 uint32 Lifetime [optional] - Remaining route validity 237 time in seconds at the time of the method call. 238 If absent the route doesn't expire. 239 240 uint32 Priority - Relative route priority. 241 242 byte Preference [optional] - ICMPv6 route preference: 243 0 for medium, 1 for high and 3 for low. 244 245 uint32 MTU [optional] - Router MTU. 246 247 Possible Errors: net.connman.iwd.Agent.Error.Canceled 248 net.connman.iwd.Agent.Error.Failed 249 250 void ConfigureIPv6(object device, dict config) 251 252 Same as ConfigureIPv4 above but for IPv6. 253 254 void CancelIPv4(object device, string reason) [noreply] 255 256 This method gets called to indicate that the network 257 configuration was aborted before a reply was received 258 for an ongoing ConfigureIPv4 or ConfigureIPv6 call. 259 The last argument will indicate why the request is being 260 cancelled and may be one of: "aborted", "superseded", 261 "timed-out". 262 263 void CancelIPv6(object device, string reason) [noreply] 264 265 Same as CancelIPv4 above but for IPv6.