diff options
author | Neale Ranns <nranns@cisco.com> | 2019-12-29 23:55:18 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-01-27 20:40:30 +0000 |
commit | 59ff918ea5b86112ffc89054aa38107703354585 (patch) | |
tree | 0e6dc887ead19b7be828954a08b1e15da81ddb58 /src/vnet/tunnel/tunnel_types_api.h | |
parent | 3b37125bdb0251181f90a429a4532b339711cf89 (diff) |
tunnel: Common types for IP tunnels
Type: refactor
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: I18dcdb7af3e327f6cacdbcb1e52b89f13d6ba6e2
Diffstat (limited to 'src/vnet/tunnel/tunnel_types_api.h')
-rw-r--r-- | src/vnet/tunnel/tunnel_types_api.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/vnet/tunnel/tunnel_types_api.h b/src/vnet/tunnel/tunnel_types_api.h new file mode 100644 index 00000000000..06439dc87c1 --- /dev/null +++ b/src/vnet/tunnel/tunnel_types_api.h @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2018 Cisco and/or its affiliates. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __TUNNEL_TYPES_API_H__ +#define __TUNNEL_TYPES_API_H__ + +/** + * Conversion functions to/from (decode/encode) API types to VPP internal types + */ + +#include <vnet/tunnel/tunnel.h> +#include <vnet/tunnel/tunnel_types.api_types.h> + +/** + * These enum decode/encodes use 'int' as the type for the enum because + * one cannot forward declare an enum + */ +extern int tunnel_encap_decap_flags_decode (vl_api_tunnel_encap_decap_flags_t + _f, + tunnel_encap_decap_flags_t * out); +extern vl_api_tunnel_encap_decap_flags_t +tunnel_encap_decap_flags_encode (tunnel_encap_decap_flags_t f); + +extern int tunnel_mode_decode (vl_api_tunnel_mode_t in, tunnel_mode_t * out); +extern vl_api_tunnel_mode_t tunnel_mode_encode (tunnel_mode_t in); + +#endif + +/* + * fd.io coding-style-patch-verification: ON + * + * Local Variables: + * eval: (c-set-style "gnu") + * End: + */ |