#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") \
_(INVALID_DST_ADDRESS, -58, "Invalid dst address") \
_(ADDRESS_LENGTH_MISMATCH, -59, "Address length mismatch") \
_(ADDRESS_NOT_FOUND_FOR_INTERFACE, -60, "Address not found for interface") \
-_(ADDRESS_NOT_LINK_LOCAL, -61, "Address not link-local") \
+_(ADDRESS_NOT_DELETABLE, -61, "Address not deletable") \
_(IP6_NOT_ENABLED, -62, "ip6 not enabled") \
_(IN_PROGRESS, 10, "Operation in progress") \
_(NO_SUCH_NODE, -63, "No such graph node") \
_(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") \
+_(ACL_IN_USE_BY_LOOKUP_CONTEXT, -149, "ACL in use by a lookup context") \
+_(INVALID_VALUE_3, -150, "Invalid value #3") \
+_(NON_ETHERNET, -151, "Interface is not an Ethernet interface") \
+_(BD_ALREADY_HAS_BVI, -152, "Bridge domain already has a BVI interface")
typedef enum
{
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 */
/*