diff options
Diffstat (limited to 'gdhcp/gdhcp.h')
-rw-r--r-- | gdhcp/gdhcp.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h index f3e47bf6..0ed7fa54 100644 --- a/gdhcp/gdhcp.h +++ b/gdhcp/gdhcp.h @@ -150,6 +150,7 @@ GDHCPClientError g_dhcp_client_set_send(GDHCPClient *client, unsigned char option_code, const char *option_value); +char *g_dhcp_client_get_server_address(GDHCPClient *client); char *g_dhcp_client_get_address(GDHCPClient *client); char *g_dhcp_client_get_netmask(GDHCPClient *client); GList *g_dhcp_client_get_option(GDHCPClient *client, @@ -201,6 +202,9 @@ typedef enum { typedef void (*GDHCPSaveLeaseFunc) (unsigned char *mac, unsigned int nip, unsigned int expire); + +typedef void (*GDHCPLeaseAddedCb) (unsigned char *mac, uint32_t ip); + struct _GDHCPServer; typedef struct _GDHCPServer GDHCPServer; @@ -223,6 +227,12 @@ void g_dhcp_server_set_lease_time(GDHCPServer *dhcp_server, unsigned int lease_time); void g_dhcp_server_set_save_lease(GDHCPServer *dhcp_server, GDHCPSaveLeaseFunc func, gpointer user_data); +void g_dhcp_server_set_lease_added_cb(GDHCPServer *dhcp_server, + GDHCPLeaseAddedCb cb); + +int dhcp_get_random(uint64_t *val); +void dhcp_cleanup_random(void); + #ifdef __cplusplus } #endif |