OCT 1. 更新头文件定义

This commit is contained in:
huangxin 2023-03-16 09:57:04 +08:00
parent 80b367a01b
commit eb9c03c908
2 changed files with 95 additions and 92 deletions

View File

@ -39,7 +39,7 @@
#endif #endif
#ifndef SIOCGIFCONF #ifndef SIOCGIFCONF
#include <sys/sockio.h> #include <sys/ioctl.h>
#endif #endif
#ifndef _UIO_H_ #ifndef _UIO_H_

View File

@ -5,18 +5,14 @@
#include <map> #include <map>
using namespace std; using namespace std;
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <net/if.h> #include <net/if.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <unistd.h>
#include <memory.h> #include <memory.h>
#include <cstdlib> #include <cstdlib>
#include "opendhcpd.h" #include "opendhcpd.h"
#include "s2j/cJSON.h" #include "s2j/cJSON.h"
#include "misc.h" #include "misc.h"
#include <net/if_arp.h>
#include <uv.h> #include <uv.h>
#include "config.h" #include "config.h"
#include "proto.h" #include "proto.h"
@ -27,6 +23,12 @@ using namespace std;
#include "http_svr.h" #include "http_svr.h"
#include "task_manager.h" #include "task_manager.h"
#if DISCOVER_RSP_NOT_BOARDCAST
#include <sys/socket.h>
#include <unistd.h>
#include <net/if_arp.h>
#endif
extern data2 cfig; extern data2 cfig;
extern bool kRunning; extern bool kRunning;
extern dhcpMap dhcpCache; extern dhcpMap dhcpCache;
@ -45,11 +47,12 @@ static PIPTV_DEV_SET g_iptvCacheDevs = nullptr;
static uv_rwlock_t g_uvCacheLock; static uv_rwlock_t g_uvCacheLock;
#ifdef JSON_SCHEMA_ON #ifdef JSON_SCHEMA_ON
// clang-format off
const char *g_json_msg[] = { const char *g_json_msg[] = {
"{\"type\":\"object\",\"required\":[\"rangeSet\"],\"properties\":{\"rangeSet\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"type\":\"object\",\"required\":[\"dhcpRange\"]}}}}", R"({"type":"object","required":["rangeSet"],"properties":{"rangeSet":{"type":"array","minItems":1,"items":{"type":"object","required":["dhcpRange"]}}}})",
"{\"type\":\"object\",\"required\":[\"dhcpRange\"],\"properties\":{\"dhcpRange\":{\"type\":\"array\",\"minItems\":1}}}", R"({"type":"object","required":["dhcpRange"],"properties":{"dhcpRange":{"type":"array","minItems":1}}})",
"{\"type\":\"object\",\"required\":[\"userMac\"],\"properties\":{\"userMac\":{\"type\":\"array\",\"minItems\":1}}}" R"({"type":"object","required":["userMac"],"properties":{"userMac":{"type":"array","minItems":1}}})"};
}; // clang-format on
#endif #endif
static int dhcp_get_user_info(const char **pRsp, const char *pRequest) { static int dhcp_get_user_info(const char **pRsp, const char *pRequest) {