| OLD | NEW |
| 1 /* | 1 /* |
| 2 * | 2 * |
| 3 * Connection Manager | 3 * Connection Manager |
| 4 * | 4 * |
| 5 * Copyright (C) 2010 BMW Car IT GmbH. All rights reserved. | 5 * Copyright (C) 2010 BMW Car IT GmbH. All rights reserved. |
| 6 * | 6 * |
| 7 * This program is free software; you can redistribute it and/or modify | 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 | 8 * it under the terms of the GNU General Public License version 2 as |
| 9 * published by the Free Software Foundation. | 9 * published by the Free Software Foundation. |
| 10 * | 10 * |
| 11 * This program is distributed in the hope that it will be useful, | 11 * This program is distributed in the hope that it will be useful, |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 * GNU General Public License for more details. | 14 * GNU General Public License for more details. |
| 15 * | 15 * |
| 16 * You should have received a copy of the GNU General Public License | 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 | 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 | 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 * | 19 * |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #define VPN_FLAG_NO_TUN 1 |
| 23 |
| 22 enum vpn_state { | 24 enum vpn_state { |
| 23 VPN_STATE_UNKNOWN = 0, | 25 VPN_STATE_UNKNOWN = 0, |
| 24 VPN_STATE_IDLE = 1, | 26 VPN_STATE_IDLE = 1, |
| 25 VPN_STATE_CONNECT = 2, | 27 VPN_STATE_CONNECT = 2, |
| 26 VPN_STATE_READY = 3, | 28 VPN_STATE_READY = 3, |
| 27 VPN_STATE_DISCONNECT = 4, | 29 VPN_STATE_DISCONNECT = 4, |
| 28 VPN_STATE_FAILURE = 5, | 30 VPN_STATE_FAILURE = 5, |
| 29 }; | 31 }; |
| 30 | 32 |
| 31 struct vpn_driver { | 33 struct vpn_driver { |
| 34 int flags; |
| 32 int (*notify) (DBusMessage *msg, struct connman_provider *provider); | 35 int (*notify) (DBusMessage *msg, struct connman_provider *provider); |
| 33 int (*connect) (struct connman_provider *provider, | 36 int (*connect) (struct connman_provider *provider, |
| 34 struct connman_task *task, const char *if_name); | 37 struct connman_task *task, const char *if_name); |
| 35 void (*disconnect) (void); | 38 void (*disconnect) (void); |
| 36 }; | 39 }; |
| 37 | 40 |
| 38 int vpn_register(const char *name, struct vpn_driver *driver, | 41 int vpn_register(const char *name, struct vpn_driver *driver, |
| 39 const char *program); | 42 const char *program); |
| 40 void vpn_unregister(const char *provider_name); | 43 void vpn_unregister(const char *provider_name); |
| 41 void vpn_died(); | 44 void vpn_died(); |
| 45 int vpn_set_ifname(struct connman_provider *provider, const char *ifname); |
| OLD | NEW |