1 // Code generated by GoVPP's binapi-generator. DO NOT EDIT.
3 // binapi-generator: v0.5.0-dev
5 // source: /usr/share/vpp/api/core/ipsec_types.api.json
7 // Package ipsec_types contains generated bindings for API file ipsec_types.api.
18 api "git.fd.io/govpp.git/api"
19 _ "git.fd.io/govpp.git/binapi/interface_types"
20 ip_types "git.fd.io/govpp.git/binapi/ip_types"
21 tunnel_types "git.fd.io/govpp.git/binapi/tunnel_types"
24 // This is a compile-time assertion to ensure that this generated file
25 // is compatible with the GoVPP api package it is being compiled against.
26 // A compilation error at this line likely means your copy of the
27 // GoVPP api package needs to be updated.
28 const _ = api.GoVppAPIPackageIsVersion2
30 // IpsecCryptoAlg defines enum 'ipsec_crypto_alg'.
31 type IpsecCryptoAlg uint32
34 IPSEC_API_CRYPTO_ALG_NONE IpsecCryptoAlg = 0
35 IPSEC_API_CRYPTO_ALG_AES_CBC_128 IpsecCryptoAlg = 1
36 IPSEC_API_CRYPTO_ALG_AES_CBC_192 IpsecCryptoAlg = 2
37 IPSEC_API_CRYPTO_ALG_AES_CBC_256 IpsecCryptoAlg = 3
38 IPSEC_API_CRYPTO_ALG_AES_CTR_128 IpsecCryptoAlg = 4
39 IPSEC_API_CRYPTO_ALG_AES_CTR_192 IpsecCryptoAlg = 5
40 IPSEC_API_CRYPTO_ALG_AES_CTR_256 IpsecCryptoAlg = 6
41 IPSEC_API_CRYPTO_ALG_AES_GCM_128 IpsecCryptoAlg = 7
42 IPSEC_API_CRYPTO_ALG_AES_GCM_192 IpsecCryptoAlg = 8
43 IPSEC_API_CRYPTO_ALG_AES_GCM_256 IpsecCryptoAlg = 9
44 IPSEC_API_CRYPTO_ALG_DES_CBC IpsecCryptoAlg = 10
45 IPSEC_API_CRYPTO_ALG_3DES_CBC IpsecCryptoAlg = 11
49 IpsecCryptoAlg_name = map[uint32]string{
50 0: "IPSEC_API_CRYPTO_ALG_NONE",
51 1: "IPSEC_API_CRYPTO_ALG_AES_CBC_128",
52 2: "IPSEC_API_CRYPTO_ALG_AES_CBC_192",
53 3: "IPSEC_API_CRYPTO_ALG_AES_CBC_256",
54 4: "IPSEC_API_CRYPTO_ALG_AES_CTR_128",
55 5: "IPSEC_API_CRYPTO_ALG_AES_CTR_192",
56 6: "IPSEC_API_CRYPTO_ALG_AES_CTR_256",
57 7: "IPSEC_API_CRYPTO_ALG_AES_GCM_128",
58 8: "IPSEC_API_CRYPTO_ALG_AES_GCM_192",
59 9: "IPSEC_API_CRYPTO_ALG_AES_GCM_256",
60 10: "IPSEC_API_CRYPTO_ALG_DES_CBC",
61 11: "IPSEC_API_CRYPTO_ALG_3DES_CBC",
63 IpsecCryptoAlg_value = map[string]uint32{
64 "IPSEC_API_CRYPTO_ALG_NONE": 0,
65 "IPSEC_API_CRYPTO_ALG_AES_CBC_128": 1,
66 "IPSEC_API_CRYPTO_ALG_AES_CBC_192": 2,
67 "IPSEC_API_CRYPTO_ALG_AES_CBC_256": 3,
68 "IPSEC_API_CRYPTO_ALG_AES_CTR_128": 4,
69 "IPSEC_API_CRYPTO_ALG_AES_CTR_192": 5,
70 "IPSEC_API_CRYPTO_ALG_AES_CTR_256": 6,
71 "IPSEC_API_CRYPTO_ALG_AES_GCM_128": 7,
72 "IPSEC_API_CRYPTO_ALG_AES_GCM_192": 8,
73 "IPSEC_API_CRYPTO_ALG_AES_GCM_256": 9,
74 "IPSEC_API_CRYPTO_ALG_DES_CBC": 10,
75 "IPSEC_API_CRYPTO_ALG_3DES_CBC": 11,
79 func (x IpsecCryptoAlg) String() string {
80 s, ok := IpsecCryptoAlg_name[uint32(x)]
84 return "IpsecCryptoAlg(" + strconv.Itoa(int(x)) + ")"
87 // IpsecIntegAlg defines enum 'ipsec_integ_alg'.
88 type IpsecIntegAlg uint32
91 IPSEC_API_INTEG_ALG_NONE IpsecIntegAlg = 0
92 IPSEC_API_INTEG_ALG_MD5_96 IpsecIntegAlg = 1
93 IPSEC_API_INTEG_ALG_SHA1_96 IpsecIntegAlg = 2
94 IPSEC_API_INTEG_ALG_SHA_256_96 IpsecIntegAlg = 3
95 IPSEC_API_INTEG_ALG_SHA_256_128 IpsecIntegAlg = 4
96 IPSEC_API_INTEG_ALG_SHA_384_192 IpsecIntegAlg = 5
97 IPSEC_API_INTEG_ALG_SHA_512_256 IpsecIntegAlg = 6
101 IpsecIntegAlg_name = map[uint32]string{
102 0: "IPSEC_API_INTEG_ALG_NONE",
103 1: "IPSEC_API_INTEG_ALG_MD5_96",
104 2: "IPSEC_API_INTEG_ALG_SHA1_96",
105 3: "IPSEC_API_INTEG_ALG_SHA_256_96",
106 4: "IPSEC_API_INTEG_ALG_SHA_256_128",
107 5: "IPSEC_API_INTEG_ALG_SHA_384_192",
108 6: "IPSEC_API_INTEG_ALG_SHA_512_256",
110 IpsecIntegAlg_value = map[string]uint32{
111 "IPSEC_API_INTEG_ALG_NONE": 0,
112 "IPSEC_API_INTEG_ALG_MD5_96": 1,
113 "IPSEC_API_INTEG_ALG_SHA1_96": 2,
114 "IPSEC_API_INTEG_ALG_SHA_256_96": 3,
115 "IPSEC_API_INTEG_ALG_SHA_256_128": 4,
116 "IPSEC_API_INTEG_ALG_SHA_384_192": 5,
117 "IPSEC_API_INTEG_ALG_SHA_512_256": 6,
121 func (x IpsecIntegAlg) String() string {
122 s, ok := IpsecIntegAlg_name[uint32(x)]
126 return "IpsecIntegAlg(" + strconv.Itoa(int(x)) + ")"
129 // IpsecProto defines enum 'ipsec_proto'.
130 type IpsecProto uint32
133 IPSEC_API_PROTO_ESP IpsecProto = 50
134 IPSEC_API_PROTO_AH IpsecProto = 51
138 IpsecProto_name = map[uint32]string{
139 50: "IPSEC_API_PROTO_ESP",
140 51: "IPSEC_API_PROTO_AH",
142 IpsecProto_value = map[string]uint32{
143 "IPSEC_API_PROTO_ESP": 50,
144 "IPSEC_API_PROTO_AH": 51,
148 func (x IpsecProto) String() string {
149 s, ok := IpsecProto_name[uint32(x)]
153 return "IpsecProto(" + strconv.Itoa(int(x)) + ")"
156 // IpsecSadFlags defines enum 'ipsec_sad_flags'.
157 type IpsecSadFlags uint32
160 IPSEC_API_SAD_FLAG_NONE IpsecSadFlags = 0
161 IPSEC_API_SAD_FLAG_USE_ESN IpsecSadFlags = 1
162 IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY IpsecSadFlags = 2
163 IPSEC_API_SAD_FLAG_IS_TUNNEL IpsecSadFlags = 4
164 IPSEC_API_SAD_FLAG_IS_TUNNEL_V6 IpsecSadFlags = 8
165 IPSEC_API_SAD_FLAG_UDP_ENCAP IpsecSadFlags = 16
166 IPSEC_API_SAD_FLAG_IS_INBOUND IpsecSadFlags = 64
167 IPSEC_API_SAD_FLAG_ASYNC IpsecSadFlags = 128
171 IpsecSadFlags_name = map[uint32]string{
172 0: "IPSEC_API_SAD_FLAG_NONE",
173 1: "IPSEC_API_SAD_FLAG_USE_ESN",
174 2: "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY",
175 4: "IPSEC_API_SAD_FLAG_IS_TUNNEL",
176 8: "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6",
177 16: "IPSEC_API_SAD_FLAG_UDP_ENCAP",
178 64: "IPSEC_API_SAD_FLAG_IS_INBOUND",
179 128: "IPSEC_API_SAD_FLAG_ASYNC",
181 IpsecSadFlags_value = map[string]uint32{
182 "IPSEC_API_SAD_FLAG_NONE": 0,
183 "IPSEC_API_SAD_FLAG_USE_ESN": 1,
184 "IPSEC_API_SAD_FLAG_USE_ANTI_REPLAY": 2,
185 "IPSEC_API_SAD_FLAG_IS_TUNNEL": 4,
186 "IPSEC_API_SAD_FLAG_IS_TUNNEL_V6": 8,
187 "IPSEC_API_SAD_FLAG_UDP_ENCAP": 16,
188 "IPSEC_API_SAD_FLAG_IS_INBOUND": 64,
189 "IPSEC_API_SAD_FLAG_ASYNC": 128,
193 func (x IpsecSadFlags) String() string {
194 s, ok := IpsecSadFlags_name[uint32(x)]
198 str := func(n uint32) string {
199 s, ok := IpsecSadFlags_name[uint32(n)]
203 return "IpsecSadFlags(" + strconv.Itoa(int(n)) + ")"
205 for i := uint32(0); i <= 32; i++ {
215 return str(uint32(x))
220 // IpsecSadEntry defines type 'ipsec_sad_entry'.
221 type IpsecSadEntry struct {
222 SadID uint32 `binapi:"u32,name=sad_id" json:"sad_id,omitempty"`
223 Spi uint32 `binapi:"u32,name=spi" json:"spi,omitempty"`
224 Protocol IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
225 CryptoAlgorithm IpsecCryptoAlg `binapi:"ipsec_crypto_alg,name=crypto_algorithm" json:"crypto_algorithm,omitempty"`
226 CryptoKey Key `binapi:"key,name=crypto_key" json:"crypto_key,omitempty"`
227 IntegrityAlgorithm IpsecIntegAlg `binapi:"ipsec_integ_alg,name=integrity_algorithm" json:"integrity_algorithm,omitempty"`
228 IntegrityKey Key `binapi:"key,name=integrity_key" json:"integrity_key,omitempty"`
229 Flags IpsecSadFlags `binapi:"ipsec_sad_flags,name=flags" json:"flags,omitempty"`
230 TunnelSrc ip_types.Address `binapi:"address,name=tunnel_src" json:"tunnel_src,omitempty"`
231 TunnelDst ip_types.Address `binapi:"address,name=tunnel_dst" json:"tunnel_dst,omitempty"`
232 TxTableID uint32 `binapi:"u32,name=tx_table_id" json:"tx_table_id,omitempty"`
233 Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
234 UDPSrcPort uint16 `binapi:"u16,name=udp_src_port,default=4500" json:"udp_src_port,omitempty"`
235 UDPDstPort uint16 `binapi:"u16,name=udp_dst_port,default=4500" json:"udp_dst_port,omitempty"`
238 // IpsecSadEntryV2 defines type 'ipsec_sad_entry_v2'.
239 type IpsecSadEntryV2 struct {
240 SadID uint32 `binapi:"u32,name=sad_id" json:"sad_id,omitempty"`
241 Spi uint32 `binapi:"u32,name=spi" json:"spi,omitempty"`
242 Protocol IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
243 CryptoAlgorithm IpsecCryptoAlg `binapi:"ipsec_crypto_alg,name=crypto_algorithm" json:"crypto_algorithm,omitempty"`
244 CryptoKey Key `binapi:"key,name=crypto_key" json:"crypto_key,omitempty"`
245 IntegrityAlgorithm IpsecIntegAlg `binapi:"ipsec_integ_alg,name=integrity_algorithm" json:"integrity_algorithm,omitempty"`
246 IntegrityKey Key `binapi:"key,name=integrity_key" json:"integrity_key,omitempty"`
247 Flags IpsecSadFlags `binapi:"ipsec_sad_flags,name=flags" json:"flags,omitempty"`
248 TunnelSrc ip_types.Address `binapi:"address,name=tunnel_src" json:"tunnel_src,omitempty"`
249 TunnelDst ip_types.Address `binapi:"address,name=tunnel_dst" json:"tunnel_dst,omitempty"`
250 TunnelFlags tunnel_types.TunnelEncapDecapFlags `binapi:"tunnel_encap_decap_flags,name=tunnel_flags" json:"tunnel_flags,omitempty"`
251 Dscp ip_types.IPDscp `binapi:"ip_dscp,name=dscp" json:"dscp,omitempty"`
252 TxTableID uint32 `binapi:"u32,name=tx_table_id" json:"tx_table_id,omitempty"`
253 Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
254 UDPSrcPort uint16 `binapi:"u16,name=udp_src_port,default=4500" json:"udp_src_port,omitempty"`
255 UDPDstPort uint16 `binapi:"u16,name=udp_dst_port,default=4500" json:"udp_dst_port,omitempty"`
258 // IpsecSadEntryV3 defines type 'ipsec_sad_entry_v3'.
259 type IpsecSadEntryV3 struct {
260 SadID uint32 `binapi:"u32,name=sad_id" json:"sad_id,omitempty"`
261 Spi uint32 `binapi:"u32,name=spi" json:"spi,omitempty"`
262 Protocol IpsecProto `binapi:"ipsec_proto,name=protocol" json:"protocol,omitempty"`
263 CryptoAlgorithm IpsecCryptoAlg `binapi:"ipsec_crypto_alg,name=crypto_algorithm" json:"crypto_algorithm,omitempty"`
264 CryptoKey Key `binapi:"key,name=crypto_key" json:"crypto_key,omitempty"`
265 IntegrityAlgorithm IpsecIntegAlg `binapi:"ipsec_integ_alg,name=integrity_algorithm" json:"integrity_algorithm,omitempty"`
266 IntegrityKey Key `binapi:"key,name=integrity_key" json:"integrity_key,omitempty"`
267 Flags IpsecSadFlags `binapi:"ipsec_sad_flags,name=flags" json:"flags,omitempty"`
268 Tunnel tunnel_types.Tunnel `binapi:"tunnel,name=tunnel" json:"tunnel,omitempty"`
269 Salt uint32 `binapi:"u32,name=salt" json:"salt,omitempty"`
270 UDPSrcPort uint16 `binapi:"u16,name=udp_src_port,default=4500" json:"udp_src_port,omitempty"`
271 UDPDstPort uint16 `binapi:"u16,name=udp_dst_port,default=4500" json:"udp_dst_port,omitempty"`
274 // Key defines type 'key'.
276 Length uint8 `binapi:"u8,name=length" json:"length,omitempty"`
277 Data []byte `binapi:"u8[128],name=data" json:"data,omitempty"`