2023-04-25 01:17:08 +00:00
|
|
|
//
|
|
|
|
// Created by HuangXin on 2023/4/24.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef VCPE_DB_INTERFACE_H
|
|
|
|
#define VCPE_DB_INTERFACE_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2023-05-17 03:24:10 +00:00
|
|
|
#include "rfc2131.h"
|
|
|
|
#include "ip_pool.h"
|
2023-05-12 01:26:09 +00:00
|
|
|
int db_add_pre_assign(PDHCP_REQ pReq, U32 ip, PPOOL_CTX pPool);
|
|
|
|
int db_init_lease_database();
|
|
|
|
int db_get_pre_assign(U32 uid, const char *mac, const char *hostname, U32 *preAssign);
|
|
|
|
int db_ip_is_pre_assign(U32 uid, U32 ip);
|
|
|
|
int db_get_pre_lease(PDHCP_REQ pReq, PPOOL_CTX pAssign);
|
|
|
|
int db_get_lease(PDHCP_REQ pReq, PPOOL_CTX pAssign);
|
|
|
|
int db_clearup_timeout_lease();
|
|
|
|
int db_lock_pre_assign_ip();
|
2023-04-28 07:19:00 +00:00
|
|
|
int db_release_lease(PDHCP_REQ pReq);
|
|
|
|
int db_add_lease(PDHCP_REQ pReq, PPOOL_CTX pCtx);
|
2023-05-17 03:24:10 +00:00
|
|
|
int db_iptv_add_device(U32 uid, const char *pMac);
|
2023-04-25 01:17:08 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif //VCPE_DB_INTERFACE_H
|