Changeset View
Changeset View
Standalone View
Standalone View
sys/net/pfvar.h
Show First 20 Lines • Show All 1,376 Lines • ▼ Show 20 Lines | if ((a) != NULL) \ | ||||
*(a) = (x); \ | *(a) = (x); \ | ||||
if (x < PFRES_MAX) \ | if (x < PFRES_MAX) \ | ||||
counter_u64_add(V_pf_status.counters[x], 1); \ | counter_u64_add(V_pf_status.counters[x], 1); \ | ||||
} while (0) | } while (0) | ||||
enum pf_syncookies_mode { | enum pf_syncookies_mode { | ||||
PF_SYNCOOKIES_NEVER = 0, | PF_SYNCOOKIES_NEVER = 0, | ||||
PF_SYNCOOKIES_ALWAYS = 1, | PF_SYNCOOKIES_ALWAYS = 1, | ||||
PF_SYNCOOKIES_MODE_MAX = PF_SYNCOOKIES_ALWAYS | PF_SYNCOOKIES_ADAPTIVE = 2, | ||||
PF_SYNCOOKIES_MODE_MAX = PF_SYNCOOKIES_ADAPTIVE | |||||
}; | }; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
struct pf_kstatus { | struct pf_kstatus { | ||||
counter_u64_t counters[PFRES_MAX]; /* reason for passing/dropping */ | counter_u64_t counters[PFRES_MAX]; /* reason for passing/dropping */ | ||||
counter_u64_t lcounters[KLCNT_MAX]; /* limit counters */ | counter_u64_t lcounters[KLCNT_MAX]; /* limit counters */ | ||||
struct pf_counter_u64 fcounters[FCNT_MAX]; /* state operation counters */ | struct pf_counter_u64 fcounters[FCNT_MAX]; /* state operation counters */ | ||||
counter_u64_t scounters[SCNT_MAX]; /* src_node operation counters */ | counter_u64_t scounters[SCNT_MAX]; /* src_node operation counters */ | ||||
uint32_t states; | uint32_t states; | ||||
uint32_t src_nodes; | uint32_t src_nodes; | ||||
uint32_t running; | uint32_t running; | ||||
uint32_t since; | uint32_t since; | ||||
uint32_t debug; | uint32_t debug; | ||||
uint32_t hostid; | uint32_t hostid; | ||||
char ifname[IFNAMSIZ]; | char ifname[IFNAMSIZ]; | ||||
uint8_t pf_chksum[PF_MD5_DIGEST_LENGTH]; | uint8_t pf_chksum[PF_MD5_DIGEST_LENGTH]; | ||||
bool keep_counters; | bool keep_counters; | ||||
enum pf_syncookies_mode syncookies_mode; | enum pf_syncookies_mode syncookies_mode; | ||||
bool syncookies_active; | bool syncookies_active; | ||||
uint64_t syncookies_inflight[2]; | |||||
uint32_t states_halfopen; | |||||
}; | }; | ||||
#endif | #endif | ||||
struct pf_divert { | struct pf_divert { | ||||
union { | union { | ||||
struct in_addr ipv4; | struct in_addr ipv4; | ||||
struct in6_addr ipv6; | struct in6_addr ipv6; | ||||
} addr; | } addr; | ||||
▲ Show 20 Lines • Show All 782 Lines • Show Last 20 Lines |