2 * Copyright (c) 2015 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.
15 #ifndef included_vnet_api_errno_h
16 #define included_vnet_api_errno_h
19 #include <vppinfra/types.h>
20 #include <vppinfra/format.h>
21 #include <vnet/error.h>
23 #define foreach_vnet_api_error foreach_vnet_error
27 #define _(a,b,c) VNET_API_ERROR_##a = (b),
28 foreach_vnet_api_error
33 format_function_t format_vnet_api_errno;
35 static_always_inline vnet_api_error_t
36 vnet_api_error (clib_error_t *err)
41 return VNET_API_ERROR_BUG;
45 static_always_inline vnet_api_error_t
46 vnet_get_api_error_and_free (clib_error_t *err)
48 vnet_api_error_t rv = vnet_api_error (err);
49 clib_error_free (err);
53 #endif /* included_vnet_api_errno_h */
56 * fd.io coding-style-patch-verification: ON
59 * eval: (c-set-style "gnu")