mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 22:20:08 +01:00
* src/vpn-manager/nm-vpn-connection.[ch]:
* src/vpn-manager/nm-vpn-manager.[ch]:
* src/vpn-manager/nm-vpn-service.[ch]: Rewrite the vpn handling
* code. Using
dbus-glib, GObjects, signals etc.
* libnm-glib/nm-vpn-manager.[ch]:
* libnm-glib/nm-vpn-connection.[ch]: Now that the NM
* implementation changed
so much, rewrite these too.
* libnm-glib/Makefile.am: Add new files to build, build new
* binding files for
the new introspection files.
* libnm-glib/nm-client.[ch]: Remove all VPN related stuff from
* here.
* libnm-glib/nm-dbus-utils.[ch]: Renamed from nm-utils.[ch] that
* was shadowing
the header with the same name from libnm-utils.
* libnm-glib/nm-vpn-plugin.[ch]: Implement.
* libnm-util/Makefile.am: Add nm-utils.[ch] to build.
* introspection/nm-vpn-plugin.xml: Implement.
* introspection/nm-vpn-connection.xml: Implement.
* introspection/nm-vpn-manager.xml: Implement.
* src/NetworkManagerSystem.c
* (nm_system_vpn_device_set_from_ip4_config): Remove
the named manager argument, it can just as easily get it as the
caller.
(nm_system_vpn_device_unset_from_ip4_config): Ditto.
* src/vpn-manager/nm-dbus-vpn.[ch]: Remove.
* src/nm-dbus-manager.h: Fix up the name_owner signal signature.
* src/dhcp-manager/nm-dhcp-manager.c (garray_to_string): Remove,
* use one from
libnm-utils.
* libnm-util/nm-connection.c: Ditto.
* src/NetworkManagerMain.h: Remove, it's finally empty.
* configure.in: Remove utils/ from build.
* include/NetworkManagerVPN.h: Add some more defines to reduce
* the amount
of hard-coded strings.
* utils/: Move it over to libnm-util.
* test/Makefile.am: Link against libnm-util now that util/ is
* gone.
* dispatcher-daemon/Makefile.am: Ditto.
* src/Makefile.am: Ditto.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2798 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
106 lines
3.8 KiB
C
106 lines
3.8 KiB
C
/* NetworkManager -- Network link manager
|
|
*
|
|
* Dan Williams <dcbw@redhat.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* (C) Copyright 2004 Red Hat, Inc.
|
|
*/
|
|
|
|
#ifndef NETWORK_MANAGER_VPN_H
|
|
#define NETWORK_MANAGER_VPN_H
|
|
|
|
/*
|
|
* dbus services details
|
|
*/
|
|
#define NM_DBUS_PATH_VPN "/org/freedesktop/NetworkManager/VPN/Manager"
|
|
#define NM_DBUS_INTERFACE_VPN "org.freedesktop.NetworkManager.VPN.Manager"
|
|
|
|
#define NM_DBUS_PATH_VPN_CONNECTION "/org/freedesktop/NetworkManager/VPN/Connection"
|
|
#define NM_DBUS_INTERFACE_VPN_CONNECTION "org.freedesktop.NetworkManager.VPN.Connection"
|
|
|
|
#define NM_VPN_DBUS_PLUGIN_PATH "/org/freedesktop/NetworkManager/VPN/Plugin"
|
|
#define NM_VPN_DBUS_PLUGIN_INTERFACE "org.freedesktop.NetworkManager.VPN.Plugin"
|
|
|
|
/*
|
|
* VPN Errors
|
|
*/
|
|
#define NM_DBUS_NO_ACTIVE_VPN_CONNECTION "org.freedesktop.NetworkManager.VPNConnections.NoActiveVPNConnection"
|
|
#define NM_DBUS_NO_VPN_CONNECTIONS "org.freedesktop.NetworkManager.VPNConnections.NoVPNConnections"
|
|
#define NM_DBUS_INVALID_VPN_CONNECTION "org.freedesktop.NetworkManager.VPNConnections.InvalidVPNConnection"
|
|
|
|
#define NM_DBUS_VPN_STARTING_IN_PROGRESS "StartingInProgress"
|
|
#define NM_DBUS_VPN_ALREADY_STARTED "AlreadyStarted"
|
|
#define NM_DBUS_VPN_STOPPING_IN_PROGRESS "StoppingInProgress"
|
|
#define NM_DBUS_VPN_ALREADY_STOPPED "AlreadyStopped"
|
|
#define NM_DBUS_VPN_WRONG_STATE "WrongState"
|
|
#define NM_DBUS_VPN_BAD_ARGUMENTS "BadArguments"
|
|
|
|
|
|
/*
|
|
* VPN daemon signals
|
|
*/
|
|
#define NM_DBUS_VPN_SIGNAL_LOGIN_BANNER "LoginBanner"
|
|
#define NM_DBUS_VPN_SIGNAL_LOGIN_FAILED "LoginFailed"
|
|
#define NM_DBUS_VPN_SIGNAL_LAUNCH_FAILED "LaunchFailed"
|
|
#define NM_DBUS_VPN_SIGNAL_CONNECT_FAILED "ConnectFailed"
|
|
#define NM_DBUS_VPN_SIGNAL_VPN_CONFIG_BAD "VPNConfigBad"
|
|
#define NM_DBUS_VPN_SIGNAL_IP_CONFIG_BAD "IPConfigBad"
|
|
#define NM_DBUS_VPN_SIGNAL_STATE_CHANGE "StateChange"
|
|
#define NM_DBUS_VPN_SIGNAL_IP4_CONFIG "IP4Config"
|
|
|
|
/*
|
|
* VPN daemon states
|
|
*/
|
|
typedef enum NMVPNServiceState
|
|
{
|
|
NM_VPN_SERVICE_STATE_UNKNOWN = 0,
|
|
NM_VPN_SERVICE_STATE_INIT,
|
|
NM_VPN_SERVICE_STATE_SHUTDOWN,
|
|
NM_VPN_SERVICE_STATE_STARTING,
|
|
NM_VPN_SERVICE_STATE_STARTED,
|
|
NM_VPN_SERVICE_STATE_STOPPING,
|
|
NM_VPN_SERVICE_STATE_STOPPED
|
|
} NMVPNServiceState;
|
|
|
|
|
|
/*
|
|
* VPN connection states
|
|
*/
|
|
typedef enum NMVPNConnectionState
|
|
{
|
|
NM_VPN_CONNECTION_STATE_UNKNOWN = 0,
|
|
NM_VPN_CONNECTION_STATE_PREPARE,
|
|
NM_VPN_CONNECTION_STATE_CONNECT,
|
|
NM_VPN_CONNECTION_STATE_IP_CONFIG_GET,
|
|
NM_VPN_CONNECTION_STATE_ACTIVATED,
|
|
NM_VPN_CONNECTION_STATE_FAILED,
|
|
NM_VPN_CONNECTION_STATE_DISCONNECTED,
|
|
} NMVPNConnectionState;
|
|
|
|
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_GATEWAY "gateway"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS "address"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_PTP "ptp"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_NETMASK "netmask"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_DNS "dns"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_NBNS "nbns"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_MSS "mss"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_MTU "mtu"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV "tundev"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN "domain"
|
|
#define NM_VPN_PLUGIN_IP4_CONFIG_BANNER "banner"
|
|
|
|
#endif /* NETWORK_MANAGER_VPN_H */
|