Changeset View
Changeset View
Standalone View
Standalone View
head/sys/netpfil/ipfw/ip_fw_private.h
Show First 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | #define IPFW_ARGS_LENGTH(f) ((f) & IPFW_ARGS_LENMASK) | ||||
* Otherwise, we locate the first rule >= rulenum:rule_id | * Otherwise, we locate the first rule >= rulenum:rule_id | ||||
*/ | */ | ||||
struct ipfw_rule_ref rule; /* match/restart info */ | struct ipfw_rule_ref rule; /* match/restart info */ | ||||
struct ifnet *ifp; /* input/output interface */ | struct ifnet *ifp; /* input/output interface */ | ||||
struct inpcb *inp; | struct inpcb *inp; | ||||
union { | union { | ||||
/* | /* | ||||
* We don't support forwarding on layer2, thus we can | |||||
* keep eh pointer in this union. | |||||
* next_hop[6] pointers can be used to point to next hop | * next_hop[6] pointers can be used to point to next hop | ||||
* stored in rule's opcode to avoid copying into hopstore. | * stored in rule's opcode to avoid copying into hopstore. | ||||
* Also, it is expected that all 0x1-0x10 flags are mutually | * Also, it is expected that all 0x1-0x10 flags are mutually | ||||
* exclusive. | * exclusive. | ||||
*/ | */ | ||||
struct ether_header *eh; /* for bridged packets */ | |||||
struct sockaddr_in *next_hop; | struct sockaddr_in *next_hop; | ||||
struct sockaddr_in6 *next_hop6; | struct sockaddr_in6 *next_hop6; | ||||
/* ipfw next hop storage */ | /* ipfw next hop storage */ | ||||
struct sockaddr_in hopstore; | struct sockaddr_in hopstore; | ||||
struct ip_fw_nh6 { | struct ip_fw_nh6 { | ||||
struct in6_addr sin6_addr; | struct in6_addr sin6_addr; | ||||
uint32_t sin6_scope_id; | uint32_t sin6_scope_id; | ||||
uint16_t sin6_port; | uint16_t sin6_port; | ||||
} hopstore6; | } hopstore6; | ||||
}; | }; | ||||
union { | |||||
struct mbuf *m; /* the mbuf chain */ | struct mbuf *m; /* the mbuf chain */ | ||||
void *mem; /* or memory pointer */ | |||||
}; | |||||
struct ipfw_flow_id f_id; /* grabbed from IP header */ | struct ipfw_flow_id f_id; /* grabbed from IP header */ | ||||
}; | }; | ||||
MALLOC_DECLARE(M_IPFW); | MALLOC_DECLARE(M_IPFW); | ||||
/* wrapper for freeing a packet, in case we need to do more work */ | /* wrapper for freeing a packet, in case we need to do more work */ | ||||
#ifndef FREE_PKT | #ifndef FREE_PKT | ||||
#if defined(__linux__) || defined(_WIN32) | #if defined(__linux__) || defined(_WIN32) | ||||
Show All 17 Lines | |||||
#endif | #endif | ||||
/* In ip_fw_log.c */ | /* In ip_fw_log.c */ | ||||
struct ip; | struct ip; | ||||
struct ip_fw_chain; | struct ip_fw_chain; | ||||
void ipfw_bpf_init(int); | void ipfw_bpf_init(int); | ||||
void ipfw_bpf_uninit(int); | void ipfw_bpf_uninit(int); | ||||
void ipfw_bpf_tap(u_char *, u_int); | |||||
void ipfw_bpf_mtap(struct mbuf *); | |||||
void ipfw_bpf_mtap2(void *, u_int, struct mbuf *); | void ipfw_bpf_mtap2(void *, u_int, struct mbuf *); | ||||
void ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, | void ipfw_log(struct ip_fw_chain *chain, struct ip_fw *f, u_int hlen, | ||||
struct ip_fw_args *args, struct mbuf *m, | struct ip_fw_args *args, u_short offset, uint32_t tablearg, struct ip *ip); | ||||
u_short offset, uint32_t tablearg, struct ip *ip); | |||||
VNET_DECLARE(u_int64_t, norule_counter); | VNET_DECLARE(u_int64_t, norule_counter); | ||||
#define V_norule_counter VNET(norule_counter) | #define V_norule_counter VNET(norule_counter) | ||||
VNET_DECLARE(int, verbose_limit); | VNET_DECLARE(int, verbose_limit); | ||||
#define V_verbose_limit VNET(verbose_limit) | #define V_verbose_limit VNET(verbose_limit) | ||||
/* In ip_fw_dynamic.c */ | /* In ip_fw_dynamic.c */ | ||||
struct sockopt_data; | struct sockopt_data; | ||||
▲ Show 20 Lines • Show All 645 Lines • Show Last 20 Lines |