X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fapi_errno.h;h=5859bb92d3ef4ea8f84afede95dd24a50a650afa;hb=94f9a6de3f706243d138e05b63fef1d5c8174f6c;hp=eeb727672bf7ae7d42b4c40513169e88117e4829;hpb=cea194d8f973a2f2b5ef72d212533057174cc70a;p=vpp.git diff --git a/src/vnet/api_errno.h b/src/vnet/api_errno.h index eeb727672bf..5859bb92d3e 100644 --- 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 +#include +#include +#include + #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") \ -_(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") \ @@ -122,6 +126,23 @@ _(APP_WRONG_NS_SECRET, -129, "Wrong app namespace secret") \ _(APP_CONNECT_SCOPE, -130, "Connect scope") \ _(APP_ALREADY_ATTACHED, -131, "App already attached") \ _(SESSION_REDIRECT, -132, "Redirect failed") \ +_(ILLEGAL_NAME, -133, "Illegal name") \ +_(NO_NAME_SERVERS, -134, "No name servers configured") \ +_(NAME_SERVER_NOT_FOUND, -135, "Name server not found") \ +_(NAME_RESOLUTION_NOT_ENABLED, -136, "Name resolution not enabled") \ +_(NAME_SERVER_FORMAT_ERROR, -137, "Server format error (bug!)") \ +_(NAME_SERVER_NO_SUCH_NAME, -138, "No such name") \ +_(NAME_SERVER_NO_ADDRESSES, -139, "No addresses available") \ +_(NAME_SERVER_NEXT_SERVER, -140, "Retry with new server") \ +_(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") \ +_(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") \ typedef enum { @@ -131,6 +152,30 @@ 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 */ /*