From 0b462221379a7e87f918bd7fc5ebf05338a8d9aa Mon Sep 17 00:00:00 2001 From: huangxin Date: Thu, 17 Nov 2022 15:35:17 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20=E6=B7=BB=E5=8A=A0DHCP=E7=A7=9F=E7=BA=A6?= =?UTF-8?q?=E6=B1=A0=E9=85=8D=E7=BD=AE=E4=BF=A1=E6=81=AF=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E4=BD=93=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- srcs/libs/configure/config.c | 9 --------- srcs/libs/include/config.h | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/srcs/libs/configure/config.c b/srcs/libs/configure/config.c index 2b9ec1c..abe1922 100644 --- a/srcs/libs/configure/config.c +++ b/srcs/libs/configure/config.c @@ -71,14 +71,6 @@ do { ADD_CFG_ITEM(CFG_DHCP_RANGE_SET, "application.dhcp_server.range_set", VALUE_TYPE_ARRAY_OBJ, "", "DHCP IP pool"); \ } 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 { long long longValue; char *strValue; @@ -556,7 +548,6 @@ const char *config_item_dump_fmt(const char *titleMessage) { keyGateway = sdscatprintf(keyGateway, "\"%s\"", p->gateway); 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", "", " .subnet_mask", keySubnet); s = sdscatprintf(s, "| | %-25s | %-45s | %-64s |\n", "", " .domain_server", keyDns); diff --git a/srcs/libs/include/config.h b/srcs/libs/include/config.h index e3e86d3..4a0379b 100644 --- a/srcs/libs/include/config.h +++ b/srcs/libs/include/config.h @@ -10,6 +10,14 @@ extern "C" { #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 { VALUE_TYPE_INTEGRAL = 0, VALUE_TYPE_FLOAT = 1,