Changeset View
Changeset View
Standalone View
Standalone View
sys/netipsec/ipsec_support.h
Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | |||||
#define IPSEC_OUTPUT(proto, m, ...) \ | #define IPSEC_OUTPUT(proto, m, ...) \ | ||||
(*(proto ## _ipsec_support)->methods->output)(m, __VA_ARGS__) | (*(proto ## _ipsec_support)->methods->output)(m, __VA_ARGS__) | ||||
#define IPSEC_PCBCTL(proto, inp, sopt) \ | #define IPSEC_PCBCTL(proto, inp, sopt) \ | ||||
(*(proto ## _ipsec_support)->methods->pcbctl)(inp, sopt) | (*(proto ## _ipsec_support)->methods->pcbctl)(inp, sopt) | ||||
#define IPSEC_CAPS(proto, m, ...) \ | #define IPSEC_CAPS(proto, m, ...) \ | ||||
(*(proto ## _ipsec_support)->methods->capability)(m, __VA_ARGS__) | (*(proto ## _ipsec_support)->methods->capability)(m, __VA_ARGS__) | ||||
#define IPSEC_HDRSIZE(proto, inp) \ | #define IPSEC_HDRSIZE(proto, inp) \ | ||||
(*(proto ## _ipsec_support)->methods->hdrsize)(inp) | (*(proto ## _ipsec_support)->methods->hdrsize)(inp) | ||||
#define IPSEC_CTLINPUT(proto, code, sa, v) \ | |||||
(*(proto ## _ipsec_support)->methods->ctlinput)(code, sa, v) | |||||
#define UDPENCAP_INPUT(m, ...) \ | #define UDPENCAP_INPUT(m, ...) \ | ||||
(*ipv4_ipsec_support->methods->udp_input)(m, __VA_ARGS__) | (*ipv4_ipsec_support->methods->udp_input)(m, __VA_ARGS__) | ||||
#define UDPENCAP_PCBCTL(inp, sopt) \ | #define UDPENCAP_PCBCTL(inp, sopt) \ | ||||
(*ipv4_ipsec_support->methods->udp_pcbctl)(inp, sopt) | (*ipv4_ipsec_support->methods->udp_pcbctl)(inp, sopt) | ||||
#elif defined(IPSEC_SUPPORT) | #elif defined(IPSEC_SUPPORT) | ||||
struct ipsec_support { | struct ipsec_support { | ||||
Show All 12 Lines | int ipsec_kmod_check_policy(struct ipsec_support * const, struct mbuf *, | ||||
struct inpcb *); | struct inpcb *); | ||||
int ipsec_kmod_forward(struct ipsec_support * const, struct mbuf *); | int ipsec_kmod_forward(struct ipsec_support * const, struct mbuf *); | ||||
int ipsec_kmod_output(struct ipsec_support * const, struct mbuf *, | int ipsec_kmod_output(struct ipsec_support * const, struct mbuf *, | ||||
struct inpcb *); | struct inpcb *); | ||||
int ipsec_kmod_pcbctl(struct ipsec_support * const, struct inpcb *, | int ipsec_kmod_pcbctl(struct ipsec_support * const, struct inpcb *, | ||||
struct sockopt *); | struct sockopt *); | ||||
int ipsec_kmod_capability(struct ipsec_support * const, struct mbuf *, u_int); | int ipsec_kmod_capability(struct ipsec_support * const, struct mbuf *, u_int); | ||||
size_t ipsec_kmod_hdrsize(struct ipsec_support * const, struct inpcb *); | size_t ipsec_kmod_hdrsize(struct ipsec_support * const, struct inpcb *); | ||||
int ipsec_kmod_ctlinput(struct ipsec_support * const, int, | |||||
struct sockaddr *, void *); | |||||
int ipsec_kmod_udp_input(struct ipsec_support * const, struct mbuf *, int, int); | int ipsec_kmod_udp_input(struct ipsec_support * const, struct mbuf *, int, int); | ||||
int ipsec_kmod_udp_pcbctl(struct ipsec_support * const, struct inpcb *, | int ipsec_kmod_udp_pcbctl(struct ipsec_support * const, struct inpcb *, | ||||
struct sockopt *); | struct sockopt *); | ||||
#define UDPENCAP_INPUT(m, ...) \ | #define UDPENCAP_INPUT(m, ...) \ | ||||
ipsec_kmod_udp_input(ipv4_ipsec_support, m, __VA_ARGS__) | ipsec_kmod_udp_input(ipv4_ipsec_support, m, __VA_ARGS__) | ||||
#define UDPENCAP_PCBCTL(inp, sopt) \ | #define UDPENCAP_PCBCTL(inp, sopt) \ | ||||
ipsec_kmod_udp_pcbctl(ipv4_ipsec_support, inp, sopt) | ipsec_kmod_udp_pcbctl(ipv4_ipsec_support, inp, sopt) | ||||
#define IPSEC_INPUT(proto, ...) \ | #define IPSEC_INPUT(proto, ...) \ | ||||
ipsec_kmod_input(proto ## _ipsec_support, __VA_ARGS__) | ipsec_kmod_input(proto ## _ipsec_support, __VA_ARGS__) | ||||
#define IPSEC_CHECK_POLICY(proto, ...) \ | #define IPSEC_CHECK_POLICY(proto, ...) \ | ||||
ipsec_kmod_check_policy(proto ## _ipsec_support, __VA_ARGS__) | ipsec_kmod_check_policy(proto ## _ipsec_support, __VA_ARGS__) | ||||
#define IPSEC_FORWARD(proto, ...) \ | #define IPSEC_FORWARD(proto, ...) \ | ||||
ipsec_kmod_forward(proto ## _ipsec_support, __VA_ARGS__) | ipsec_kmod_forward(proto ## _ipsec_support, __VA_ARGS__) | ||||
#define IPSEC_OUTPUT(proto, ...) \ | #define IPSEC_OUTPUT(proto, ...) \ | ||||
ipsec_kmod_output(proto ## _ipsec_support, __VA_ARGS__) | ipsec_kmod_output(proto ## _ipsec_support, __VA_ARGS__) | ||||
#define IPSEC_PCBCTL(proto, ...) \ | #define IPSEC_PCBCTL(proto, ...) \ | ||||
ipsec_kmod_pcbctl(proto ## _ipsec_support, __VA_ARGS__) | ipsec_kmod_pcbctl(proto ## _ipsec_support, __VA_ARGS__) | ||||
#define IPSEC_CAPS(proto, ...) \ | #define IPSEC_CAPS(proto, ...) \ | ||||
ipsec_kmod_capability(proto ## _ipsec_support, __VA_ARGS__) | ipsec_kmod_capability(proto ## _ipsec_support, __VA_ARGS__) | ||||
#define IPSEC_HDRSIZE(proto, ...) \ | #define IPSEC_HDRSIZE(proto, ...) \ | ||||
ipsec_kmod_hdrsize(proto ## _ipsec_support, __VA_ARGS__) | ipsec_kmod_hdrsize(proto ## _ipsec_support, __VA_ARGS__) | ||||
#define IPSEC_CTLINPUT(proto, ...) \ | |||||
ipsec_kmod_ctlinput(proto ## _ipsec_support, __VA_ARGS__) | |||||
#endif /* IPSEC_SUPPORT */ | #endif /* IPSEC_SUPPORT */ | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _NETIPSEC_IPSEC_SUPPORT_H_ */ | #endif /* _NETIPSEC_IPSEC_SUPPORT_H_ */ |