OCT 添加DHCP租约池配置信息结构体声明

This commit is contained in:
huangxin 2022-11-17 15:35:17 +08:00
parent ff84d9e173
commit 0b46222137
2 changed files with 8 additions and 9 deletions

View File

@ -71,14 +71,6 @@ do {
ADD_CFG_ITEM(CFG_DHCP_RANGE_SET, "application.dhcp_server.range_set", VALUE_TYPE_ARRAY_OBJ, "", "DHCP IP pool"); \ ADD_CFG_ITEM(CFG_DHCP_RANGE_SET, "application.dhcp_server.range_set", VALUE_TYPE_ARRAY_OBJ, "", "DHCP IP pool"); \
} while (0)// clang-format on } while (0)// clang-format on
typedef struct {
char rangAddr[256];
char subnet[20];
char dnsSvr[256];
char gateway[20];
unsigned int lease;
} OBJ_DHCP_RNG, *POBJ_DHCP_RNG;
typedef union { typedef union {
long long longValue; long long longValue;
char *strValue; char *strValue;
@ -556,7 +548,6 @@ const char *config_item_dump_fmt(const char *titleMessage) {
keyGateway = sdscatprintf(keyGateway, "\"%s\"", p->gateway); keyGateway = sdscatprintf(keyGateway, "\"%s\"", p->gateway);
s = sdscatprintf(s, "|%4d | %-25s | %-45s | %-64s |\n", pItem->cfgId, tmp2, title, ""); s = sdscatprintf(s, "|%4d | %-25s | %-45s | %-64s |\n", pItem->cfgId, tmp2, title, "");
s = sdscatprintf(s, "| | %-25s | %-45s | %-64s |\n", "", " .dhcp_range", keyRang); s = sdscatprintf(s, "| | %-25s | %-45s | %-64s |\n", "", " .dhcp_range", keyRang);
s = sdscatprintf(s, "| | %-25s | %-45s | %-64s |\n", "", " .subnet_mask", keySubnet); s = sdscatprintf(s, "| | %-25s | %-45s | %-64s |\n", "", " .subnet_mask", keySubnet);
s = sdscatprintf(s, "| | %-25s | %-45s | %-64s |\n", "", " .domain_server", keyDns); s = sdscatprintf(s, "| | %-25s | %-45s | %-64s |\n", "", " .domain_server", keyDns);

View File

@ -10,6 +10,14 @@ extern "C" {
#define DEFAULT_INTEGRAL_ERR_VALUE (0x0AFFFFAA) #define DEFAULT_INTEGRAL_ERR_VALUE (0x0AFFFFAA)
typedef struct {
char rangAddr[256];
char subnet[20];
char dnsSvr[256];
char gateway[20];
unsigned int lease;
} OBJ_DHCP_RNG, *POBJ_DHCP_RNG;
typedef enum { typedef enum {
VALUE_TYPE_INTEGRAL = 0, VALUE_TYPE_INTEGRAL = 0,
VALUE_TYPE_FLOAT = 1, VALUE_TYPE_FLOAT = 1,