summaryrefslogtreecommitdiff
path: root/gdhcp
diff options
context:
space:
mode:
authorAbhishek Sansanwal <abhishek.s94@samsung.com>2017-08-03 09:27:22 +0530
committerAbhishek Sansanwal <abhishek.s94@samsung.com>2017-08-03 09:27:22 +0530
commitfd3573b27dcecd10afaaabada6892a0e65974e44 (patch)
tree18223155b852ec01834c1c247acbe1a3690ca8ec /gdhcp
parent1b56f4d34a2583a30be96f9e0e5dd44ab4c30be8 (diff)
downloadconnman-fd3573b27dcecd10afaaabada6892a0e65974e44.tar.gz
connman-fd3573b27dcecd10afaaabada6892a0e65974e44.tar.bz2
connman-fd3573b27dcecd10afaaabada6892a0e65974e44.zip
Change-Id: I0727c24f30be5162d27e49996dfa376348f98527 Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
Diffstat (limited to 'gdhcp')
-rwxr-xr-xgdhcp/client.c12
-rwxr-xr-xgdhcp/gdhcp.h5
2 files changed, 17 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c
index ff4539b7..d3794bde 100755
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -178,6 +178,7 @@ struct _GDHCPClient {
struct timeval start_time;
bool request_bcast;
#if defined TIZEN_EXT
+ uint32_t dhcp_lease_seconds;
gboolean init_reboot;
#endif
};
@@ -2383,6 +2384,10 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,
dhcp_client->lease_seconds = get_lease(&packet);
+#if defined TIZEN_EXT
+ dhcp_client->dhcp_lease_seconds = dhcp_client->lease_seconds;
+#endif
+
get_request(dhcp_client, &packet);
switch_listening_mode(dhcp_client, L_NONE);
@@ -3036,6 +3041,13 @@ char *g_dhcp_client_get_server_address(GDHCPClient *dhcp_client)
#endif
}
+#if defined TIZEN_EXT
+int g_dhcp_client_get_dhcp_lease_duration(GDHCPClient *dhcp_client)
+{
+ return dhcp_client->dhcp_lease_seconds;
+}
+#endif
+
char *g_dhcp_client_get_address(GDHCPClient *dhcp_client)
{
return g_strdup(dhcp_client->assigned_ip);
diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h
index 59b562bf..fd6ce548 100755
--- a/gdhcp/gdhcp.h
+++ b/gdhcp/gdhcp.h
@@ -151,6 +151,11 @@ GDHCPClientError g_dhcp_client_set_send(GDHCPClient *client,
const char *option_value);
char *g_dhcp_client_get_server_address(GDHCPClient *client);
+
+#if defined TIZEN_EXT
+int g_dhcp_client_get_dhcp_lease_duration(GDHCPClient *client);
+#endif
+
char *g_dhcp_client_get_address(GDHCPClient *client);
char *g_dhcp_client_get_netmask(GDHCPClient *client);
GList *g_dhcp_client_get_option(GDHCPClient *client,