Changeset View
Changeset View
Standalone View
Standalone View
sys/netipsec/ipsec_support.h
Show All 23 Lines | |||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
*/ | */ | ||||
#ifndef _NETIPSEC_IPSEC_SUPPORT_H_ | #ifndef _NETIPSEC_IPSEC_SUPPORT_H_ | ||||
#define _NETIPSEC_IPSEC_SUPPORT_H_ | #define _NETIPSEC_IPSEC_SUPPORT_H_ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#if defined(IPSEC) || defined(IPSEC_SUPPORT) | #if defined(IPSEC) || defined(IPSEC_SUPPORT) | ||||
struct ifnet; | |||||
struct mbuf; | struct mbuf; | ||||
struct inpcb; | struct inpcb; | ||||
struct tcphdr; | struct tcphdr; | ||||
struct sockopt; | struct sockopt; | ||||
struct sockaddr; | struct sockaddr; | ||||
struct ipsec_support; | struct ipsec_support; | ||||
struct tcpmd5_support; | struct tcpmd5_support; | ||||
struct icmp; | struct icmp; | ||||
Show All 13 Lines | |||||
int udp_ipsec_input(struct mbuf *, int, int); | int udp_ipsec_input(struct mbuf *, int, int); | ||||
int udp_ipsec_pcbctl(struct inpcb *, struct sockopt *); | int udp_ipsec_pcbctl(struct inpcb *, struct sockopt *); | ||||
#endif | #endif | ||||
#ifdef INET | #ifdef INET | ||||
int ipsec4_in_reject(const struct mbuf *, struct inpcb *); | int ipsec4_in_reject(const struct mbuf *, struct inpcb *); | ||||
int ipsec4_input(struct mbuf *, int, int); | int ipsec4_input(struct mbuf *, int, int); | ||||
int ipsec4_forward(struct mbuf *); | int ipsec4_forward(struct mbuf *); | ||||
int ipsec4_pcbctl(struct inpcb *, struct sockopt *); | int ipsec4_pcbctl(struct inpcb *, struct sockopt *); | ||||
int ipsec4_output(struct mbuf *, struct inpcb *); | int ipsec4_output(struct ifnet *, struct mbuf *, struct inpcb *); | ||||
int ipsec4_capability(struct mbuf *, u_int); | int ipsec4_capability(struct mbuf *, u_int); | ||||
int ipsec4_ctlinput(ipsec_ctlinput_param_t); | int ipsec4_ctlinput(ipsec_ctlinput_param_t); | ||||
#endif /* INET */ | #endif /* INET */ | ||||
#ifdef INET6 | #ifdef INET6 | ||||
int ipsec6_input(struct mbuf *, int, int); | int ipsec6_input(struct mbuf *, int, int); | ||||
int ipsec6_in_reject(const struct mbuf *, struct inpcb *); | int ipsec6_in_reject(const struct mbuf *, struct inpcb *); | ||||
int ipsec6_forward(struct mbuf *); | int ipsec6_forward(struct mbuf *); | ||||
int ipsec6_pcbctl(struct inpcb *, struct sockopt *); | int ipsec6_pcbctl(struct inpcb *, struct sockopt *); | ||||
int ipsec6_output(struct mbuf *, struct inpcb *); | int ipsec6_output(struct ifnet *, struct mbuf *, struct inpcb *); | ||||
int ipsec6_capability(struct mbuf *, u_int); | int ipsec6_capability(struct mbuf *, u_int); | ||||
int ipsec6_ctlinput(ipsec_ctlinput_param_t); | int ipsec6_ctlinput(ipsec_ctlinput_param_t); | ||||
#endif /* INET6 */ | #endif /* INET6 */ | ||||
struct ipsec_methods { | struct ipsec_methods { | ||||
int (*input)(struct mbuf *, int, int); | int (*input)(struct mbuf *, int, int); | ||||
int (*check_policy)(const struct mbuf *, struct inpcb *); | int (*check_policy)(const struct mbuf *, struct inpcb *); | ||||
int (*forward)(struct mbuf *); | int (*forward)(struct mbuf *); | ||||
int (*output)(struct mbuf *, struct inpcb *); | int (*output)(struct ifnet *, struct mbuf *, struct inpcb *); | ||||
int (*pcbctl)(struct inpcb *, struct sockopt *); | int (*pcbctl)(struct inpcb *, struct sockopt *); | ||||
size_t (*hdrsize)(struct inpcb *); | size_t (*hdrsize)(struct inpcb *); | ||||
int (*capability)(struct mbuf *, u_int); | int (*capability)(struct mbuf *, u_int); | ||||
int (*ctlinput)(ipsec_ctlinput_param_t); | int (*ctlinput)(ipsec_ctlinput_param_t); | ||||
int (*udp_input)(struct mbuf *, int, int); | int (*udp_input)(struct mbuf *, int, int); | ||||
int (*udp_pcbctl)(struct inpcb *, struct sockopt *); | int (*udp_pcbctl)(struct inpcb *, struct sockopt *); | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | |||||
void ipsec_support_enable(struct ipsec_support * const, | void ipsec_support_enable(struct ipsec_support * const, | ||||
const struct ipsec_methods * const); | const struct ipsec_methods * const); | ||||
void ipsec_support_disable(struct ipsec_support * const); | void ipsec_support_disable(struct ipsec_support * const); | ||||
int ipsec_kmod_input(struct ipsec_support * const, struct mbuf *, int, int); | int ipsec_kmod_input(struct ipsec_support * const, struct mbuf *, int, int); | ||||
int ipsec_kmod_check_policy(struct ipsec_support * const, struct mbuf *, | 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 ifnet *, | ||||
struct inpcb *); | struct mbuf *, 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 *, ipsec_ctlinput_param_t); | int ipsec_kmod_ctlinput(struct ipsec_support *, ipsec_ctlinput_param_t); | ||||
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 *); | ||||
Show All 25 Lines |