-
Notifications
You must be signed in to change notification settings - Fork 8
/
connlist.h
49 lines (36 loc) · 1.16 KB
/
connlist.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef AIDS_CONNLIST_H
#define AIDS_CONNLIST_H
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <net/netfilter/nf_conntrack.h>
#include <linux/jiffies.h>
#include "aids.h"
struct __aids_connlist_entry {
struct list_head link;
struct rcu_head rcu;
struct aids_connection_info conn_info;
};
#define aids_connlist_entry struct __aids_connlist_entry
extern spinlock_t g_connlist_spinlock;
extern struct kmem_cache *aids_cache_connlist __read_mostly;
extern struct list_head g_aids_connlist_head;
void aids_connlist_move_head(aids_connlist_entry *entry, aids_connlist_entry *new_entry);
void aids_connlist_move_tail(aids_connlist_entry *entry, aids_connlist_entry *new_entry);
aids_connlist_entry* aids_connlist_next(struct list_head *connlist);
unsigned int aids_connlist_get_count(void);
aids_connlist_entry* aids_connlist_new(
u32 saddr,
u32 daddr,
u16 sport,
u16 dport,
enum ip_conntrack_info ctinfo,
u8 protocol,
u32 appid,
enum aids_connection_direct direct,
u8 pkt_count
);
void aids_connlist_delete_sync(aids_connlist_entry* entry, u8 sync);
int aids_connlist_init(void);
void aids_connlist_deinit(void);
#endif