-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netfilter: nf_tables: add flow table netlink frontend
This patch introduces a netlink control plane to create, delete and dump flow tables. Flow tables are identified by name, this name is used from rules to refer to an specific flow table. Flow tables use the rhashtable class and a generic garbage collector to remove expired entries. This also adds the infrastructure to add different flow table types, so we can add one for each layer 3 protocol family. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
- Loading branch information
Pablo Neira Ayuso
committed
Jan 8, 2018
1 parent
9096401
commit 3b49e2e
Showing
4 changed files
with
870 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef _NF_FLOW_TABLE_H | ||
#define _NF_FLOW_TABLE_H | ||
|
||
#include <linux/rhashtable.h> | ||
|
||
struct nf_flowtable; | ||
|
||
struct nf_flowtable_type { | ||
struct list_head list; | ||
int family; | ||
void (*gc)(struct work_struct *work); | ||
const struct rhashtable_params *params; | ||
nf_hookfn *hook; | ||
struct module *owner; | ||
}; | ||
|
||
struct nf_flowtable { | ||
struct rhashtable rhashtable; | ||
const struct nf_flowtable_type *type; | ||
struct delayed_work gc_work; | ||
}; | ||
|
||
#endif /* _FLOW_OFFLOAD_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.