blob: be2100a5c29dcb61f3233582d0d97ba9bb8ed8b1 [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001/*
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:
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
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.
14 */
15#ifndef included_vnet_api_errno_h
16#define included_vnet_api_errno_h
17
18#define foreach_vnet_api_error \
19_(UNSPECIFIED, -1, "Unspecified Error") \
20_(INVALID_SW_IF_INDEX, -2, "Invalid sw_if_index") \
21_(NO_SUCH_FIB, -3, "No such FIB / VRF") \
22_(NO_SUCH_INNER_FIB, -4, "No such inner FIB / VRF") \
23_(NO_SUCH_LABEL, -5, "No such label") \
24_(NO_SUCH_ENTRY, -6, "No such entry") \
25_(INVALID_VALUE, -7, "Invalid value") \
26_(INVALID_VALUE_2, -8, "Invalid value #2") \
27_(UNIMPLEMENTED, -9, "Unimplemented") \
28_(INVALID_SW_IF_INDEX_2, -10, "Invalid sw_if_index #2") \
29_(SYSCALL_ERROR_1, -11, "System call error #1") \
30_(SYSCALL_ERROR_2, -12, "System call error #2") \
31_(SYSCALL_ERROR_3, -13, "System call error #3") \
32_(SYSCALL_ERROR_4, -14, "System call error #4") \
33_(SYSCALL_ERROR_5, -15, "System call error #5") \
34_(SYSCALL_ERROR_6, -16, "System call error #6") \
35_(SYSCALL_ERROR_7, -17, "System call error #7") \
36_(SYSCALL_ERROR_8, -18, "System call error #8") \
37_(SYSCALL_ERROR_9, -19, "System call error #9") \
Dave Barach2feaffc2017-01-14 10:30:50 -050038_(SYSCALL_ERROR_10, -20, "System call error #10") \
Ed Warnickecb9cada2015-12-08 15:45:58 -070039_(FEATURE_DISABLED, -30, "Feature disabled by configuration") \
40_(INVALID_REGISTRATION, -31, "Invalid registration") \
41_(NEXT_HOP_NOT_IN_FIB, -50, "Next hop not in FIB") \
42_(UNKNOWN_DESTINATION, -51, "Unknown destination") \
43_(PREFIX_MATCHES_NEXT_HOP, -52, "Prefix matches next hop") \
44_(NEXT_HOP_NOT_FOUND_MP, -53, "Next hop not found (multipath)") \
45_(NO_MATCHING_INTERFACE, -54, "No matching interface for probe") \
46_(INVALID_VLAN, -55, "Invalid VLAN") \
47_(VLAN_ALREADY_EXISTS, -56, "VLAN subif already exists") \
48_(INVALID_SRC_ADDRESS, -57, "Invalid src address") \
49_(INVALID_DST_ADDRESS, -58, "Invalid dst address") \
50_(ADDRESS_LENGTH_MISMATCH, -59, "Address length mismatch") \
51_(ADDRESS_NOT_FOUND_FOR_INTERFACE, -60, "Address not found for interface") \
52_(ADDRESS_NOT_LINK_LOCAL, -61, "Address not link-local") \
53_(IP6_NOT_ENABLED, -62, "ip6 not enabled") \
Ed Warnickecb9cada2015-12-08 15:45:58 -070054_(IN_PROGRESS, 10, "Operation in progress") \
55_(NO_SUCH_NODE, -63, "No such graph node") \
56_(NO_SUCH_NODE2, -64, "No such graph node #2") \
57_(NO_SUCH_TABLE, -65, "No such table") \
58_(NO_SUCH_TABLE2, -66, "No such table #2") \
59_(NO_SUCH_TABLE3, -67, "No such table #3") \
60_(SUBIF_ALREADY_EXISTS, -68, "Subinterface already exists") \
61_(SUBIF_CREATE_FAILED, -69, "Subinterface creation failed") \
62_(INVALID_MEMORY_SIZE, -70, "Invalid memory size requested") \
63_(INVALID_INTERFACE, -71, "Invalid interface") \
64_(INVALID_VLAN_TAG_COUNT, -72, "Invalid number of tags for requested operation") \
65_(INVALID_ARGUMENT, -73, "Invalid argument") \
66_(UNEXPECTED_INTF_STATE, -74, "Unexpected interface state") \
67_(TUNNEL_EXIST, -75, "Tunnel already exists") \
68_(INVALID_DECAP_NEXT, -76, "Invalid decap-next") \
69_(RESPONSE_NOT_READY, -77, "Response not ready") \
Damjan Marion83243a02016-02-29 13:09:30 +010070_(NOT_CONNECTED, -78, "Not connected to the data plane") \
John Lobcebbb92016-04-05 15:47:43 -040071_(IF_ALREADY_EXISTS, -79, "Interface already exists") \
Andrej Kozemcakb92feb62016-03-31 13:51:42 +020072_(BOND_SLAVE_NOT_ALLOWED, -80, "Operation not allowed on slave of BondEthernet") \
Chris Luke99cb3352016-04-26 10:49:53 -040073_(VALUE_EXIST, -81, "Value already exists") \
Keith Burns (alagalah)52fc44d2016-03-25 09:38:50 -070074_(SAME_SRC_DST, -82, "Source and destination are the same") \
75_(IP6_MULTICAST_ADDRESS_NOT_PRESENT, -83, "IP6 multicast address required") \
Marek Gradzkid85036f2016-04-26 12:09:05 +020076_(SR_POLICY_NAME_NOT_PRESENT, -84, "Segement routing policy name required") \
77_(NOT_RUNNING_AS_ROOT, -85, "Not running as root") \
78_(ALREADY_CONNECTED, -86, "Connection to the data plane already exists") \
79_(UNSUPPORTED_JNI_VERSION, -87, "Unsupported JNI version") \
Damjan Marion0247b462016-06-08 01:37:11 +020080_(FAILED_TO_ATTACH_TO_JAVA_THREAD, -88, "Failed to attach to Java thread") \
Andrej Kozemcak8ebb2a12016-06-07 12:25:20 +020081_(INVALID_WORKER, -89, "Invalid worker thread") \
Pavel Kotucek20c90f72016-06-07 14:44:26 +020082_(LISP_DISABLED, -90, "LISP is disabled") \
Filip Tehlar006eb262016-06-27 13:09:20 +020083_(CLASSIFY_TABLE_NOT_FOUND, -91, "Classify table not found") \
Pavel Kotucek9e6ed6e2016-07-12 10:18:26 +020084_(INVALID_EID_TYPE, -92, "Unsupported LSIP EID type") \
Dave Barach6f9bca22016-04-30 10:25:32 -040085_(CANNOT_CREATE_PCAP_FILE, -93, "Cannot create pcap file") \
86_(INCORRECT_ADJACENCY_TYPE, -94, "Invalid adjacency type for this operation") \
87_(EXCEEDED_NUMBER_OF_RANGES_CAPACITY, -95, "Operation would exceed configured capacity of ranges") \
Pierre Pfister041eacc2016-08-04 16:13:09 +010088_(EXCEEDED_NUMBER_OF_PORTS_CAPACITY, -96, "Operation would exceed capacity of number of ports") \
Pavel Kotucekd85590a2016-08-26 13:35:40 +020089_(INVALID_ADDRESS_FAMILY, -97, "Invalid address family") \
Filip Tehlar69a9b762016-09-23 10:00:52 +020090_(INVALID_SUB_SW_IF_INDEX, -98, "Invalid sub-interface sw_if_index") \
Pavel Kotucek7490a752016-11-15 09:19:11 +010091_(TABLE_TOO_BIG, -99, "Table too big") \
Klement Sekera0e3c0de2016-09-29 14:43:44 +020092_(CANNOT_ENABLE_DISABLE_FEATURE, -100, "Cannot enable/disable feature") \
Dave Barach68b0fb02017-02-28 15:15:56 -050093_(BFD_EEXIST, -101, "Duplicate BFD object") \
94_(BFD_ENOENT, -102, "No such BFD object") \
95_(BFD_EINUSE, -103, "BFD object in use") \
96_(BFD_NOTSUPP, -104, "BFD feature not supported") \
97_(ADDRESS_IN_USE, -105, "Address in use") \
98_(ADDRESS_NOT_IN_USE, -106, "Address not in use") \
99_(QUEUE_FULL, -107, "Queue full") \
Florin Corasb384b542018-01-15 01:08:33 -0800100_(APP_UNSUPPORTED_CFG, -108, "Unsupported application config") \
Dave Barach68b0fb02017-02-28 15:15:56 -0500101_(URI_FIFO_CREATE_FAILED, -109, "URI FIFO segment create failed") \
102_(LISP_RLOC_LOCAL, -110, "RLOC address is local") \
103_(BFD_EAGAIN, -111, "BFD object cannot be manipulated at this time") \
104_(INVALID_GPE_MODE, -112, "Invalid GPE mode") \
Neale Ranns4008ac92017-02-13 23:20:04 -0800105_(LISP_GPE_ENTRIES_PRESENT, -113, "LISP GPE entries are present") \
Florin Corase04c2992017-03-01 08:17:34 -0800106_(ADDRESS_FOUND_FOR_INTERFACE, -114, "Address found for interface") \
Florin Corascea194d2017-10-02 00:18:51 -0700107_(SESSION_CONNECT, -115, "Session failed to connect") \
Florin Coras6cf30ad2017-04-04 23:08:23 -0700108_(ENTRY_ALREADY_EXISTS, -116, "Entry already exists") \
109_(SVM_SEGMENT_CREATE_FAIL, -117, "svm segment create fail") \
Eyal Barib1352ed2017-04-07 23:14:17 +0300110_(APPLICATION_NOT_ATTACHED, -118, "application not attached") \
111_(BD_ALREADY_EXISTS, -119, "Bridge domain already exists") \
Damjan Marion44036902017-04-28 12:29:15 +0200112_(BD_IN_USE, -120, "Bridge domain has member interfaces") \
John Lo97934772017-05-18 22:26:47 -0400113_(BD_NOT_MODIFIABLE, -121, "Bridge domain 0 can't be deleted/modified") \
114_(BD_ID_EXCEED_MAX, -122, "Bridge domain ID exceed 16M limit") \
John Lo8d00fff2017-08-03 00:35:36 -0400115_(SUBIF_DOESNT_EXIST, -123, "Subinterface doesn't exist") \
116_(L2_MACS_EVENT_CLINET_PRESENT, -124, "Client already exist for L2 MACs events") \
Stevenbd8a6112017-07-30 10:29:26 -0700117_(INVALID_QUEUE, -125, "Invalid queue") \
Jon Loeliger35ffa3e2017-09-28 13:54:16 -0500118_(UNSUPPORTED, -126, "Unsupported") \
Florin Corascea194d2017-10-02 00:18:51 -0700119_(DUPLICATE_IF_ADDRESS, -127, "Address already present on another interface") \
120_(APP_INVALID_NS, -128, "Invalid application namespace") \
121_(APP_WRONG_NS_SECRET, -129, "Wrong app namespace secret") \
122_(APP_CONNECT_SCOPE, -130, "Connect scope") \
123_(APP_ALREADY_ATTACHED, -131, "App already attached") \
124_(SESSION_REDIRECT, -132, "Redirect failed") \
Dave Barach65457162017-10-10 17:53:14 -0400125_(ILLEGAL_NAME, -133, "Illegal name") \
126_(NO_NAME_SERVERS, -134, "No name servers configured") \
127_(NAME_SERVER_NOT_FOUND, -135, "Name server not found") \
128_(NAME_RESOLUTION_NOT_ENABLED, -136, "Name resolution not enabled") \
129_(NAME_SERVER_FORMAT_ERROR, -137, "Server format error (bug!)") \
130_(NAME_SERVER_NO_SUCH_NAME, -138, "No such name") \
131_(NAME_SERVER_NO_ADDRESSES, -139, "No addresses available") \
Florin Corasa2ff7b82017-11-08 17:55:03 -0800132_(NAME_SERVER_NEXT_SERVER, -140, "Retry with new server") \
Jon Loeliger27cadd22017-11-10 13:15:12 -0600133_(APP_CONNECT_FILTERED, -141, "Connect was filtered") \
134_(ACL_IN_USE_INBOUND, -142, "Inbound ACL in use") \
Damjan Marion91c6ef72017-12-01 13:34:24 +0100135_(ACL_IN_USE_OUTBOUND, -143, "Outbound ACL in use") \
136_(INIT_FAILED, -144, "Initialization Failed") \
137_(NETLINK_ERROR, -145, "netlink error")
Ed Warnickecb9cada2015-12-08 15:45:58 -0700138
Dave Barachba868bb2016-08-08 09:51:21 -0400139typedef enum
140{
Ed Warnickecb9cada2015-12-08 15:45:58 -0700141#define _(a,b,c) VNET_API_ERROR_##a = (b),
Dave Barachba868bb2016-08-08 09:51:21 -0400142 foreach_vnet_api_error
Ed Warnickecb9cada2015-12-08 15:45:58 -0700143#undef _
144 VNET_API_N_ERROR,
145} vnet_api_error_t;
146
147#endif /* included_vnet_api_errno_h */
Dave Barachba868bb2016-08-08 09:51:21 -0400148
149/*
150 * fd.io coding-style-patch-verification: ON
151 *
152 * Local Variables:
153 * eval: (c-set-style "gnu")
154 * End:
155 */