diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2013-04-26 09:51:29 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2013-04-26 13:05:39 +0300 |
commit | 4c74c9a816d4592e7004b38fc38fba3973850e84 (patch) | |
tree | 8d98e54b9cda45141e9f5ca802017fcfb99b31f0 /gdhcp | |
parent | 9f1f8cacfac8a15f44d2cece08427cb93b7c3c4c (diff) | |
download | connman-4c74c9a816d4592e7004b38fc38fba3973850e84.tar.gz connman-4c74c9a816d4592e7004b38fc38fba3973850e84.tar.bz2 connman-4c74c9a816d4592e7004b38fc38fba3973850e84.zip |
gdhcp: Add helper functions for message retransmission
Diffstat (limited to 'gdhcp')
-rw-r--r-- | gdhcp/client.c | 17 | ||||
-rw-r--r-- | gdhcp/gdhcp.h | 2 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c index 34e773f0..ec1cdeca 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 f011690f..f7a6edeb 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 { |