FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
ipsec_types_api.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * Encode/decode function from/to API to internal types
18  */
19 #ifndef __IPSEC_TYPES_API_H__
20 #define __IPSEC_TYPES_API_H__
21 
22 #include <vnet/ipsec/ipsec.h>
23 #include <vnet/ipsec/ipsec.api_types.h>
24 
25 extern int ipsec_proto_decode (vl_api_ipsec_proto_t in,
26  ipsec_protocol_t * out);
27 extern vl_api_ipsec_proto_t ipsec_proto_encode (ipsec_protocol_t p);
28 
29 extern int ipsec_crypto_algo_decode (vl_api_ipsec_crypto_alg_t in,
30  ipsec_crypto_alg_t * out);
31 extern vl_api_ipsec_crypto_alg_t ipsec_crypto_algo_encode (ipsec_crypto_alg_t
32  c);
33 
34 extern int ipsec_integ_algo_decode (vl_api_ipsec_integ_alg_t in,
35  ipsec_integ_alg_t * out);
36 extern vl_api_ipsec_integ_alg_t ipsec_integ_algo_encode (ipsec_integ_alg_t i);
37 
38 extern void ipsec_key_decode (const vl_api_key_t * key, ipsec_key_t * out);
39 extern void ipsec_key_encode (const ipsec_key_t * in, vl_api_key_t * out);
40 
41 extern ipsec_sa_flags_t ipsec_sa_flags_decode (vl_api_ipsec_sad_flags_t in);
42 extern vl_api_ipsec_sad_flags_t ipsec_sad_flags_encode (const ipsec_sa_t *
43  sa);
44 
45 #endif
46 
47 /*
48  * fd.io coding-style-patch-verification: ON
49  *
50  * Local Variables:
51  * eval: (c-set-style "gnu")
52  * End:
53  */
void ipsec_key_decode(const vl_api_key_t *key, ipsec_key_t *out)
void ipsec_key_encode(const ipsec_key_t *in, vl_api_key_t *out)
ipsec_integ_alg_t
Definition: ipsec_sa.h:59
vl_api_ipsec_crypto_alg_t ipsec_crypto_algo_encode(ipsec_crypto_alg_t c)
int ipsec_crypto_algo_decode(vl_api_ipsec_crypto_alg_t in, ipsec_crypto_alg_t *out)
ipsec_protocol_t
Definition: ipsec_sa.h:67
int ipsec_integ_algo_decode(vl_api_ipsec_integ_alg_t in, ipsec_integ_alg_t *out)
vl_api_ipsec_sad_flags_t ipsec_sad_flags_encode(const ipsec_sa_t *sa)
ipsec_sa_flags_t ipsec_sa_flags_decode(vl_api_ipsec_sad_flags_t in)
vl_api_ipsec_proto_t ipsec_proto_encode(ipsec_protocol_t p)
int ipsec_proto_decode(vl_api_ipsec_proto_t in, ipsec_protocol_t *out)
Encode/decode function from/to API to internal types.
svmdb_client_t * c
vl_api_ipsec_integ_alg_t ipsec_integ_algo_encode(ipsec_integ_alg_t i)
sll srl srl sll sra u16x4 i
Definition: vector_sse42.h:317
enum ipsec_sad_flags_t_ ipsec_sa_flags_t
typedef key
Definition: ipsec_types.api:85
ipsec_crypto_alg_t
Definition: ipsec_sa.h:37