secgateway/Platform/user/configm/config-server/include/dhcp_lib.h

77 lines
1.4 KiB
C

#ifndef DHCP_LIB_H_
#define DHCP_LIB_H_
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <cjson/cJSON.h>
#include "rpc_common.h"
#include <regex.h>
#include "ipconfig.h"
#include "configm.h"
#include "rpc.h"
#include "netconfig.h"
#include "dhcp_client_config.h"
#include "dhcp_host_config.h"
#include "dhcp_relay_config.h"
#include "dhcp_shared_network_config.h"
#include "dhcp_subnet_config.h"
#include "dhcp_dhcpd_lease.h"
ret_code dhcp_config_init(void);
int del_interface_dhcp_cb(BR_EVENT_TYPE event_type, br_event_t event_arg);
char *getfileall(char *fname);
char *getfilefirstline(char *fname);
char *getfileall_with_linefeed(char *fname);
int check_name(char *name);
int check_mac(char *mac);
int file_consist_str(char *fname, char *str);
int check_range(char *range, char *mask, char *subnet);
int check_dns(char *dns);
int check_lease(char *lease);
int check_ip(char *ip);
char *get_interface_subnet(char *interface);
char *get_interface_ip(char *interface) ;
char *get_interface_mask(char *interface);
int check_servers(char *servers);
int check_segment(char *segment, char *mask);
int check_mask(char *mask);
char *wan_if_str();
#endif