5 * Copyright (C) 2012 Intel Corporation. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #define VPN_API_SUBJECT_TO_CHANGE
26 #include <connman/dbus.h>
27 #include <connman/types.h>
29 int __vpn_manager_init(void);
30 void __vpn_manager_cleanup(void);
34 unsigned char __vpn_ipconfig_netmask_prefix_len(const char *netmask);
35 unsigned short __vpn_ipconfig_get_type_from_index(int index);
36 unsigned int __vpn_ipconfig_get_flags_from_index(int index);
37 void __vpn_ipconfig_foreach(void (*function) (int index,
38 void *user_data), void *user_data);
39 void __vpn_ipconfig_set_local(struct vpn_ipconfig *ipconfig,
41 const char *__vpn_ipconfig_get_local(struct vpn_ipconfig *ipconfig);
42 void __vpn_ipconfig_set_peer(struct vpn_ipconfig *ipconfig,
44 const char *__vpn_ipconfig_get_peer(struct vpn_ipconfig *ipconfig);
45 void __vpn_ipconfig_set_broadcast(struct vpn_ipconfig *ipconfig,
46 const char *broadcast);
47 void __vpn_ipconfig_set_gateway(struct vpn_ipconfig *ipconfig,
49 const char *__vpn_ipconfig_get_gateway(struct vpn_ipconfig *ipconfig);
50 void __vpn_ipconfig_set_prefixlen(struct vpn_ipconfig *ipconfig,
51 unsigned char prefixlen);
52 unsigned char __vpn_ipconfig_get_prefixlen(struct vpn_ipconfig *ipconfig);
53 int __vpn_ipconfig_address_add(struct vpn_ipconfig *ipconfig, int family);
54 int __vpn_ipconfig_gateway_add(struct vpn_ipconfig *ipconfig, int family);
55 struct vpn_ipconfig *__vpn_ipconfig_create(int index, int family);
56 void __vpn_ipconfig_set_index(struct vpn_ipconfig *ipconfig,
58 struct rtnl_link_stats;
60 void __vpn_ipconfig_newlink(int index, unsigned short type,
61 unsigned int flags, const char *address,
63 struct rtnl_link_stats *stats);
64 void __vpn_ipconfig_dellink(int index, struct rtnl_link_stats *stats);
65 int __vpn_ipconfig_init(void);
66 void __vpn_ipconfig_cleanup(void);
68 #include "vpn-provider.h"
70 connman_bool_t __vpn_provider_check_routes(struct vpn_provider *provider);
71 int __vpn_provider_append_user_route(struct vpn_provider *provider,
72 int family, const char *network, const char *netmask);
73 void __vpn_provider_append_properties(struct vpn_provider *provider, DBusMessageIter *iter);
74 void __vpn_provider_list(DBusMessageIter *iter, void *user_data);
75 int __vpn_provider_create_and_connect(DBusMessage *msg);
76 DBusMessage *__vpn_provider_get_connections(DBusMessage *msg);
77 const char * __vpn_provider_get_ident(struct vpn_provider *provider);
78 int __vpn_provider_indicate_state(struct vpn_provider *provider,
79 enum vpn_provider_state state);
80 int __vpn_provider_indicate_error(struct vpn_provider *provider,
81 enum vpn_provider_error error);
82 int __vpn_provider_connect(struct vpn_provider *provider);
83 int __vpn_provider_connect_path(const char *path);
84 int __vpn_provider_disconnect(struct vpn_provider *provider);
85 int __vpn_provider_remove(const char *path);
86 void __vpn_provider_cleanup(void);
87 int __vpn_provider_init(void);
91 int __vpn_rtnl_init(void);
92 void __vpn_rtnl_start(void);
93 void __vpn_rtnl_cleanup(void);
95 unsigned int __vpn_rtnl_update_interval_add(unsigned int interval);
96 unsigned int __vpn_rtnl_update_interval_remove(unsigned int interval);
97 int __vpn_rtnl_request_update(void);
98 int __vpn_rtnl_send(const void *buf, size_t len);