4367699fb49ddc223f1e1b87266ef433dd1110b6
[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 Disconnect() [experimental]
43
44                         Disconnect this VPN connection. If the connection is
45                         not connected an error message will be generated.
46
47                         Possible Errors: [connection].Error.InvalidArguments
48
49 Signals         PropertyChanged(string name, variant value) [experimental]
50
51                         This signal indicates a changed value of the given
52                         property.
53
54 Properties      string State [readonly]
55
56                         The connection state information.
57
58                         Valid states are "idle", "failure", "configuration",
59                         "ready", "disconnect".
60
61                 string Type [readonly]
62
63                         The VPN type (for example "openvpn", "vpnc" etc.)
64
65                 string Name [readonly]
66
67                         The VPN name.
68
69                 string Domain [readonly]
70
71                         The domain name used behind the VPN connection.
72                         This is optional for most VPN technologies.
73
74                 string Host [readonly]
75
76                        The VPN host (server) address.
77
78                 boolean Immutable [readonly]
79
80                         This value will be set to true if the connection is
81                         configured externally via a configuration file.
82
83                         The only valid operation are Connect(), Disconnect()
84                         and GetProperties()
85
86                 int Index [readonly]
87
88                         The index of the VPN network tunneling interface.
89                         If there is no tunneling device, then this value
90                         is not returned.
91
92                 dict IPv4 [readonly]
93
94                         string Address
95
96                                 The current configured IPv4 address.
97
98                         string Netmask
99
100                                The current configured IPv4 netmask.
101
102                         string Gateway
103
104                                The current configured IPv4 gateway.
105
106                         string Peer
107
108                                The current configured VPN tunnel endpoint
109                                IPv4 address.
110
111                 dict IPv6 [readonly]
112
113                         string Address
114
115                                 The current configured IPv6 address.
116
117                         string PrefixLength
118
119                                The prefix length of the IPv6 address.
120
121                         string Gateway
122
123                                The current configured IPv6 gateway.
124
125                         string Peer
126
127                                The current configured VPN tunnel endpoint
128                                IPv6 address.
129
130                 array{string} Nameservers [readonly]
131
132                         The list of nameservers set by VPN.
133
134                 array{dict} UserRoutes [readwrite]
135
136                         int ProtocolFamily
137
138                                 Protocol family of the route. Set to 4
139                                 if IPv4 and 6 if IPv6 route.
140
141                         string Network
142
143                                 The network part of the route.
144
145                         string Netmask
146
147                                 The netmask of the route.
148
149                         string Gateway
150
151                                 Gateway address of the route.
152
153                         The list of currently active user activated
154                         routes.
155
156                 array{dict} ServerRoutes [readonly]
157
158                         int ProtocolFamily
159
160                                 Protocol family of the route. Set to 4
161                                 if IPv4 and 6 if IPv6 route.
162
163                         string Network
164
165                                 The network part of the route.
166
167                         string Netmask
168
169                                 The netmask of the route.
170
171                         string Gateway
172
173                                 Gateway address of the route.
174
175                         The VPN server activated route. These routes
176                         are pushed to connman by VPN server.
177
178                 There can be other properties also but as the VPN
179                 technologies are so different, they have different
180                 kind of options that they need, so not all options
181                 are mentioned in this document.