summaryrefslogtreecommitdiff
path: root/gdhcp
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-04-26 06:51:29 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-26 10:05:39 (GMT)
commit4c74c9a816d4592e7004b38fc38fba3973850e84 (patch)
tree8d98e54b9cda45141e9f5ca802017fcfb99b31f0 /gdhcp
parent9f1f8cacfac8a15f44d2cece08427cb93b7c3c4c (diff)
downloadconnman-4c74c9a816d4592e7004b38fc38fba3973850e84.zip
connman-4c74c9a816d4592e7004b38fc38fba3973850e84.tar.gz
connman-4c74c9a816d4592e7004b38fc38fba3973850e84.tar.bz2
gdhcp: Add helper functions for message retransmission
Diffstat (limited to 'gdhcp')
-rw-r--r--gdhcp/client.c17
-rw-r--r--gdhcp/gdhcp.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c
index 34e773f..ec1cdec 100644
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -143,6 +143,7 @@ struct _GDHCPClient {
time_t last_renew;
time_t last_rebind;
time_t expire;
+ gboolean retransmit;
};
static inline void debug(GDHCPClient *client, const char *format, ...)
@@ -568,6 +569,22 @@ done:
close(sk);
}
+void g_dhcpv6_client_set_retransmit(GDHCPClient *dhcp_client)
+{
+ if (dhcp_client == NULL)
+ return;
+
+ dhcp_client->retransmit = TRUE;
+}
+
+void g_dhcpv6_client_clear_retransmit(GDHCPClient *dhcp_client)
+{
+ if (dhcp_client == NULL)
+ return;
+
+ dhcp_client->retransmit = FALSE;
+}
+
int g_dhcpv6_create_duid(GDHCPDuidType duid_type, int index, int type,
unsigned char **duid, int *duid_len)
{
diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h
index f011690..f7a6ede 100644
--- a/gdhcp/gdhcp.h
+++ b/gdhcp/gdhcp.h
@@ -155,6 +155,8 @@ int g_dhcpv6_client_set_ia(GDHCPClient *dhcp_client, int index,
void g_dhcpv6_client_reset_renew(GDHCPClient *dhcp_client);
void g_dhcpv6_client_reset_rebind(GDHCPClient *dhcp_client);
void g_dhcpv6_client_set_expire(GDHCPClient *dhcp_client, uint32_t timeout);
+void g_dhcpv6_client_set_retransmit(GDHCPClient *dhcp_client);
+void g_dhcpv6_client_clear_retransmit(GDHCPClient *dhcp_client);
/* DHCP Server */
typedef enum {