summaryrefslogtreecommitdiff
path: root/libnm-core/nm-vpn-dbus-interface.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-02-12 15:01:09 +0100
committerThomas Haller <thaller@redhat.com>2021-02-18 19:46:51 +0100
commitfdf9614ba793a023d9b6c0f6a078beded8143771 (patch)
tree1c21d90c0873da541302bc0e209428b667029054 /libnm-core/nm-vpn-dbus-interface.h
parent2c1f8e9108a33eb3819b1bda1138a01bfd71746a (diff)
downloadNetworkManager-fdf9614ba793a023d9b6c0f6a078beded8143771.tar.gz
build: move "libnm-core/" to "src/" and split it
"libnm-core/" is rather complicated. It provides a static library that is linked into libnm.so and NetworkManager. It also contains public headers (like "nm-setting.h") which are part of public libnm API. Then we have helper libraries ("libnm-core/nm-libnm-core-*/") which only rely on public API of libnm-core, but are themself static libraries that can be used by anybody who uses libnm-core. And "libnm-core/nm-libnm-core-intern" is used by libnm-core itself. Move "libnm-core/" to "src/". But also split it in different directories so that they have a clearer purpose. The goal is to have a flat directory hierarchy. The "src/libnm-core*/" directories correspond to the different modules (static libraries and set of headers that we have). We have different kinds of such modules because of how we combine various code together. The directory layout now reflects this.
Diffstat (limited to 'libnm-core/nm-vpn-dbus-interface.h')
-rw-r--r--libnm-core/nm-vpn-dbus-interface.h302
1 files changed, 0 insertions, 302 deletions
diff --git a/libnm-core/nm-vpn-dbus-interface.h b/libnm-core/nm-vpn-dbus-interface.h
deleted file mode 100644
index c0e23f6fc1..0000000000
--- a/libnm-core/nm-vpn-dbus-interface.h
+++ /dev/null
@@ -1,302 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-/*
- * Copyright (C) 2004 Red Hat, Inc.
- */
-
-/* D-Bus-related definitions for NetworkManager VPN plugins.
- *
- * Note that although this header is installed as part of libnm, it is also
- * used by some external code that does not link to libnm.
- */
-
-#ifndef __NM_VPN_DBUS_INTERFACE_H__
-#define __NM_VPN_DBUS_INTERFACE_H__
-
-#include "nm-dbus-interface.h"
-
-#ifndef NM_VERSION_H
- #define NM_DEPRECATED_IN_1_8_FOR(n)
-#endif
-
-/*
- * 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_ERROR_PREFIX "org.freedesktop.NetworkManager.VPN.Error"
-#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"
-#define NM_DBUS_VPN_INTERACTIVE_NOT_SUPPORTED "InteractiveNotSupported"
-
-/*
- * 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"
-
-/**
- * NMVpnServiceState:
- * @NM_VPN_SERVICE_STATE_UNKNOWN: The state of the VPN plugin is unknown.
- * @NM_VPN_SERVICE_STATE_INIT: The VPN plugin is initialized.
- * @NM_VPN_SERVICE_STATE_SHUTDOWN: Not used.
- * @NM_VPN_SERVICE_STATE_STARTING: The plugin is attempting to connect to a VPN server.
- * @NM_VPN_SERVICE_STATE_STARTED: The plugin has connected to a VPN server.
- * @NM_VPN_SERVICE_STATE_STOPPING: The plugin is disconnecting from the VPN server.
- * @NM_VPN_SERVICE_STATE_STOPPED: The plugin has disconnected from the VPN server.
- *
- * VPN daemon states
- */
-typedef enum {
- 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;
-
-/**
- * NMVpnConnectionState:
- * @NM_VPN_CONNECTION_STATE_UNKNOWN: The state of the VPN connection is
- * unknown.
- * @NM_VPN_CONNECTION_STATE_PREPARE: The VPN connection is preparing to
- * connect.
- * @NM_VPN_CONNECTION_STATE_NEED_AUTH: The VPN connection needs authorization
- * credentials.
- * @NM_VPN_CONNECTION_STATE_CONNECT: The VPN connection is being established.
- * @NM_VPN_CONNECTION_STATE_IP_CONFIG_GET: The VPN connection is getting an IP
- * address.
- * @NM_VPN_CONNECTION_STATE_ACTIVATED: The VPN connection is active.
- * @NM_VPN_CONNECTION_STATE_FAILED: The VPN connection failed.
- * @NM_VPN_CONNECTION_STATE_DISCONNECTED: The VPN connection is disconnected.
- *
- * VPN connection states
- */
-typedef enum {
- NM_VPN_CONNECTION_STATE_UNKNOWN = 0,
- NM_VPN_CONNECTION_STATE_PREPARE,
- NM_VPN_CONNECTION_STATE_NEED_AUTH,
- 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;
-
-/**
- * NMVpnConnectionStateReason:
- * @NM_VPN_CONNECTION_STATE_REASON_UNKNOWN: The reason for the VPN connection
- * state change is unknown.
- * @NM_VPN_CONNECTION_STATE_REASON_NONE: No reason was given for the VPN
- * connection state change.
- * @NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED: The VPN connection changed
- * state because the user disconnected it.
- * @NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED: The VPN connection
- * changed state because the device it was using was disconnected.
- * @NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED: The service providing the
- * VPN connection was stopped.
- * @NM_VPN_CONNECTION_STATE_REASON_IP_CONFIG_INVALID: The IP config of the VPN
- * connection was invalid.
- * @NM_VPN_CONNECTION_STATE_REASON_CONNECT_TIMEOUT: The connection attempt to
- * the VPN service timed out.
- * @NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT: A timeout occurred
- * while starting the service providing the VPN connection.
- * @NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_FAILED: Starting the service
- * starting the service providing the VPN connection failed.
- * @NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS: Necessary secrets for the VPN
- * connection were not provided.
- * @NM_VPN_CONNECTION_STATE_REASON_LOGIN_FAILED: Authentication to the VPN
- * server failed.
- * @NM_VPN_CONNECTION_STATE_REASON_CONNECTION_REMOVED: The connection was
- * deleted from settings.
- *
- * VPN connection state reasons
- */
-NM_DEPRECATED_IN_1_8_FOR(NMActiveConnectionStateReason)
-typedef enum {
- NM_VPN_CONNECTION_STATE_REASON_UNKNOWN = 0,
- NM_VPN_CONNECTION_STATE_REASON_NONE = 1,
- NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED = 2,
- NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED = 3,
- NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED = 4,
- NM_VPN_CONNECTION_STATE_REASON_IP_CONFIG_INVALID = 5,
- NM_VPN_CONNECTION_STATE_REASON_CONNECT_TIMEOUT = 6,
- NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT = 7,
- NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_FAILED = 8,
- NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS = 9,
- NM_VPN_CONNECTION_STATE_REASON_LOGIN_FAILED = 10,
- NM_VPN_CONNECTION_STATE_REASON_CONNECTION_REMOVED = 11,
-} NMVpnConnectionStateReason;
-
-/**
- * NMVpnPluginFailure:
- * @NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED: Login failed.
- * @NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED: Connect failed.
- * @NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG: Invalid IP configuration returned from
- * the VPN plugin.
- *
- * VPN plugin failure reasons
- */
-typedef enum {
- NM_VPN_PLUGIN_FAILURE_LOGIN_FAILED,
- NM_VPN_PLUGIN_FAILURE_CONNECT_FAILED,
- NM_VPN_PLUGIN_FAILURE_BAD_IP_CONFIG
-} NMVpnPluginFailure;
-
-#ifndef NM_VERSION_H
- #undef NM_DEPRECATED_IN_1_8_FOR
-#endif
-
-/*** Generic config ***/
-
-/* string: VPN interface name (tun0, tap0, etc) */
-#define NM_VPN_PLUGIN_CONFIG_TUNDEV "tundev"
-
-/* string: Proxy PAC */
-#define NM_VPN_PLUGIN_CONFIG_PROXY_PAC "pac"
-
-/* string: Login message */
-#define NM_VPN_PLUGIN_CONFIG_BANNER "banner"
-
-/* uint32 / array of uint8: IP address of the public external VPN gateway (network byte order) */
-#define NM_VPN_PLUGIN_CONFIG_EXT_GATEWAY "gateway"
-
-/* uint32: Maximum Transfer Unit that the VPN interface should use */
-#define NM_VPN_PLUGIN_CONFIG_MTU "mtu"
-
-/* boolean: Has IP4 configuration? */
-#define NM_VPN_PLUGIN_CONFIG_HAS_IP4 "has-ip4"
-
-/* boolean: Has IP6 configuration? */
-#define NM_VPN_PLUGIN_CONFIG_HAS_IP6 "has-ip6"
-
-/* boolean: If %TRUE the VPN plugin can persist/reconnect the connection over
- * link changes and VPN server dropouts.
- */
-#define NM_VPN_PLUGIN_CAN_PERSIST "can-persist"
-
-/*** Ip4Config ***/
-
-/* uint32: IP address of the internal gateway of the subnet the VPN interface is
- * on, if the VPN uses subnet configuration (network byte order)
- */
-#define NM_VPN_PLUGIN_IP4_CONFIG_INT_GATEWAY "internal-gateway"
-
-/* uint32: internal IP address of the local VPN interface (network byte order) */
-#define NM_VPN_PLUGIN_IP4_CONFIG_ADDRESS "address"
-
-/* uint32: IP address of the other side of Point-to-Point connection if the VPN
- * uses Point-to-Point configuration. (network byte order)
- */
-#define NM_VPN_PLUGIN_IP4_CONFIG_PTP "ptp"
-
-/* uint32: IP prefix of the VPN interface; 1 - 32 inclusive */
-#define NM_VPN_PLUGIN_IP4_CONFIG_PREFIX "prefix"
-
-/* array of uint32: IP addresses of DNS servers for the VPN (network byte order) */
-#define NM_VPN_PLUGIN_IP4_CONFIG_DNS "dns"
-
-/* array of uint32: IP addresses of NBNS/WINS servers for the VPN (network byte order) */
-#define NM_VPN_PLUGIN_IP4_CONFIG_NBNS "nbns"
-
-/* uint32: Message Segment Size that the VPN interface should use */
-#define NM_VPN_PLUGIN_IP4_CONFIG_MSS "mss"
-
-/* string: DNS domain name */
-#define NM_VPN_PLUGIN_IP4_CONFIG_DOMAIN "domain"
-
-/* array of strings: DNS domain names */
-#define NM_VPN_PLUGIN_IP4_CONFIG_DOMAINS "domains"
-
-/* [ip4 routes]: custom routes the client should apply, in the format used
- * by nm_utils_ip4_routes_to/from_gvalue
- */
-#define NM_VPN_PLUGIN_IP4_CONFIG_ROUTES "routes"
-
-/* whether the previous IP4 routing configuration should be preserved. */
-#define NM_VPN_PLUGIN_IP4_CONFIG_PRESERVE_ROUTES "preserve-routes"
-
-/* boolean: prevent this VPN connection from ever getting the default route */
-#define NM_VPN_PLUGIN_IP4_CONFIG_NEVER_DEFAULT "never-default"
-
-/* Deprecated */
-#define NM_VPN_PLUGIN_IP4_CONFIG_GATEWAY NM_VPN_PLUGIN_IP4_CONFIG_EXT_GATEWAY
-
-/* Legacy IP4 items; these are included in the IP4 config by older plugins,
- * but in the generic config by newer plugins.
- */
-
-#define NM_VPN_PLUGIN_IP4_CONFIG_BANNER NM_VPN_PLUGIN_CONFIG_BANNER
-#define NM_VPN_PLUGIN_IP4_CONFIG_EXT_GATEWAY NM_VPN_PLUGIN_CONFIG_EXT_GATEWAY
-#define NM_VPN_PLUGIN_IP4_CONFIG_MTU NM_VPN_PLUGIN_CONFIG_MTU
-#define NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV NM_VPN_PLUGIN_CONFIG_TUNDEV
-
-/*** Ip6Config ***/
-
-/* array of uint8: IP address of the internal gateway of the subnet the VPN interface is
- * on, if the VPN uses subnet configuration (network byte order)
- */
-#define NM_VPN_PLUGIN_IP6_CONFIG_INT_GATEWAY "internal-gateway"
-
-/* array of uint8: internal IP address of the local VPN interface (network byte order) */
-#define NM_VPN_PLUGIN_IP6_CONFIG_ADDRESS "address"
-
-/* array of uint8: IP address of the other side of Point-to-Point connection if the VPN
- * uses Point-to-Point configuration. (network byte order)
- */
-#define NM_VPN_PLUGIN_IP6_CONFIG_PTP "ptp"
-
-/* uint32: prefix length of the VPN interface; 1 - 128 inclusive */
-#define NM_VPN_PLUGIN_IP6_CONFIG_PREFIX "prefix"
-
-/* array of array of uint8: IP addresses of DNS servers for the VPN (network byte order) */
-#define NM_VPN_PLUGIN_IP6_CONFIG_DNS "dns"
-
-/* uint32: Message Segment Size that the VPN interface should use */
-#define NM_VPN_PLUGIN_IP6_CONFIG_MSS "mss"
-
-/* string: DNS domain name */
-#define NM_VPN_PLUGIN_IP6_CONFIG_DOMAIN "domain"
-
-/* array of strings: DNS domain names */
-#define NM_VPN_PLUGIN_IP6_CONFIG_DOMAINS "domains"
-
-/* [ip6 routes]: custom routes the client should apply, in the format used
- * by nm_utils_ip6_routes_to/from_gvalue
- */
-#define NM_VPN_PLUGIN_IP6_CONFIG_ROUTES "routes"
-
-/* whether the previous IP6 routing configuration should be preserved. */
-#define NM_VPN_PLUGIN_IP6_CONFIG_PRESERVE_ROUTES "preserve-routes"
-
-/* boolean: prevent this VPN connection from ever getting the default route */
-#define NM_VPN_PLUGIN_IP6_CONFIG_NEVER_DEFAULT "never-default"
-
-#endif /* __NM_VPN_DBUS_INTERFACE_H__ */