2 * ipip_api.c - ipip api
4 * Copyright (c) 2018 Cisco and/or its affiliates.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at:
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #include <vnet/api_errno.h>
19 #include <vnet/ipip/ipip_types_api.h>
21 #include <vnet/ipip/ipip_types.api_enum.h>
22 #include <vnet/ipip/ipip_types.api_types.h>
25 STATIC_ASSERT (sizeof (vl_api_ipip_tunnel_flags_t) ==
26 sizeof (ipip_tunnel_flags_t),
27 "IPIP tunnel API and internal flags enum size differ");
30 ipip_tunnel_flags_decode (vl_api_ipip_tunnel_flags_t f,
31 ipip_tunnel_flags_t * o)
33 if (f & ~IPIP_TUNNEL_FLAG_MASK)
34 /* unknown flags set */
35 return (VNET_API_ERROR_INVALID_VALUE_2);
37 *o = (ipip_tunnel_flags_t) f;
41 vl_api_ipip_tunnel_flags_t
42 ipip_tunnel_flags_encode (ipip_tunnel_flags_t f)
44 return ((vl_api_ipip_tunnel_flags_t) f);
48 * fd.io coding-style-patch-verification: ON
51 * eval: (c-set-style "gnu")