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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * Encode/decode function from/to API to internal types
19 #ifndef __IPSEC_TYPES_API_H__
20 #define __IPSEC_TYPES_API_H__
22 #include <vnet/ipsec/ipsec.h>
23 #include <vnet/ipsec/ipsec.api_types.h>
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);
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
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);
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);
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 *
48 * fd.io coding-style-patch-verification: ON
51 * eval: (c-set-style "gnu")