EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
Functions
dhcp_service.h File Reference

File containing the definition of dhcp service configuration utilities. More...

#include "dhcp_config.h"
#include "../utils/allocs.h"
#include "../utils/os.h"
Include dependency graph for dhcp_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int run_dhcp (struct dhcp_conf *dconf, UT_array *dns_server_array, char *supervisor_control_path, bool exec_dhcp)
 Run the DHCP server. More...
 
bool close_dhcp (void)
 Closes (terminates) dhcp process. More...
 
int clear_dhcp_lease (char *mac_addr, struct dhcp_conf *dconf)
 Clear the DHCP lease for a MAC addrress. More...
 

Detailed Description

File containing the definition of dhcp service configuration utilities.

Author
Alexandru Mereacre
Date
2021

Function Documentation

◆ clear_dhcp_lease()

int clear_dhcp_lease ( char *  mac_addr,
struct dhcp_conf dconf 
)

Clear the DHCP lease for a MAC addrress.

Parameters
mac_addrThe MAC address string
dconfThe dhcp configuration structures
Returns
int 0 on success, -1 on failure

◆ close_dhcp()

bool close_dhcp ( void  )

Closes (terminates) dhcp process.

Returns
true success, false otherwise

◆ run_dhcp()

int run_dhcp ( struct dhcp_conf dconf,
UT_array *  dns_server_array,
char *  supervisor_control_path,
bool  exec_dhcp 
)

Run the DHCP server.

Parameters
dconfThe dhcp configuration structures.
dns_server_arrayThe array including the DNS servers IP addresses.
supervisor_control_pathThe UNIX domain control path.
exec_dhcpFlag to execute/signal the DHCP process.
Returns
int 0 on success, -1 on error