summaryrefslogtreecommitdiff
path: root/plugins/vpn.h
diff options
context:
space:
mode:
authorMohamed Abbas <mabbas@linux.intel.com>2011-11-15 13:06:13 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-11-15 13:41:44 +0100
commit43365bffe9cd2f4b0364c3df808a49ffcfc31090 (patch)
treeda3ae3a680ec75c6985dd678a0b8cfe8a17deffb /plugins/vpn.h
parent43a29da43f9d9f518c939d0251bc0f266dff7887 (diff)
downloadconnman-43365bffe9cd2f4b0364c3df808a49ffcfc31090.tar.gz
connman-43365bffe9cd2f4b0364c3df808a49ffcfc31090.tar.bz2
connman-43365bffe9cd2f4b0364c3df808a49ffcfc31090.zip
vpn: Add support to allow ppp tunnelling
pptp and l2tp does not use tun/tab approach so change the vpn.c to allow vpn daemon to create the interface. Now vpn plugin tell vpn to create the device or leave to vpn client. On connection vpn will get the interface name set the index for the provider. This patch is prepared by Jukka Rissanen and it contains Mohamed Abbas original patch + fixes suggested by Daniel Wagner. Jukka fixed memory leak in vpn_set_ifname().
Diffstat (limited to 'plugins/vpn.h')
-rw-r--r--plugins/vpn.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/vpn.h b/plugins/vpn.h
index 9542ebf1..1ecfba22 100644
--- a/plugins/vpn.h
+++ b/plugins/vpn.h
@@ -19,6 +19,8 @@
*
*/
+#define VPN_FLAG_NO_TUN 1
+
enum vpn_state {
VPN_STATE_UNKNOWN = 0,
VPN_STATE_IDLE = 1,
@@ -30,6 +32,7 @@ enum vpn_state {
};
struct vpn_driver {
+ int flags;
int (*notify) (DBusMessage *msg, struct connman_provider *provider);
int (*connect) (struct connman_provider *provider,
struct connman_task *task, const char *if_name);
@@ -42,3 +45,4 @@ int vpn_register(const char *name, struct vpn_driver *driver,
const char *program);
void vpn_unregister(const char *provider_name);
void vpn_died(struct connman_task *task, int exit_code, void *user_data);
+int vpn_set_ifname(struct connman_provider *provider, const char *ifname);