37 lines
685 B
C
37 lines
685 B
C
|
//
|
||
|
// Created by xajhuang on 2023/3/23.
|
||
|
//
|
||
|
|
||
|
#ifndef VCPE_IP_POOL_H
|
||
|
#define VCPE_IP_POOL_H
|
||
|
#include <uthash/uthash.h>
|
||
|
#include <common.h>
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
|
||
|
/**
|
||
|
* key format FFFFFFF-FFFFFFF
|
||
|
* minAddr-maxAddr
|
||
|
* Hex format string
|
||
|
*/
|
||
|
#define MAX_POOL_HASH_KEY (18)
|
||
|
|
||
|
typedef struct {
|
||
|
S8 poolKey[MAX_POOL_HASH_KEY];
|
||
|
U32 minAddr;
|
||
|
U32 maxAddr;
|
||
|
U32 netMask;
|
||
|
U32 gwAddr;
|
||
|
U32 primeDNS;
|
||
|
U32 salveDNS;
|
||
|
U32 leaseTime;
|
||
|
UT_hash_handle hh;
|
||
|
} IPPOOL_INFO, *PIPPOOL_INFO;
|
||
|
|
||
|
void init_default_pool();
|
||
|
#ifdef __cplusplus
|
||
|
}
|
||
|
#endif
|
||
|
#endif //VCPE_IP_POOL_H
|