Changeset View
Changeset View
Standalone View
Standalone View
sys/net/pfvar.h
Show First 20 Lines • Show All 934 Lines • ▼ Show 20 Lines | struct pf_state_peer { | ||||
u_int16_t max_win; /* largest window (pre scaling) */ | u_int16_t max_win; /* largest window (pre scaling) */ | ||||
u_int16_t mss; /* Maximum segment size option */ | u_int16_t mss; /* Maximum segment size option */ | ||||
u_int8_t state; /* active state level */ | u_int8_t state; /* active state level */ | ||||
u_int8_t wscale; /* window scaling factor */ | u_int8_t wscale; /* window scaling factor */ | ||||
u_int8_t tcp_est; /* Did we reach TCPS_ESTABLISHED */ | u_int8_t tcp_est; /* Did we reach TCPS_ESTABLISHED */ | ||||
u_int8_t pad[1]; | u_int8_t pad[1]; | ||||
}; | }; | ||||
/* Keep synced with struct pf_udp_endpoint. */ | |||||
struct pf_udp_endpoint_cmp { | |||||
struct pf_addr addr; | |||||
kp: Space out addr/port/... with tabs, not spaces. | |||||
uint16_t port; | |||||
sa_family_t af; | |||||
uint8_t pad[1]; | |||||
}; | |||||
struct pf_udp_endpoint { | |||||
struct pf_addr addr; | |||||
Done Inline ActionsSpace out addr/port/... with tabs, not spaces. kp: Space out addr/port/... with tabs, not spaces. | |||||
uint16_t port; | |||||
Not Done Inline ActionsPlease use new C standard uintXX_t types instead of historic u_intXX_t in new code. glebius: Please use new C standard uintXX_t types instead of historic u_intXX_t in new code. | |||||
sa_family_t af; | |||||
uint8_t pad[1]; | |||||
struct pf_udp_mapping *mapping; | |||||
LIST_ENTRY(pf_udp_endpoint) entry; | |||||
}; | |||||
struct pf_udp_mapping { | |||||
struct pf_udp_endpoint endpoints[2]; | |||||
kpUnsubmitted Not Done Inline ActionsWhy two endpoints? kp: Why two endpoints? | |||||
u_int refs; | |||||
}; | |||||
/* Keep synced with struct pf_state_key. */ | /* Keep synced with struct pf_state_key. */ | ||||
struct pf_state_key_cmp { | struct pf_state_key_cmp { | ||||
struct pf_addr addr[2]; | struct pf_addr addr[2]; | ||||
u_int16_t port[2]; | u_int16_t port[2]; | ||||
sa_family_t af; | sa_family_t af; | ||||
u_int8_t proto; | u_int8_t proto; | ||||
u_int8_t pad[2]; | u_int8_t pad[2]; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 1,325 Lines • ▼ Show 20 Lines | |||||
extern struct pf_kstate *pf_find_state_byid(uint64_t, uint32_t); | extern struct pf_kstate *pf_find_state_byid(uint64_t, uint32_t); | ||||
extern struct pf_kstate *pf_find_state_all( | extern struct pf_kstate *pf_find_state_all( | ||||
const struct pf_state_key_cmp *, | const struct pf_state_key_cmp *, | ||||
u_int, int *); | u_int, int *); | ||||
extern bool pf_find_state_all_exists( | extern bool pf_find_state_all_exists( | ||||
const struct pf_state_key_cmp *, | const struct pf_state_key_cmp *, | ||||
u_int); | u_int); | ||||
extern struct pf_udp_mapping *pf_udp_mapping_find(struct pf_udp_endpoint_cmp | |||||
*endpoint); | |||||
extern struct pf_udp_mapping *pf_udp_mapping_create(sa_family_t af, | |||||
struct pf_addr *src_addr, uint16_t src_port, | |||||
struct pf_addr *nat_addr, uint16_t nat_port); | |||||
extern int pf_udp_mapping_insert(struct pf_udp_mapping | |||||
*mapping); | |||||
extern void pf_udp_mapping_release(struct pf_udp_mapping | |||||
*mapping); | |||||
extern struct pf_ksrc_node *pf_find_src_node(struct pf_addr *, | extern struct pf_ksrc_node *pf_find_src_node(struct pf_addr *, | ||||
struct pf_krule *, sa_family_t, | struct pf_krule *, sa_family_t, | ||||
struct pf_srchash **, bool); | struct pf_srchash **, bool); | ||||
extern void pf_unlink_src_node(struct pf_ksrc_node *); | extern void pf_unlink_src_node(struct pf_ksrc_node *); | ||||
extern u_int pf_free_src_nodes(struct pf_ksrc_node_list *); | extern u_int pf_free_src_nodes(struct pf_ksrc_node_list *); | ||||
extern void pf_print_state(struct pf_kstate *); | extern void pf_print_state(struct pf_kstate *); | ||||
extern void pf_print_flags(u_int8_t); | extern void pf_print_flags(u_int8_t); | ||||
extern int pf_addr_wrap_neq(struct pf_addr_wrap *, | extern int pf_addr_wrap_neq(struct pf_addr_wrap *, | ||||
▲ Show 20 Lines • Show All 306 Lines • Show Last 20 Lines |
Space out addr/port/... with tabs, not spaces.