diff options
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/libnm.ver | 3 | ||||
-rw-r--r-- | libnm/nm-device-ip-tunnel.c | 36 | ||||
-rw-r--r-- | libnm/nm-device-ip-tunnel.h | 4 |
3 files changed, 43 insertions, 0 deletions
diff --git a/libnm/libnm.ver b/libnm/libnm.ver index 2014a30a52..e5ded29ac1 100644 --- a/libnm/libnm.ver +++ b/libnm/libnm.ver @@ -1345,6 +1345,9 @@ global: nm_client_checkpoint_rollback_async; nm_client_checkpoint_rollback_finish; nm_client_get_checkpoints; + nm_device_ip_tunnel_get_flags; + nm_ip_tunnel_flags_get_type; + nm_setting_ip_tunnel_get_flags; nm_setting_vpn_get_data_keys; nm_setting_vpn_get_secret_keys; } libnm_1_10_0; diff --git a/libnm/nm-device-ip-tunnel.c b/libnm/nm-device-ip-tunnel.c index e0dfc0f4e0..2f7efe9d8d 100644 --- a/libnm/nm-device-ip-tunnel.c +++ b/libnm/nm-device-ip-tunnel.c @@ -46,6 +46,7 @@ typedef struct { char *output_key; guint8 encap_limit; guint32 flow_label; + guint32 flags; } NMDeviceIPTunnelPrivate; enum { @@ -61,6 +62,7 @@ enum { PROP_OUTPUT_KEY, PROP_ENCAPSULATION_LIMIT, PROP_FLOW_LABEL, + PROP_FLAGS, LAST_PROP }; @@ -242,6 +244,22 @@ nm_device_ip_tunnel_get_flow_label (NMDeviceIPTunnel *device) return NM_DEVICE_IP_TUNNEL_GET_PRIVATE (device)->flow_label; } +/** + * nm_device_ip_tunnel_get_flags: + * @device: a #NMDeviceIPTunnel + * + * Returns: the tunnel flags + * + * Since: 1.12 + **/ +NMIPTunnelFlags +nm_device_ip_tunnel_get_flags (NMDeviceIPTunnel *device) +{ + g_return_val_if_fail (NM_IS_DEVICE_IP_TUNNEL (device), NM_IP_TUNNEL_FLAG_NONE); + + return NM_DEVICE_IP_TUNNEL_GET_PRIVATE (device)->flags; +} + static gboolean connection_compatible (NMDevice *device, NMConnection *connection, GError **error) { @@ -286,6 +304,7 @@ init_dbus (NMObject *object) { NM_DEVICE_IP_TUNNEL_OUTPUT_KEY, &priv->output_key }, { NM_DEVICE_IP_TUNNEL_ENCAPSULATION_LIMIT, &priv->encap_limit }, { NM_DEVICE_IP_TUNNEL_FLOW_LABEL, &priv->flow_label }, + { NM_DEVICE_IP_TUNNEL_FLAGS, &priv->flags }, { NULL }, }; @@ -352,6 +371,9 @@ get_property (GObject *object, case PROP_FLOW_LABEL: g_value_set_uint (value, nm_device_ip_tunnel_get_flow_label (device)); break; + case PROP_FLAGS: + g_value_set_uint (value, nm_device_ip_tunnel_get_flags (device)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; @@ -536,4 +558,18 @@ nm_device_ip_tunnel_class_init (NMDeviceIPTunnelClass *bond_class) 0, (1 << 20) - 1, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + + /** + * NMDeviceIPTunnel:flags: + * + * Tunnel flags. + * + * Since: 1.12 + **/ + g_object_class_install_property + (object_class, PROP_FLAGS, + g_param_spec_uint (NM_DEVICE_IP_TUNNEL_FLAGS, "", "", + 0, G_MAXUINT32, 0, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); } diff --git a/libnm/nm-device-ip-tunnel.h b/libnm/nm-device-ip-tunnel.h index 6d748d966b..92a83edc32 100644 --- a/libnm/nm-device-ip-tunnel.h +++ b/libnm/nm-device-ip-tunnel.h @@ -26,6 +26,7 @@ #endif #include "nm-device.h" +#include "nm-setting-ip-tunnel.h" G_BEGIN_DECLS @@ -47,6 +48,7 @@ G_BEGIN_DECLS #define NM_DEVICE_IP_TUNNEL_OUTPUT_KEY "output-key" #define NM_DEVICE_IP_TUNNEL_ENCAPSULATION_LIMIT "encapsulation-limit" #define NM_DEVICE_IP_TUNNEL_FLOW_LABEL "flow-label" +#define NM_DEVICE_IP_TUNNEL_FLAGS "flags" /** * NMDeviceIPTunnel: @@ -87,6 +89,8 @@ NM_AVAILABLE_IN_1_2 guint8 nm_device_ip_tunnel_get_encapsulation_limit (NMDeviceIPTunnel *device); NM_AVAILABLE_IN_1_2 guint nm_device_ip_tunnel_get_flow_label (NMDeviceIPTunnel *device); +NM_AVAILABLE_IN_1_12 +NMIPTunnelFlags nm_device_ip_tunnel_get_flags (NMDeviceIPTunnel *device); G_END_DECLS |