summaryrefslogtreecommitdiff
path: root/src/dhcp/nm-dhcp-client.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-09-11 10:43:48 +0200
committerThomas Haller <thaller@redhat.com>2017-09-11 15:05:57 +0200
commit1aa36dde94dfb32a7172815ecb918b662aa9253b (patch)
treec9f45271a22d2591297a7eac8a5f2e9ec8a811f8 /src/dhcp/nm-dhcp-client.h
parentfa46736013fa1e3df1508b1f67b495ce45daf94a (diff)
downloadNetworkManager-1aa36dde94dfb32a7172815ecb918b662aa9253b.tar.gz
device: enable support for ipv6.dhcp-timeout
- cleanup data type and use guint32 consistently. We might want to introduce a new "infinity" value. But since libnm's NM_SETTING_IP_CONFIG_DHCP_TIMEOUT asserts against the range 0 - G_MAXINT32, we cannot express it as -1 anyway. So, infinity will have the numerical value G_MAXINT32, hence guint32 is just fine. - make use of existing ipv6.dhcp-timeout setting and add global default configuration in NetworkManager.conf - instead of having subclasses call nm_device_set_dhcp_timeout(), add a virtual function get_dhcp_timeout().
Diffstat (limited to 'src/dhcp/nm-dhcp-client.h')
-rw-r--r--src/dhcp/nm-dhcp-client.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dhcp/nm-dhcp-client.h b/src/dhcp/nm-dhcp-client.h
index 890c5ff595..9e71b1c0e8 100644
--- a/src/dhcp/nm-dhcp-client.h
+++ b/src/dhcp/nm-dhcp-client.h
@@ -24,6 +24,8 @@
#include "nm-ip4-config.h"
#include "nm-ip6-config.h"
+#define NM_DHCP_TIMEOUT_DEFAULT ((guint32) 45) /* default DHCP timeout, in seconds */
+
#define NM_TYPE_DHCP_CLIENT (nm_dhcp_client_get_type ())
#define NM_DHCP_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DHCP_CLIENT, NMDhcpClient))
#define NM_DHCP_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DHCP_CLIENT, NMDhcpClientClass))