Imported Upstream version 1.37
[platform/upstream/connman.git] / doc / vpn-connection-api.txt
1 vpn connection
2 ==============
3
4 Service         net.connman.vpn
5 Interface       net.connman.vpn.Connection
6 Object path     [variable prefix]/{connection0,connection1,...}
7
8 Methods         dict GetProperties()  [experimental]
9
10                         Returns properties for the connection object. See
11                         the properties section for available properties.
12
13                         Possible Errors: [connection].Error.InvalidArguments
14
15                 void SetProperty(string name, variant value) [experimental]
16
17                         Changes the value of the specified property. Only
18                         properties that are listed as read-write are
19                         changeable. On success a PropertyChanged signal
20                         will be emitted.
21
22                         Possible Errors: [connection].Error.InvalidArguments
23                                          [connection].Error.InvalidProperty
24
25                 void ClearProperty(string name) [experimental]
26
27                         Clears the value of the specified property.
28
29                         Possible Errors: [connection].Error.InvalidArguments
30                                          [connection].Error.InvalidProperty
31
32                 void Connect() [experimental]
33
34                         Connect this VPN connection. It will attempt to connect
35                         to the VPN connection. The Connect() will wait until
36                         the connection is created or there is an error. The
37                         error description is returned in dbus error.
38
39                         Possible Errors: [connection].Error.InvalidArguments
40                                         [connection].Error.InProgress
41
42                 void Connect2(string dbus_sender) [experimental]
43
44                         Connect this VPN connection. The Connect2() is a
45                         wrapper for Connect() allowing to pass original D-Bus
46                         sender when proxying the connection request. The
47                         Connect2() will wait until the connection is created or
48                         there is an error. The error description is returned in
49                         dbus error.
50
51                         Possible Errors: [connection].Error.InvalidArguments
52                                         [connection].Error.InProgress
53
54
55                 void Disconnect() [experimental]
56
57                         Disconnect this VPN connection. If the connection is
58                         not connected an error message will be generated.
59
60                         Possible Errors: [connection].Error.InvalidArguments
61
62 Signals         PropertyChanged(string name, variant value) [experimental]
63
64                         This signal indicates a changed value of the given
65                         property.
66
67 Properties      string State [readonly]
68
69                         The connection state information.
70
71                         Valid states are "idle", "failure", "configuration",
72                         "ready", "disconnect".
73
74                 string Type [readonly]
75
76                         The VPN type (for example "openvpn", "vpnc" etc.)
77
78                 string Name [readonly]
79
80                         The VPN name.
81
82                 string Domain [readonly]
83
84                         The domain name used behind the VPN connection.
85                         This is optional for most VPN technologies.
86
87                 string Host [readonly]
88
89                        The VPN host (server) address.
90
91                 boolean Immutable [readonly]
92
93                         This value will be set to true if the connection is
94                         configured externally via a configuration file.
95
96                         The only valid operation are Connect(), Disconnect()
97                         and GetProperties()
98
99                 int Index [readonly]
100
101                         The index of the VPN network tunneling interface.
102                         If there is no tunneling device, then this value
103                         is not returned.
104
105                 dict IPv4 [readonly]
106
107                         string Address
108
109                                 The current configured IPv4 address.
110
111                         string Netmask
112
113                                The current configured IPv4 netmask.
114
115                         string Gateway
116
117                                The current configured IPv4 gateway.
118
119                         string Peer
120
121                                The current configured VPN tunnel endpoint
122                                IPv4 address.
123
124                 dict IPv6 [readonly]
125
126                         string Address
127
128                                 The current configured IPv6 address.
129
130                         string PrefixLength
131
132                                The prefix length of the IPv6 address.
133
134                         string Gateway
135
136                                The current configured IPv6 gateway.
137
138                         string Peer
139
140                                The current configured VPN tunnel endpoint
141                                IPv6 address.
142
143                 array{string} Nameservers [readonly]
144
145                         The list of nameservers set by VPN.
146
147                 array{dict} UserRoutes [readwrite]
148
149                         int ProtocolFamily
150
151                                 Protocol family of the route. Set to 4
152                                 if IPv4 and 6 if IPv6 route.
153
154                         string Network
155
156                                 The network part of the route.
157
158                         string Netmask
159
160                                 The netmask of the route. For IPv6 routes,
161                                 this is the prefix length.
162
163                         string Gateway
164
165                                 Gateway address of the route.
166
167                         The list of currently active user activated
168                         routes.
169
170                 array{dict} ServerRoutes [readonly]
171
172                         int ProtocolFamily
173
174                                 Protocol family of the route. Set to 4
175                                 if IPv4 and 6 if IPv6 route.
176
177                         string Network
178
179                                 The network part of the route.
180
181                         string Netmask
182
183                                 The netmask of the route. For IPv6 routes,
184                                 this is the prefix length.
185
186                         string Gateway
187
188                                 Gateway address of the route.
189
190                         The VPN server activated route. These routes
191                         are pushed to connman by VPN server.
192
193                 There can be other properties also but as the VPN
194                 technologies are so different, they have different
195                 kind of options that they need, so not all options
196                 are mentioned in this document.