summaryrefslogtreecommitdiff
path: root/src/devices/nm-device-private.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-01-14 17:04:17 +0100
committerThomas Haller <thaller@redhat.com>2017-01-16 17:29:06 +0100
commit6e52efe950783751f57cf97e31eb47046e58f498 (patch)
tree63c8e2b09bbcf72ae21132f1436aec37df6f9c89 /src/devices/nm-device-private.h
parent0210754f18454353f58223a277831a973da3d435 (diff)
downloadNetworkManager-6e52efe950783751f57cf97e31eb47046e58f498.tar.gz
device: refactor setting user-configured MTU during config commit
Instead of overwriting ip4_config_pre_commit(), add a new function get_mtu(). This also adds a default value in case there is no user-configuration. This will allow us later to reset a default MTU based on the device type.
Diffstat (limited to 'src/devices/nm-device-private.h')
-rw-r--r--src/devices/nm-device-private.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h
index c2ba98f387..7b36ba46f0 100644
--- a/src/devices/nm-device-private.h
+++ b/src/devices/nm-device-private.h
@@ -118,6 +118,16 @@ void nm_device_ip_method_failed (NMDevice *self, int family, NMDeviceStateReason
gboolean nm_device_ipv6_sysctl_set (NMDevice *self, const char *property, const char *value);
+/*****************************************************************************/
+
+#define NM_DEVICE_DEFAULT_MTU_WIRED ((guint32) 1500)
+#define NM_DEVICE_DEFAULT_MTU_WIRELESS ((guint32) 1500)
+#define NM_DEVICE_DEFAULT_MTU_INFINIBAND ((guint32) 0)
+
+guint32 nm_device_get_configured_mtu_for_wired (NMDevice *self, gboolean *out_is_user_config);
+
+/*****************************************************************************/
+
#define NM_DEVICE_CLASS_DECLARE_TYPES(klass, conn_type, ...) \
NM_DEVICE_CLASS (klass)->connection_type = conn_type; \
{ \