29 lines
451 B
C
29 lines
451 B
C
#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;
|
||
bool ipv4;
|
||
uint64_t uptime;
|
||
};
|
||
|
||
/*
|
||
@des:添加三元组到hash表
|
||
@input: node赋值三元组和appid
|
||
@outp: 成功:true,失败:false
|
||
*/
|
||
bool dpi_cache_node_add(struct dpi_cache_node node);
|
||
#endif
|