X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fipsec%2Fipsec_tun.h;h=840840335a56e586da35d145235b57ca5d56b09c;hb=12989b538881f9681f078cf1485c51df1251877a;hp=2041cbe758bba7929f71b3ccd0a1ac02d404c69c;hpb=f1653e62fe41e3df429aadaaab22d0cc8aaa227a;p=vpp.git diff --git a/src/vnet/ipsec/ipsec_tun.h b/src/vnet/ipsec/ipsec_tun.h index 2041cbe758b..840840335a5 100644 --- a/src/vnet/ipsec/ipsec_tun.h +++ b/src/vnet/ipsec/ipsec_tun.h @@ -17,6 +17,36 @@ #include +/* *INDENT-OFF* */ +typedef CLIB_PACKED(struct { + /* + * Key fields: remote ip and spi on incoming packet + * all fields in NET byte order + */ + union { + struct { + ip4_address_t remote_ip; + u32 spi; + }; + u64 as_u64; + }; +}) ipsec4_tunnel_key_t; +/* *INDENT-ON* */ + +/* *INDENT-OFF* */ +typedef CLIB_PACKED(struct { + /* + * Key fields: remote ip and spi on incoming packet + * all fields in NET byte order + */ + ip6_address_t remote_ip; + u32 spi; +}) ipsec6_tunnel_key_t; +/* *INDENT-ON* */ + +extern u8 *format_ipsec4_tunnel_key (u8 * s, va_list * args); +extern u8 *format_ipsec6_tunnel_key (u8 * s, va_list * args); + typedef enum ipsec_protect_flags_t_ { IPSEC_PROTECT_L2 = (1 << 0), @@ -66,8 +96,13 @@ typedef struct ipsec_tun_protect_t_ } \ } +extern int ipsec_tun_protect_update_one (u32 sw_if_index, u32 sa_out, + u32 sa_in); extern int ipsec_tun_protect_update (u32 sw_if_index, u32 sa_out, - u32 sa_ins[2]); + u32 * sa_ins); +extern int ipsec_tun_protect_update_in (u32 sw_if_index, u32 sa_in); +extern int ipsec_tun_protect_update_out (u32 sw_if_index, u32 sa_out); + extern int ipsec_tun_protect_del (u32 sw_if_index); typedef walk_rc_t (*ipsec_tun_protect_walk_cb_t) (index_t itpi, void *arg);