2 *------------------------------------------------------------------
3 * Copyright (c) 2017 Cisco and/or its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *------------------------------------------------------------------
18 #ifndef vapi_common_h_included
19 #define vapi_common_h_included
27 VAPI_OK = 0, /**< success */
28 VAPI_EINVAL, /**< invalid value encountered */
29 VAPI_EAGAIN, /**< operation would block */
30 VAPI_ENOTSUP, /**< operation not supported */
31 VAPI_ENOMEM, /**< out of memory */
32 VAPI_ENORESP, /**< no response to request */
33 VAPI_EMAP_FAIL, /**< failure while mapping api */
34 VAPI_ECON_FAIL, /**< failure while connecting to vpp */
35 VAPI_EINCOMPATIBLE, /**< fundamental incompatibility while connecting to vpp
36 (control ping/control ping reply mismatch) */
37 VAPI_MUTEX_FAILURE, /**< failure manipulating internal mutex(es) */
38 VAPI_EUSER, /**< user error used for breaking dispatch,
44 VAPI_MODE_BLOCKING = 1, /**< operations block until response received */
45 VAPI_MODE_NONBLOCKING = 2, /**< operations never block */
48 typedef unsigned int vapi_msg_id_t;
50 #define VAPI_INVALID_MSG_ID ((vapi_msg_id_t)(~0))