secgateway/Platform/common/rpdb/dpi_trie_cache.h

29 lines
451 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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