Changeset View
Changeset View
Standalone View
Standalone View
head/sys/net/pfil.c
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
static struct packet_filter_hook *pfil_chain_get(int, struct pfil_head *); | static struct packet_filter_hook *pfil_chain_get(int, struct pfil_head *); | ||||
static int pfil_chain_add(pfil_chain_t *, struct packet_filter_hook *, int); | static int pfil_chain_add(pfil_chain_t *, struct packet_filter_hook *, int); | ||||
static int pfil_chain_remove(pfil_chain_t *, pfil_func_t, void *); | static int pfil_chain_remove(pfil_chain_t *, pfil_func_t, void *); | ||||
LIST_HEAD(pfilheadhead, pfil_head); | LIST_HEAD(pfilheadhead, pfil_head); | ||||
VNET_DEFINE(struct pfilheadhead, pfil_head_list); | VNET_DEFINE(struct pfilheadhead, pfil_head_list); | ||||
#define V_pfil_head_list VNET(pfil_head_list) | #define V_pfil_head_list VNET(pfil_head_list) | ||||
VNET_DEFINE(struct rmlock, pfil_lock); | VNET_DEFINE(struct rmlock, pfil_lock); | ||||
#define V_pfil_lock VNET(pfil_lock) | |||||
#define PFIL_LOCK_INIT_REAL(l, t) \ | #define PFIL_LOCK_INIT_REAL(l, t) \ | ||||
rm_init_flags(l, "PFil " t " rmlock", RM_RECURSE) | rm_init_flags(l, "PFil " t " rmlock", RM_RECURSE) | ||||
#define PFIL_LOCK_DESTROY_REAL(l) \ | #define PFIL_LOCK_DESTROY_REAL(l) \ | ||||
rm_destroy(l) | rm_destroy(l) | ||||
#define PFIL_LOCK_INIT(p) do { \ | #define PFIL_LOCK_INIT(p) do { \ | ||||
if ((p)->flags & PFIL_FLAG_PRIVATE_LOCK) { \ | if ((p)->flags & PFIL_FLAG_PRIVATE_LOCK) { \ | ||||
PFIL_LOCK_INIT_REAL(&(p)->ph_lock, "private"); \ | PFIL_LOCK_INIT_REAL(&(p)->ph_lock, "private"); \ | ||||
▲ Show 20 Lines • Show All 356 Lines • Show Last 20 Lines |