diff options
Diffstat (limited to 'sys/net/pfvar.h')
-rw-r--r-- | sys/net/pfvar.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index dbfca52b15b..6a73cb9992a 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.426 2015/12/03 14:05:28 bluhm Exp $ */ +/* $OpenBSD: pfvar.h,v 1.427 2015/12/22 13:33:26 sashan Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -38,6 +38,9 @@ #include <sys/tree.h> #include <sys/rwlock.h> #include <sys/syslimits.h> +#include <sys/refcnt.h> + +#include <netinet/in.h> #include <net/radix.h> #include <net/route.h> @@ -55,6 +58,11 @@ struct ip6_hdr; #endif #endif +typedef struct refcnt pf_refcnt_t; +#define PF_REF_INIT(_x) refcnt_init(&(_x)) +#define PF_REF_TAKE(_x) refcnt_take(&(_x)) +#define PF_REF_RELE(_x) refcnt_rele(&(_x)) + enum { PF_INOUT, PF_IN, PF_OUT, PF_FWD }; enum { PF_PASS, PF_DROP, PF_SCRUB, PF_NOSCRUB, PF_NAT, PF_NONAT, PF_BINAT, PF_NOBINAT, PF_RDR, PF_NORDR, PF_SYNPROXY_DROP, PF_DEFER, @@ -696,6 +704,8 @@ struct pf_state_key { struct pf_statelisthead states; struct pf_state_key *reverse; struct inpcb *inp; + pf_refcnt_t refcnt; + u_int8_t removed; }; #define PF_REVERSED_KEY(key, family) \ ((key[PF_SK_WIRE]->af != key[PF_SK_STACK]->af) && \ @@ -1909,7 +1919,11 @@ int pf_postprocess_addr(struct pf_state *); void pf_cksum(struct pf_pdesc *, struct mbuf *); -#endif /* _KERNEL */ +struct pf_state_key *pf_state_key_ref(struct pf_state_key *); +void pf_state_key_unref(struct pf_state_key *); +int pf_state_key_isvalid(struct pf_state_key *); +void pf_pkt_unlink_state_key(struct mbuf *); +#endif /* _KERNEL */ #endif /* _NET_PFVAR_H_ */ |