blob: 8a2d0797b5c5689fbbd1478f6e06675b59ee2548 [file] [log] [blame]
Ole Troan53fffa12018-11-13 12:36:56 +01001/* Hey Emacs use -*- mode: C -*- */
2/*
3 * Copyright (c) 2018 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:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
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 */
16
Jakub Grajciar053204a2019-03-18 13:17:53 +010017option version = "3.0.0";
Dave Barach0d056e52017-09-28 15:11:16 -040018
Ole Troan53fffa12018-11-13 12:36:56 +010019import "vnet/interface_types.api";
Jakub Grajciar053204a2019-03-18 13:17:53 +010020import "vnet/ethernet/ethernet_types.api";
21import "vnet/ip/ip_types.api";
Ole Troan53fffa12018-11-13 12:36:56 +010022
Marek Gradzki51e59682018-03-06 10:05:44 +010023service {
24 rpc want_interface_events returns want_interface_events_reply
25 events sw_interface_event;
26};
27
Dave Barachaff70772016-10-31 11:59:07 -040028/** \brief Set flags on the interface
29 @param client_index - opaque cookie to identify the sender
30 @param context - sender context, to match reply w/ request
31 @param sw_if_index - index of the interface to set flags on
Jakub Grajciar053204a2019-03-18 13:17:53 +010032 @param flags - interface_status flags
33 (only IF_STATUS_API_FLAG_ADMIN_UP used in config)
Dave Barachaff70772016-10-31 11:59:07 -040034*/
Dave Barach11b8dbf2017-04-24 10:46:54 -040035autoreply define sw_interface_set_flags
Dave Barachaff70772016-10-31 11:59:07 -040036{
37 u32 client_index;
38 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +010039 vl_api_interface_index_t sw_if_index;
40 vl_api_if_status_flags_t flags;
Dave Barachaff70772016-10-31 11:59:07 -040041};
42
Ole Troand7231612018-06-07 10:17:57 +020043/** \brief Set interface physical MTU
Matus Fabiand162f3d2016-12-05 01:05:35 -080044 @param client_index - opaque cookie to identify the sender
45 @param context - sender context, to match reply w/ request
46 @param sw_if_index - index of the interface to set MTU on
47 @param mtu - MTU
48*/
Ole Troand7231612018-06-07 10:17:57 +020049autoreply define hw_interface_set_mtu
Matus Fabiand162f3d2016-12-05 01:05:35 -080050{
51 u32 client_index;
52 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +010053 vl_api_interface_index_t sw_if_index;
Matus Fabiand162f3d2016-12-05 01:05:35 -080054 u16 mtu;
55};
56
Ole Troand7231612018-06-07 10:17:57 +020057/** \brief Set interface L3 MTU */
58autoreply define sw_interface_set_mtu
59{
60 u32 client_index;
61 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +010062 vl_api_interface_index_t sw_if_index;
63 u32 mtu[4]; /* vl_api_mtu_proto_t 0 - L3, 1 - IP4, 2 - IP6, 3 - MPLS */
Ole Troand7231612018-06-07 10:17:57 +020064};
65
Neale Ranns1855b8e2018-07-11 10:31:26 -070066/** \brief Set IP4 directed broadcast
67 The directed broadcast enabled a packet sent to the interface's
68 subnet address will be broadcast on the interface
69 @param sw_if_index
70 @param enable
71*/
72autoreply define sw_interface_set_ip_directed_broadcast
73{
74 u32 client_index;
75 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +010076 vl_api_interface_index_t sw_if_index;
77 bool enable;
Neale Ranns1855b8e2018-07-11 10:31:26 -070078};
79
Neale Rannsa07bd702017-08-07 07:53:49 -070080/** \brief Interface Event generated by want_interface_events
Neale Rannsd292ab12017-08-15 12:29:48 -070081 @param client_index - opaque cookie to identify the sender
82 @param pid - client pid registered to receive notification
Neale Rannsa07bd702017-08-07 07:53:49 -070083 @param sw_if_index - index of the interface of the event
Jakub Grajciar053204a2019-03-18 13:17:53 +010084 @param flags - interface_status flags
Neale Rannsa07bd702017-08-07 07:53:49 -070085 @param deleted - interface was deleted
86*/
87define sw_interface_event
88{
Neale Rannsd292ab12017-08-15 12:29:48 -070089 u32 client_index;
90 u32 pid;
Jakub Grajciar053204a2019-03-18 13:17:53 +010091 vl_api_interface_index_t sw_if_index;
92 vl_api_if_status_flags_t flags;
93 bool deleted;
Neale Rannsa07bd702017-08-07 07:53:49 -070094};
95
Dave Barach6d963c22016-12-05 09:50:05 -050096/** \brief Register for interface events
97 @param client_index - opaque cookie to identify the sender
98 @param context - sender context, to match reply w/ request
99 @param enable_disable - 1 => register for events, 0 => cancel registration
100 @param pid - sender's pid
101*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400102autoreply define want_interface_events
Dave Barach6d963c22016-12-05 09:50:05 -0500103{
104 u32 client_index;
105 u32 context;
106 u32 enable_disable;
107 u32 pid;
108};
109
Jakub Grajciar053204a2019-03-18 13:17:53 +0100110/** \brief Interface details structure (fix this)
Dave Barach6d963c22016-12-05 09:50:05 -0500111 @param sw_if_index - index of the interface
Vratko Polak4a724062019-04-17 20:02:56 +0200112 @param sup_sw_if_index - index of parent interface if any, else same as sw_if_index
Paul Vinciguerra9a29f792019-04-30 20:44:25 -0700113 @param l2_address - the interface's l2 address
Jakub Grajciar053204a2019-03-18 13:17:53 +0100114 @param flags - interface_status flags
115 @param type - interface type
Dave Barach6d963c22016-12-05 09:50:05 -0500116 @param link_duplex - 1 if half duplex, 2 if full duplex
Damjan Marion5100aa92018-11-08 15:30:16 +0100117 @param link_speed - value in kbps
Paul Vinciguerrabdc0e6b2018-09-22 05:32:50 -0700118 @param link_MTU - max. transmission unit
Jakub Grajciar053204a2019-03-18 13:17:53 +0100119 @param sub_id - A number 0-N to uniquely identify this subif on super if
Dave Barach6d963c22016-12-05 09:50:05 -0500120 @param sub_number_of_tags - Number of tags (0 - 2)
121 @param sub_outer_vlan_id
122 @param sub_inner_vlan_id
Jakub Grajciar053204a2019-03-18 13:17:53 +0100123 @param sub_if_flags - sub interface flags
Dave Barach6d963c22016-12-05 09:50:05 -0500124 @param vtr_op - vlan tag rewrite operation
125 @param vtr_push_dot1q
126 @param vtr_tag1
127 @param vtr_tag2
Pavel Kotucek65e84572017-01-16 17:01:56 +0100128 @param pbb_outer_tag - translate pbb s-tag
129 @param pbb_b_dmac[6] - B-tag remote mac address
130 @param pbb_b_smac[6] - B-tag local mac address
131 @param pbb_b_vlanid - B-tag vlanid
132 @param pbb_i_sid - I-tag service id
Jakub Grajciar053204a2019-03-18 13:17:53 +0100133 @param interface_name - name of the interface
134 @param tag - an ascii tag
Dave Barach6d963c22016-12-05 09:50:05 -0500135*/
136define sw_interface_details
137{
138 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100139 vl_api_interface_index_t sw_if_index;
Dave Barach6d963c22016-12-05 09:50:05 -0500140
141 /* index of sup interface (e.g. hw interface).
142 equal to sw_if_index for super hw interface. */
143 u32 sup_sw_if_index;
144
145 /* Layer 2 address, if applicable */
Jakub Grajciar053204a2019-03-18 13:17:53 +0100146 vl_api_mac_address_t l2_address;
Dave Barach6d963c22016-12-05 09:50:05 -0500147
Jakub Grajciar053204a2019-03-18 13:17:53 +0100148 vl_api_if_status_flags_t flags;
Ole Trøan3b0d7e42019-03-15 16:14:41 +0000149
Jakub Grajciar053204a2019-03-18 13:17:53 +0100150 vl_api_if_type_t type;
Dave Barach6d963c22016-12-05 09:50:05 -0500151
152 /* 1 = half duplex, 2 = full duplex */
Jakub Grajciar053204a2019-03-18 13:17:53 +0100153 vl_api_link_duplex_t link_duplex;
Dave Barach6d963c22016-12-05 09:50:05 -0500154
Damjan Marion5100aa92018-11-08 15:30:16 +0100155 /* link speed in kbps */
156 u32 link_speed;
Dave Barach6d963c22016-12-05 09:50:05 -0500157
158 /* MTU */
Damjan Marionfe7d4a22018-04-13 19:43:39 +0200159 u16 link_mtu;
Dave Barach6d963c22016-12-05 09:50:05 -0500160
Ole Troand7231612018-06-07 10:17:57 +0200161 /* Per protocol MTUs */
Jakub Grajciar053204a2019-03-18 13:17:53 +0100162 u32 mtu[4]; /* vl_api_mtu_proto_t 0 - L3, 1 - IP4, 2 - IP6, 3 - MPLS */
Ole Troand7231612018-06-07 10:17:57 +0200163
Dave Barach6d963c22016-12-05 09:50:05 -0500164 /* Subinterface ID. A number 0-N to uniquely identify this subinterface under the super interface */
165 u32 sub_id;
166
Dave Barach6d963c22016-12-05 09:50:05 -0500167 /* Number of tags 0-2 */
168 u8 sub_number_of_tags;
169 u16 sub_outer_vlan_id;
170 u16 sub_inner_vlan_id;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100171
172 vl_api_sub_if_flags_t sub_if_flags;
Dave Barach6d963c22016-12-05 09:50:05 -0500173
174 /* vlan tag rewrite state */
175 u32 vtr_op;
176 u32 vtr_push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad
177 u32 vtr_tag1; // first pushed tag
178 u32 vtr_tag2; // second pushed tag
Vratko Polak4a724062019-04-17 20:02:56 +0200179
Pavel Kotucek65e84572017-01-16 17:01:56 +0100180 /* pbb tag rewrite info */
181 u16 outer_tag;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100182 vl_api_mac_address_t b_dmac;
183 vl_api_mac_address_t b_smac;
Pavel Kotucek65e84572017-01-16 17:01:56 +0100184 u16 b_vlanid;
185 u32 i_sid;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100186
187 /* Interface name */
188 string interface_name;
189 string tag;
Dave Barach6d963c22016-12-05 09:50:05 -0500190};
191
Paul Vinciguerrabb2c7b52019-03-14 09:47:29 -0700192/** \brief Request all or filtered subset of sw_interface_details
193 @param client_index - opaque cookie to identify the sender
194 @param context - sender context, to match reply w/ request
Vratko Polakb8591ac2019-04-23 12:26:44 +0200195 @param sw_if_index - index of the interface to dump info on, 0 or ~0 if on all
196 TODO: Support selecting only index==0 when CSIT is ready.
Paul Vinciguerrabb2c7b52019-03-14 09:47:29 -0700197 @param name_filter_valid - 1 if requesting a filtered subset of records else 0
Vratko Polakb8591ac2019-04-23 12:26:44 +0200198 if name filter is set as valid, sw_if_index value is ignored and all interfaces are examined
Paul Vinciguerrabb2c7b52019-03-14 09:47:29 -0700199 @param name_filter - interface name substring filter. Eg. loop1 returns [loop1, loop10]
200*/
Dave Barach6d963c22016-12-05 09:50:05 -0500201define sw_interface_dump
202{
203 u32 client_index;
204 u32 context;
Paul Vinciguerra6407ba52019-04-04 13:22:20 -0700205 vl_api_interface_index_t sw_if_index;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100206 bool name_filter_valid;
207 string name_filter;
Dave Barach6d963c22016-12-05 09:50:05 -0500208};
209
210/** \brief Set or delete one or all ip addresses on a specified interface
211 @param client_index - opaque cookie to identify the sender
212 @param context - sender context, to match reply w/ request
Jakub Grajciar053204a2019-03-18 13:17:53 +0100213 @param sw_if_index - index of the interface to add/del addresses
Dave Barach6d963c22016-12-05 09:50:05 -0500214 @param is_add - add address if non-zero, else delete
Dave Barach6d963c22016-12-05 09:50:05 -0500215 @param del_all - if non-zero delete all addresses on the interface
Jakub Grajciar053204a2019-03-18 13:17:53 +0100216 @param prefix - address + a prefix length for the implied connected route
Dave Barach6d963c22016-12-05 09:50:05 -0500217*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400218autoreply define sw_interface_add_del_address
Dave Barach6d963c22016-12-05 09:50:05 -0500219{
220 u32 client_index;
221 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100222 vl_api_interface_index_t sw_if_index;
223 bool is_add;
224
225 bool del_all;
226 vl_api_prefix_t prefix;
Dave Barach6d963c22016-12-05 09:50:05 -0500227};
228
Dave Barach6d963c22016-12-05 09:50:05 -0500229/** \brief Associate the specified interface with a fib table
230 @param client_index - opaque cookie to identify the sender
231 @param context - sender context, to match reply w/ request
232 @param sw_if_index - index of the interface
233 @param is_ipv6 - if non-zero ipv6, else ipv4
jackiechen19850ad4a432019-05-09 16:57:16 +0800234 @param vrf_id - fib table/vrf id to associate the interface with
Dave Barach6d963c22016-12-05 09:50:05 -0500235*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400236autoreply define sw_interface_set_table
Dave Barach6d963c22016-12-05 09:50:05 -0500237{
238 u32 client_index;
239 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100240 vl_api_interface_index_t sw_if_index;
241 bool is_ipv6;
Dave Barach6d963c22016-12-05 09:50:05 -0500242 u32 vrf_id;
243};
244
Juraj Slobodadfc19232016-12-05 13:20:37 +0100245/** \brief Get VRF id assigned to interface
246 @param client_index - opaque cookie to identify the sender
247 @param context - sender context, to match reply w/ request
248 @param sw_if_index - index of the interface
249*/
250define sw_interface_get_table
251{
252 u32 client_index;
253 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100254 vl_api_interface_index_t sw_if_index;
255 bool is_ipv6;
Juraj Slobodadfc19232016-12-05 13:20:37 +0100256};
257
258/** \brief Reply to get_sw_interface_vrf
259 @param context - sender context which was passed in the request
260 @param vrf_id - VRF id assigned to the interface
261*/
262define sw_interface_get_table_reply
263{
264 u32 context;
265 i32 retval;
266 u32 vrf_id;
267};
268
Dave Barach6d963c22016-12-05 09:50:05 -0500269/** \brief Set unnumbered interface add / del request
270 @param client_index - opaque cookie to identify the sender
271 @param context - sender context, to match reply w/ request
272 @param sw_if_index - interface with an IP address
273 @param unnumbered_sw_if_index - interface which will use the address
274 @param is_add - if non-zero set the association, else unset it
275*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400276autoreply define sw_interface_set_unnumbered
Dave Barach6d963c22016-12-05 09:50:05 -0500277{
278 u32 client_index;
279 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100280 vl_api_interface_index_t sw_if_index; /* use this intfc address */
281 vl_api_interface_index_t unnumbered_sw_if_index; /* on this interface */
282 bool is_add;
Dave Barach6d963c22016-12-05 09:50:05 -0500283};
284
Dave Barach6d963c22016-12-05 09:50:05 -0500285/** \brief Clear interface statistics
286 @param client_index - opaque cookie to identify the sender
287 @param context - sender context, to match reply w/ request
288 @param sw_if_index - index of the interface to clear statistics
289*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400290autoreply define sw_interface_clear_stats
Dave Barach6d963c22016-12-05 09:50:05 -0500291{
292 u32 client_index;
293 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100294 vl_api_interface_index_t sw_if_index;
Dave Barach6d963c22016-12-05 09:50:05 -0500295};
296
Dave Barach6d963c22016-12-05 09:50:05 -0500297/** \brief Set / clear software interface tag
298 @param client_index - opaque cookie to identify the sender
299 @param context - sender context, to match reply w/ request
300 @param sw_if_index - the interface
301 @param add_del - 1 = add, 0 = delete
302 @param tag - an ascii tag
303*/
Jakub Grajciar053204a2019-03-18 13:17:53 +0100304autoreply define sw_interface_tag_add_del
Dave Barach6d963c22016-12-05 09:50:05 -0500305{
Jakub Grajciar053204a2019-03-18 13:17:53 +0100306 u32 client_index;
307 u32 context;
308 bool is_add;
309 vl_api_interface_index_t sw_if_index;
310 string tag;
Dave Barach6d963c22016-12-05 09:50:05 -0500311};
312
Jon Loeliger10c273b2017-03-30 08:39:33 -0500313/** \brief Set an interface's MAC address
314 @param client_index - opaque cookie to identify the sender
315 @param context - sender context, to match reply w/ request
316 @param sw_if_index - the interface whose MAC will be set
317 @param mac_addr - the new MAC address
318*/
Dave Barach11b8dbf2017-04-24 10:46:54 -0400319autoreply define sw_interface_set_mac_address
Jon Loeliger10c273b2017-03-30 08:39:33 -0500320{
Jakub Grajciar053204a2019-03-18 13:17:53 +0100321 u32 client_index;
322 u32 context;
323 vl_api_interface_index_t sw_if_index;
324 vl_api_mac_address_t mac_address;
Jon Loeliger10c273b2017-03-30 08:39:33 -0500325};
326
Juraj Slobodac0374232018-02-01 15:18:49 +0100327/** \brief Get interface's MAC address
328 @param client_index - opaque cookie to identify the sender
329 @param context - sender context, to match reply w/ request
330 @param sw_if_index - the interface whose MAC will be returned
331*/
332define sw_interface_get_mac_address
333{
Jakub Grajciar053204a2019-03-18 13:17:53 +0100334 u32 client_index;
335 u32 context;
336 vl_api_interface_index_t sw_if_index;
Juraj Slobodac0374232018-02-01 15:18:49 +0100337};
338
339/** \brief Reply for get interface's MAC address request
340 @param context - returned sender context, to match reply w/ request
341 @param retval - return code
342 @param mac_addr - returned interface's MAC address
343*/
344define sw_interface_get_mac_address_reply
345{
Jakub Grajciar053204a2019-03-18 13:17:53 +0100346 u32 context;
347 i32 retval;
348 vl_api_mac_address_t mac_address;
Juraj Slobodac0374232018-02-01 15:18:49 +0100349};
350
Stevenad8015b2017-10-29 22:10:46 -0700351/** \brief Set an interface's rx-mode
352 @param client_index - opaque cookie to identify the sender
353 @param context - sender context, to match reply w/ request
354 @param sw_if_index - the interface whose rx-mode will be set
355 @param queue_id_valid - 1 = the queue_id field is valid. 0 means all
356 queue_id's
357 @param queue_id - the queue number whose rx-mode will be set. Only valid
358 if queue_id_valid is 1
359 @param mode - polling=1, interrupt=2, adaptive=3
360*/
361autoreply define sw_interface_set_rx_mode
362{
Jakub Grajciar053204a2019-03-18 13:17:53 +0100363 u32 client_index;
364 u32 context;
365 vl_api_interface_index_t sw_if_index;
366 bool queue_id_valid;
367 u32 queue_id;
368 vl_api_rx_mode_t mode;
Stevenad8015b2017-10-29 22:10:46 -0700369};
370
Mohsin Kazmi54f7c512018-08-23 18:28:11 +0200371/** \brief Set an interface's rx-placement
Mohsin Kazmif0b42f42018-09-10 18:11:00 +0200372 Rx-Queue placement on specific thread is operational for only hardware
373 interface. It will not set queue - thread placement for sub-interfaces,
374 p2p and pipe interfaces.
Mohsin Kazmi54f7c512018-08-23 18:28:11 +0200375 @param client_index - opaque cookie to identify the sender
376 @param context - sender context, to match reply w/ request
377 @param sw_if_index - the interface whose rx-placement will be set
378 @param queue_id - the queue number whose rx-placement will be set.
379 @param worker_id - the worker number whom rx-placement will be at.
380 @param is_main - flag to set rx-placement to main thread
381*/
382autoreply define sw_interface_set_rx_placement
383{
384 u32 client_index;
385 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100386 vl_api_interface_index_t sw_if_index;
Mohsin Kazmi54f7c512018-08-23 18:28:11 +0200387 u32 queue_id;
388 u32 worker_id;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100389 bool is_main;
Mohsin Kazmi54f7c512018-08-23 18:28:11 +0200390};
391
Mohsin Kazmif0b42f42018-09-10 18:11:00 +0200392/** \brief dump the rx queue placement of interface(s)
393 @param sw_if_index - optional interface index for which queue placement to
394 be requested. sw_if_index = ~0 will dump placement information for all
395 interfaces. It will not dump information related to sub-interfaces, p2p
396 and pipe interfaces.
397*/
398define sw_interface_rx_placement_dump
399{
400 u32 client_index;
401 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100402 vl_api_interface_index_t sw_if_index;
Mohsin Kazmif0b42f42018-09-10 18:11:00 +0200403};
404
405/** \brief show the interface's queue - thread placement
406 This api is used to display the interface and queue worker
407 thread placement. One message per rx-queue per interface will
408 be sent to client.
409 Each message will contain information about rx-queue id of an
410 interface, interface index, thread on which this rx-queue is
411 placed and mode of rx-queue.
412 @param client_index - opaque cookie to identify the sender
413 @param context - sender context, to match reply w/ request
414 @param sw_if_index - the interface whose rx-placement will be dumped
415 @param queue_id - the queue id
416 @param worker_id - the worker id on which queue_id is placed,
417 worker_id = 0 means main thread.
418 @param mode - polling=1, interrupt=2, adaptive=3
419*/
420define sw_interface_rx_placement_details
421{
422 u32 client_index;
423 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100424 vl_api_interface_index_t sw_if_index;
Mohsin Kazmif0b42f42018-09-10 18:11:00 +0200425 u32 queue_id;
426 u32 worker_id;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100427 vl_api_rx_mode_t mode;
Mohsin Kazmif0b42f42018-09-10 18:11:00 +0200428};
429
Neale Rannsb8d44812017-11-10 06:53:54 -0800430/* Gross kludge, DGMS */
431autoreply define interface_name_renumber
432{
433 u32 client_index;
434 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100435 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800436 u32 new_show_dev_instance;
437};
438
439define create_subif
440{
441 u32 client_index;
442 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100443 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800444 u32 sub_id;
445
Jakub Grajciar053204a2019-03-18 13:17:53 +0100446 vl_api_sub_if_flags_t sub_if_flags;
Neale Rannsb8d44812017-11-10 06:53:54 -0800447 u16 outer_vlan_id;
448 u16 inner_vlan_id;
449};
450
451define create_subif_reply
452{
453 u32 context;
454 i32 retval;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100455 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800456};
457
458/** \brief Create a new subinterface with the given vlan id
459 @param client_index - opaque cookie to identify the sender
460 @param context - sender context, to match reply w/ request
461 @param sw_if_index - software index of the new vlan's parent interface
462 @param vlan_id - vlan tag of the new interface
463*/
464define create_vlan_subif
465{
466 u32 client_index;
467 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100468 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800469 u32 vlan_id;
470};
471
472/** \brief Reply for the vlan subinterface create request
473 @param context - returned sender context, to match reply w/ request
474 @param retval - return code
475 @param sw_if_index - software index allocated for the new subinterface
476*/
477define create_vlan_subif_reply
478{
479 u32 context;
480 i32 retval;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100481 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800482};
483
484/** \brief Delete sub interface request
485 @param client_index - opaque cookie to identify the sender
486 @param context - sender context, to match reply w/ request
487 @param sw_if_index - sw index of the interface that was created by create_subif
488*/
489autoreply define delete_subif {
490 u32 client_index;
491 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100492 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800493};
494
495/** \brief Create loopback interface request
496 @param client_index - opaque cookie to identify the sender
497 @param context - sender context, to match reply w/ request
498 @param mac_address - mac addr to assign to the interface if none-zero
499*/
500define create_loopback
501{
502 u32 client_index;
503 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100504 vl_api_mac_address_t mac_address;
Neale Rannsb8d44812017-11-10 06:53:54 -0800505};
506
507/** \brief Create loopback interface response
508 @param context - sender context, to match reply w/ request
509 @param sw_if_index - sw index of the interface that was created
510 @param retval - return code for the request
511*/
512define create_loopback_reply
513{
514 u32 context;
515 i32 retval;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100516 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800517};
518
519/** \brief Create loopback interface instance request
520 @param client_index - opaque cookie to identify the sender
521 @param context - sender context, to match reply w/ request
522 @param mac_address - mac addr to assign to the interface if none-zero
523 @param is_specified - if non-0, a specific user_instance is being requested
524 @param user_instance - requested instance, ~0 => dynamically allocate
525*/
526define create_loopback_instance
527{
528 u32 client_index;
529 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100530 vl_api_mac_address_t mac_address;
531 bool is_specified;
Neale Rannsb8d44812017-11-10 06:53:54 -0800532 u32 user_instance;
533};
534
535/** \brief Create loopback interface instance response
536 @param context - sender context, to match reply w/ request
537 @param sw_if_index - sw index of the interface that was created
538 @param retval - return code for the request
539*/
540define create_loopback_instance_reply
541{
542 u32 context;
543 i32 retval;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100544 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800545};
546
547/** \brief Delete loopback interface request
548 @param client_index - opaque cookie to identify the sender
549 @param context - sender context, to match reply w/ request
550 @param sw_if_index - sw index of the interface that was created
551*/
552autoreply define delete_loopback
553{
554 u32 client_index;
555 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100556 vl_api_interface_index_t sw_if_index;
Neale Rannsb8d44812017-11-10 06:53:54 -0800557};
558
Neale Ranns6f4a6be2018-03-16 16:26:21 -0700559/** \brief Enable or disable detailed interface stats
560 @param client_index - opaque cookie to identify the sender
561 @param context - sender context, to match reply w/ request
Neale Ranns0cae3f72018-03-21 09:44:01 -0400562 @param sw_if_index - The interface to collect detail stats on. ~0 implies
563 all interfaces.
Neale Ranns6f4a6be2018-03-16 16:26:21 -0700564 @param enable_disable - set to 1 to enable, 0 to disable detailed stats
565*/
566autoreply define collect_detailed_interface_stats
567{
568 u32 client_index;
569 u32 context;
Jakub Grajciar053204a2019-03-18 13:17:53 +0100570 vl_api_interface_index_t sw_if_index;
571 bool enable_disable;
Neale Ranns6f4a6be2018-03-16 16:26:21 -0700572};
573
Dave Barach6d963c22016-12-05 09:50:05 -0500574/*
575 * Local Variables:
576 * eval: (c-set-style "gnu")
577 * End:
578 */