EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
dnsmasq.h
Go to the documentation of this file.
1 
12 #ifndef DNSMASQ_H
13 #define DNSMASQ_H
14 
15 #include "dhcp_config.h"
16 
17 #include "../utils/allocs.h"
18 #include "../utils/os.h"
19 
27 int generate_dnsmasq_conf(struct dhcp_conf *dconf, UT_array *dns_server_array);
28 
36 int generate_dnsmasq_script(char *dhcp_script_path,
37  char *supervisor_control_path);
38 
50 char *run_dhcp_process(const char *dhcp_bin_path, const char *dhcp_conf_path);
51 
57 bool kill_dhcp_process(void);
58 
65 int signal_dhcp_process(const char *dhcp_bin_path);
66 
74 int clear_dhcp_lease_entry(char *mac_addr, char *dhcp_leasefile_path);
75 
87 int define_dhcp_interface_name(const struct dhcp_conf *dconf, uint16_t vlanid,
88  char *ifname);
89 #endif
File containing the definition of dhcp configuration structures.
int define_dhcp_interface_name(const struct dhcp_conf *dconf, uint16_t vlanid, char *ifname)
Creates the DHCP interface name for the given vlan id.
Definition: dnsmasq.c:69
int clear_dhcp_lease_entry(char *mac_addr, char *dhcp_leasefile_path)
Clear the DHCP lease entry for a MAC addrress.
Definition: dnsmasq.c:434
int generate_dnsmasq_conf(struct dhcp_conf *dconf, UT_array *dns_server_array)
Generates the dnsmasq configuration file.
Definition: dnsmasq.c:205
char * run_dhcp_process(const char *dhcp_bin_path, const char *dhcp_conf_path)
Execute the DHCP server.
Definition: dnsmasq.c:323
int signal_dhcp_process(const char *dhcp_bin_path)
Signal the DHCP process to reload the config.
Definition: dnsmasq.c:417
bool kill_dhcp_process(void)
Terminate the DHCP server.
Definition: dnsmasq.c:401
int generate_dnsmasq_script(char *dhcp_script_path, char *supervisor_control_path)
Generates the dnsmasq executable script for DHCP requests.
Definition: dnsmasq.c:243
The dhcp configuration structures.
Definition: dhcp_config.h:40