OCT commit rpdb

This commit is contained in:
wuhuanzheng 2019-09-03 17:38:02 +08:00
parent 78ca3cdc35
commit 69984935e6
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#ifndef _DPI_TRIE_CACHE_H_
#define _DPI_TRIE_CACHE_H_
/*
*
*/
struct dpi_cache_node {
struct list_head list;
union {
struct in6_addr ip6;
struct in_addr ip4;
}ip;
__u16 proto;
__u16 port;
__u32 appid;
uint64_t uptime;
};
/*
@des:hash表
@input: node赋值三元组和appid
@outp: truefalse
*/
bool dpi_cache_node_add(struct dpi_cache_node node);
#endif

View File

@ -0,0 +1,27 @@
#ifndef __RPDB_H__
#define __RPDB_H__
#define RPDB_ROUTE_ADD (0)
#define RPDB_ROUTE_DEL (1)
/*
@des:
@output true,false
*/
bool rpdb_init_route();
/*
@des
@input
gatewayip地址
tbl_name,NULLtbl_name不用table_nexthop生成路由表
optRPDB_ROUTE_ADD/RPDB_ROUTE_DEL
@output
mark值
: -1
*/
int rpdb_add_del_route(char* gateway,char *tbl_name,int opt);
#endif