Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
stats: allow configuring poller delay
[vpp.git]
/
src
/
vnet
/
api_errno.h
diff --git
a/src/vnet/api_errno.h
b/src/vnet/api_errno.h
index
11e5d4f
..
f928e0d
100644
(file)
--- a/
src/vnet/api_errno.h
+++ b/
src/vnet/api_errno.h
@@
-15,6
+15,10
@@
#ifndef included_vnet_api_errno_h
#define included_vnet_api_errno_h
#ifndef included_vnet_api_errno_h
#define included_vnet_api_errno_h
+#include <stdarg.h>
+#include <vppinfra/types.h>
+#include <vppinfra/format.h>
+
#define foreach_vnet_api_error \
_(UNSPECIFIED, -1, "Unspecified Error") \
_(INVALID_SW_IF_INDEX, -2, "Invalid sw_if_index") \
#define foreach_vnet_api_error \
_(UNSPECIFIED, -1, "Unspecified Error") \
_(INVALID_SW_IF_INDEX, -2, "Invalid sw_if_index") \
@@
-97,7
+101,7
@@
_(BFD_NOTSUPP, -104, "BFD feature not supported") \
_(ADDRESS_IN_USE, -105, "Address in use") \
_(ADDRESS_NOT_IN_USE, -106, "Address not in use") \
_(QUEUE_FULL, -107, "Queue full") \
_(ADDRESS_IN_USE, -105, "Address in use") \
_(ADDRESS_NOT_IN_USE, -106, "Address not in use") \
_(QUEUE_FULL, -107, "Queue full") \
-_(
UNKNOWN_URI_TYPE, -108, "Unknown URI type")
\
+_(
APP_UNSUPPORTED_CFG, -108, "Unsupported application config")
\
_(URI_FIFO_CREATE_FAILED, -109, "URI FIFO segment create failed") \
_(LISP_RLOC_LOCAL, -110, "RLOC address is local") \
_(BFD_EAGAIN, -111, "BFD object cannot be manipulated at this time") \
_(URI_FIFO_CREATE_FAILED, -109, "URI FIFO segment create failed") \
_(LISP_RLOC_LOCAL, -110, "RLOC address is local") \
_(BFD_EAGAIN, -111, "BFD object cannot be manipulated at this time") \
@@
-134,7
+138,10
@@
_(APP_CONNECT_FILTERED, -141, "Connect was filtered") \
_(ACL_IN_USE_INBOUND, -142, "Inbound ACL in use") \
_(ACL_IN_USE_OUTBOUND, -143, "Outbound ACL in use") \
_(INIT_FAILED, -144, "Initialization Failed") \
_(ACL_IN_USE_INBOUND, -142, "Inbound ACL in use") \
_(ACL_IN_USE_OUTBOUND, -143, "Outbound ACL in use") \
_(INIT_FAILED, -144, "Initialization Failed") \
-_(NETLINK_ERROR, -145, "netlink error")
+_(NETLINK_ERROR, -145, "netlink error") \
+_(BIER_BSL_UNSUP, -146, "BIER bit-string-length unsupported") \
+_(INSTANCE_IN_USE, -147, "Instance in use") \
+_(INVALID_SESSION_ID, -148, "session ID out of range")
typedef enum
{
typedef enum
{
@@
-144,6
+151,30
@@
typedef enum
VNET_API_N_ERROR,
} vnet_api_error_t;
VNET_API_N_ERROR,
} vnet_api_error_t;
+/* *INDENT-OFF* */
+static inline u8 *
+format_vnet_api_errno (u8 * s, va_list * args)
+{
+ vnet_api_error_t api_error = va_arg (*args, vnet_api_error_t);
+#ifdef _
+#undef _
+#endif
+#define _(a, b, c) \
+ case b: \
+ s = format (s, "%s", c); \
+ break;
+ switch (api_error)
+ {
+ foreach_vnet_api_error
+ default:
+ s = format (s, "UNKNOWN");
+ break;
+ }
+ return s;
+#undef _
+}
+/* *INDENT-ON* */
+
#endif /* included_vnet_api_errno_h */
/*
#endif /* included_vnet_api_errno_h */
/*