~ubuntu-branches/ubuntu/utopic/network-manager-openvpn/utopic

« back to all changes in this revision

Viewing changes to src/nm-openvpn-service.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-02-25 10:43:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090225104309-v4b2scsl68protyn
Tags: 0.7.0.97-1
* New upstream release.
* debian/patches/01_dbus_policy.patch
  - Removed, merged upstream.
* debian/control
  - Drop libgnomeui-dev from Build-Depends, no longer required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
1
2
/* nm-openvpn-service - openvpn integration with NetworkManager
2
3
 *
3
 
 * Tim Niemueller <tim@niemueller.de>
4
 
 * Based on work by Dan Williams <dcbw@redhat.com>
 
4
 * Copyright (C) 2005 - 2008 Tim Niemueller <tim@niemueller.de>
 
5
 * Copyright (C) 2005 - 2008 Dan Williams <dcbw@redhat.com>
5
6
 *
6
7
 * This program is free software; you can redistribute it and/or modify
7
8
 * it under the terms of the GNU General Public License as published by
13
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
15
 * GNU General Public License for more details.
15
16
 *
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
17
 * You should have received a copy of the GNU General Public License along
 
18
 * with this program; if not, write to the Free Software Foundation, Inc.,
 
19
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
20
 *
20
21
 */
21
22
 
22
23
#ifndef NM_OPENVPN_SERVICE_H
23
24
#define NM_OPENVPN_SERVICE_H
24
25
 
25
 
#define NM_DBUS_SERVICE_OPENVPN "org.freedesktop.NetworkManager.openvpn"
26
 
#define NM_DBUS_INTERFACE_OPENVPN       "org.freedesktop.NetworkManager.openvpn"
27
 
#define NM_DBUS_PATH_OPENVPN    "/org/freedesktop/NetworkManager/openvpn"
28
 
 
29
 
/* Do not change numbers, only add if needed!
30
 
   See properties/nm-openvpn.c:connection_type_changed() for details
 
26
#include <glib.h>
 
27
#include <glib-object.h>
 
28
#include <nm-vpn-plugin.h>
 
29
 
 
30
#define NM_TYPE_OPENVPN_PLUGIN            (nm_openvpn_plugin_get_type ())
 
31
#define NM_OPENVPN_PLUGIN(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_OPENVPN_PLUGIN, NMOpenvpnPlugin))
 
32
#define NM_OPENVPN_PLUGIN_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_OPENVPN_PLUGIN, NMOpenvpnPluginClass))
 
33
#define NM_IS_OPENVPN_PLUGIN(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_OPENVPN_PLUGIN))
 
34
#define NM_IS_OPENVPN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_OPENVPN_PLUGIN))
 
35
#define NM_OPENVPN_PLUGIN_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_OPENVPN_PLUGIN, NMOpenvpnPluginClass))
 
36
 
 
37
#define NM_DBUS_SERVICE_OPENVPN    "org.freedesktop.NetworkManager.openvpn"
 
38
#define NM_DBUS_INTERFACE_OPENVPN  "org.freedesktop.NetworkManager.openvpn"
 
39
#define NM_DBUS_PATH_OPENVPN       "/org/freedesktop/NetworkManager/openvpn"
 
40
 
 
41
#define NM_OPENVPN_KEY_AUTH "auth"
 
42
#define NM_OPENVPN_KEY_CA "ca"
 
43
#define NM_OPENVPN_KEY_CERT "cert"
 
44
#define NM_OPENVPN_KEY_CIPHER "cipher"
 
45
#define NM_OPENVPN_KEY_COMP_LZO "comp-lzo"
 
46
#define NM_OPENVPN_KEY_CONNECTION_TYPE "connection-type"
 
47
#define NM_OPENVPN_KEY_TAP_DEV "tap-dev"
 
48
#define NM_OPENVPN_KEY_KEY "key"
 
49
#define NM_OPENVPN_KEY_LOCAL_IP "local-ip"
 
50
#define NM_OPENVPN_KEY_PROTO_TCP "proto-tcp"
 
51
#define NM_OPENVPN_KEY_PORT "port"
 
52
#define NM_OPENVPN_KEY_REMOTE "remote"
 
53
#define NM_OPENVPN_KEY_REMOTE_IP "remote-ip"
 
54
#define NM_OPENVPN_KEY_STATIC_KEY "static-key"
 
55
#define NM_OPENVPN_KEY_STATIC_KEY_DIRECTION "static-key-direction"
 
56
#define NM_OPENVPN_KEY_TA "ta"
 
57
#define NM_OPENVPN_KEY_TA_DIR "ta-dir"
 
58
#define NM_OPENVPN_KEY_USERNAME "username"
 
59
 
 
60
#define NM_OPENVPN_KEY_PASSWORD "password"
 
61
#define NM_OPENVPN_KEY_CERTPASS "cert-pass"
 
62
/* Internal auth-dialog -> service token indicating that no secrets are
 
63
 * required for the connection.
31
64
 */
32
 
#define NM_OPENVPN_CONTYPE_INVALID -1
33
 
#define NM_OPENVPN_CONTYPE_X509 0
34
 
#define NM_OPENVPN_CONTYPE_SHAREDKEY 1
35
 
#define NM_OPENVPN_CONTYPE_PASSWORD 2
36
 
#define NM_OPENVPN_CONTYPE_X509USERPASS 3
37
 
 
38
 
 
39
 
#endif
 
65
#define NM_OPENVPN_KEY_NOSECRET "no-secret"
 
66
 
 
67
#define NM_OPENVPN_AUTH_NONE "none"
 
68
#define NM_OPENVPN_AUTH_MD5  "MD5"
 
69
#define NM_OPENVPN_AUTH_SHA1 "SHA1"
 
70
 
 
71
#define NM_OPENVPN_CONTYPE_TLS          "tls"
 
72
#define NM_OPENVPN_CONTYPE_STATIC_KEY   "static-key"
 
73
#define NM_OPENVPN_CONTYPE_PASSWORD     "password"
 
74
#define NM_OPENVPN_CONTYPE_PASSWORD_TLS "password-tls"
 
75
 
 
76
typedef struct {
 
77
        NMVPNPlugin parent;
 
78
} NMOpenvpnPlugin;
 
79
 
 
80
typedef struct {
 
81
        NMVPNPluginClass parent;
 
82
} NMOpenvpnPluginClass;
 
83
 
 
84
GType nm_openvpn_plugin_get_type (void);
 
85
 
 
86
NMOpenvpnPlugin *nm_openvpn_plugin_new (void);
 
87
 
 
88
#endif /* NM_OPENVPN_SERVICE_H */