Ole Troan | d723161 | 2018-06-07 10:17:57 +0200 | [diff] [blame] | 1 | option version = "2.0.0"; |
Dave Barach | 0d056e5 | 2017-09-28 15:11:16 -0400 | [diff] [blame] | 2 | |
Marek Gradzki | 51e5968 | 2018-03-06 10:05:44 +0100 | [diff] [blame] | 3 | service { |
| 4 | rpc want_interface_events returns want_interface_events_reply |
| 5 | events sw_interface_event; |
| 6 | }; |
| 7 | |
Dave Barach | aff7077 | 2016-10-31 11:59:07 -0400 | [diff] [blame] | 8 | /** \brief Set flags on the interface |
| 9 | @param client_index - opaque cookie to identify the sender |
| 10 | @param context - sender context, to match reply w/ request |
| 11 | @param sw_if_index - index of the interface to set flags on |
| 12 | @param admin_up_down - set the admin state, 1 = up, 0 = down |
| 13 | @param link_up_down - Oper state sent on change event, not used in config. |
Dave Barach | aff7077 | 2016-10-31 11:59:07 -0400 | [diff] [blame] | 14 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 15 | autoreply define sw_interface_set_flags |
Dave Barach | aff7077 | 2016-10-31 11:59:07 -0400 | [diff] [blame] | 16 | { |
| 17 | u32 client_index; |
| 18 | u32 context; |
| 19 | u32 sw_if_index; |
| 20 | /* 1 = up, 0 = down */ |
| 21 | u8 admin_up_down; |
Dave Barach | aff7077 | 2016-10-31 11:59:07 -0400 | [diff] [blame] | 22 | }; |
| 23 | |
Ole Troan | d723161 | 2018-06-07 10:17:57 +0200 | [diff] [blame] | 24 | /** \brief Set interface physical MTU |
Matus Fabian | d162f3d | 2016-12-05 01:05:35 -0800 | [diff] [blame] | 25 | @param client_index - opaque cookie to identify the sender |
| 26 | @param context - sender context, to match reply w/ request |
| 27 | @param sw_if_index - index of the interface to set MTU on |
| 28 | @param mtu - MTU |
| 29 | */ |
Ole Troan | d723161 | 2018-06-07 10:17:57 +0200 | [diff] [blame] | 30 | autoreply define hw_interface_set_mtu |
Matus Fabian | d162f3d | 2016-12-05 01:05:35 -0800 | [diff] [blame] | 31 | { |
| 32 | u32 client_index; |
| 33 | u32 context; |
| 34 | u32 sw_if_index; |
| 35 | u16 mtu; |
| 36 | }; |
| 37 | |
Ole Troan | d723161 | 2018-06-07 10:17:57 +0200 | [diff] [blame] | 38 | /** \brief Set interface L3 MTU */ |
| 39 | autoreply define sw_interface_set_mtu |
| 40 | { |
| 41 | u32 client_index; |
| 42 | u32 context; |
| 43 | u32 sw_if_index; |
| 44 | /* $$$$ Replace with enum */ |
| 45 | u32 mtu[4]; /* 0 - L3, 1 - IP4, 2 - IP6, 3 - MPLS */ |
| 46 | }; |
| 47 | |
| 48 | |
Neale Ranns | a07bd70 | 2017-08-07 07:53:49 -0700 | [diff] [blame] | 49 | /** \brief Interface Event generated by want_interface_events |
Neale Ranns | d292ab1 | 2017-08-15 12:29:48 -0700 | [diff] [blame] | 50 | @param client_index - opaque cookie to identify the sender |
| 51 | @param pid - client pid registered to receive notification |
Neale Ranns | a07bd70 | 2017-08-07 07:53:49 -0700 | [diff] [blame] | 52 | @param sw_if_index - index of the interface of the event |
| 53 | @param admin_up_down - The administrative state; 1 = up, 0 = down |
| 54 | @param link_up_down - The operational state; 1 = up, 0 = down |
| 55 | @param deleted - interface was deleted |
| 56 | */ |
| 57 | define sw_interface_event |
| 58 | { |
Neale Ranns | d292ab1 | 2017-08-15 12:29:48 -0700 | [diff] [blame] | 59 | u32 client_index; |
| 60 | u32 pid; |
Neale Ranns | a07bd70 | 2017-08-07 07:53:49 -0700 | [diff] [blame] | 61 | u32 sw_if_index; |
| 62 | u8 admin_up_down; |
| 63 | u8 link_up_down; |
| 64 | u8 deleted; |
| 65 | }; |
| 66 | |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 67 | /** \brief Register for interface events |
| 68 | @param client_index - opaque cookie to identify the sender |
| 69 | @param context - sender context, to match reply w/ request |
| 70 | @param enable_disable - 1 => register for events, 0 => cancel registration |
| 71 | @param pid - sender's pid |
| 72 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 73 | autoreply define want_interface_events |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 74 | { |
| 75 | u32 client_index; |
| 76 | u32 context; |
| 77 | u32 enable_disable; |
| 78 | u32 pid; |
| 79 | }; |
| 80 | |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 81 | /** \brief Interface details structure (fix this) |
| 82 | @param sw_if_index - index of the interface |
| 83 | @param sup_sw_if_index - index of parent interface if any, else same as sw_if_index |
| 84 | @param l2_address_length - length of the interface's l2 address |
| 85 | @param pid - the interface's l2 address |
| 86 | @param interface_name - name of the interface |
| 87 | @param link_duplex - 1 if half duplex, 2 if full duplex |
| 88 | @param link_speed - 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G |
Damjan Marion | fe7d4a2 | 2018-04-13 19:43:39 +0200 | [diff] [blame] | 89 | @param link_MTU - max. transmittion unit |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 90 | @param sub_if_id - A number 0-N to uniquely identify this subif on super if |
Pavel Kotucek | 65e8457 | 2017-01-16 17:01:56 +0100 | [diff] [blame] | 91 | @param sub_dot1ad - 0 = dot1q, 1 = dot1ad |
| 92 | @param sub_dot1ah - 1 = dot1ah, 0 = otherwise |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 93 | @param sub_number_of_tags - Number of tags (0 - 2) |
| 94 | @param sub_outer_vlan_id |
| 95 | @param sub_inner_vlan_id |
| 96 | @param sub_exact_match |
| 97 | @param sub_default |
| 98 | @param sub_outer_vlan_id_any |
| 99 | @param sub_inner_vlan_id_any |
| 100 | @param vtr_op - vlan tag rewrite operation |
| 101 | @param vtr_push_dot1q |
| 102 | @param vtr_tag1 |
| 103 | @param vtr_tag2 |
Pavel Kotucek | 65e8457 | 2017-01-16 17:01:56 +0100 | [diff] [blame] | 104 | @param pbb_outer_tag - translate pbb s-tag |
| 105 | @param pbb_b_dmac[6] - B-tag remote mac address |
| 106 | @param pbb_b_smac[6] - B-tag local mac address |
| 107 | @param pbb_b_vlanid - B-tag vlanid |
| 108 | @param pbb_i_sid - I-tag service id |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 109 | */ |
| 110 | define sw_interface_details |
| 111 | { |
| 112 | u32 context; |
| 113 | u32 sw_if_index; |
| 114 | |
| 115 | /* index of sup interface (e.g. hw interface). |
| 116 | equal to sw_if_index for super hw interface. */ |
| 117 | u32 sup_sw_if_index; |
| 118 | |
| 119 | /* Layer 2 address, if applicable */ |
| 120 | u32 l2_address_length; |
| 121 | u8 l2_address[8]; |
| 122 | |
| 123 | /* Interface name */ |
| 124 | u8 interface_name[64]; |
| 125 | |
| 126 | /* 1 = up, 0 = down */ |
| 127 | u8 admin_up_down; |
| 128 | u8 link_up_down; |
| 129 | |
| 130 | /* 1 = half duplex, 2 = full duplex */ |
| 131 | u8 link_duplex; |
| 132 | |
| 133 | /* 1 = 10M, 2 = 100M, 4 = 1G, 8 = 10G, 16 = 40G, 32 = 100G */ |
| 134 | u8 link_speed; |
| 135 | |
| 136 | /* MTU */ |
Damjan Marion | fe7d4a2 | 2018-04-13 19:43:39 +0200 | [diff] [blame] | 137 | u16 link_mtu; |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 138 | |
Ole Troan | d723161 | 2018-06-07 10:17:57 +0200 | [diff] [blame] | 139 | /* Per protocol MTUs */ |
| 140 | u32 mtu[4]; /* 0 - L3, 1 - IP4, 2 - IP6, 3 - MPLS */ |
| 141 | |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 142 | /* Subinterface ID. A number 0-N to uniquely identify this subinterface under the super interface */ |
| 143 | u32 sub_id; |
| 144 | |
| 145 | /* 0 = dot1q, 1=dot1ad */ |
| 146 | u8 sub_dot1ad; |
Pavel Kotucek | 65e8457 | 2017-01-16 17:01:56 +0100 | [diff] [blame] | 147 | /* 1 = dot1h, 1=otherwise */ |
| 148 | u8 sub_dot1ah; |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 149 | |
| 150 | /* Number of tags 0-2 */ |
| 151 | u8 sub_number_of_tags; |
| 152 | u16 sub_outer_vlan_id; |
| 153 | u16 sub_inner_vlan_id; |
| 154 | u8 sub_exact_match; |
| 155 | u8 sub_default; |
| 156 | u8 sub_outer_vlan_id_any; |
| 157 | u8 sub_inner_vlan_id_any; |
| 158 | |
| 159 | /* vlan tag rewrite state */ |
| 160 | u32 vtr_op; |
| 161 | u32 vtr_push_dot1q; // ethertype of first pushed tag is dot1q/dot1ad |
| 162 | u32 vtr_tag1; // first pushed tag |
| 163 | u32 vtr_tag2; // second pushed tag |
| 164 | u8 tag[64]; |
Pavel Kotucek | 65e8457 | 2017-01-16 17:01:56 +0100 | [diff] [blame] | 165 | |
| 166 | /* pbb tag rewrite info */ |
| 167 | u16 outer_tag; |
| 168 | u8 b_dmac[6]; |
| 169 | u8 b_smac[6]; |
| 170 | u16 b_vlanid; |
| 171 | u32 i_sid; |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 172 | }; |
| 173 | |
| 174 | /* works */ |
| 175 | define sw_interface_dump |
| 176 | { |
| 177 | u32 client_index; |
| 178 | u32 context; |
| 179 | u8 name_filter_valid; |
| 180 | u8 name_filter[49]; |
| 181 | }; |
| 182 | |
| 183 | /** \brief Set or delete one or all ip addresses on a specified interface |
| 184 | @param client_index - opaque cookie to identify the sender |
| 185 | @param context - sender context, to match reply w/ request |
| 186 | @param sw_if_index - index of the interface to add/del addresses |
| 187 | @param is_add - add address if non-zero, else delete |
| 188 | @param is_ipv6 - if non-zero the address is ipv6, else ipv4 |
| 189 | @param del_all - if non-zero delete all addresses on the interface |
| 190 | @param address_length - address length in bytes, 4 for ip4, 16 for ip6 |
| 191 | @param address - array of address bytes |
| 192 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 193 | autoreply define sw_interface_add_del_address |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 194 | { |
| 195 | u32 client_index; |
| 196 | u32 context; |
| 197 | u32 sw_if_index; |
| 198 | u8 is_add; |
| 199 | u8 is_ipv6; |
| 200 | u8 del_all; |
| 201 | u8 address_length; |
| 202 | u8 address[16]; |
| 203 | }; |
| 204 | |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 205 | /** \brief Associate the specified interface with a fib table |
| 206 | @param client_index - opaque cookie to identify the sender |
| 207 | @param context - sender context, to match reply w/ request |
| 208 | @param sw_if_index - index of the interface |
| 209 | @param is_ipv6 - if non-zero ipv6, else ipv4 |
| 210 | @param vrf_id - fib table/vrd id to associate the interface with |
| 211 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 212 | autoreply define sw_interface_set_table |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 213 | { |
| 214 | u32 client_index; |
| 215 | u32 context; |
| 216 | u32 sw_if_index; |
| 217 | u8 is_ipv6; |
| 218 | u32 vrf_id; |
| 219 | }; |
| 220 | |
Juraj Sloboda | dfc1923 | 2016-12-05 13:20:37 +0100 | [diff] [blame] | 221 | /** \brief Get VRF id assigned to interface |
| 222 | @param client_index - opaque cookie to identify the sender |
| 223 | @param context - sender context, to match reply w/ request |
| 224 | @param sw_if_index - index of the interface |
| 225 | */ |
| 226 | define sw_interface_get_table |
| 227 | { |
| 228 | u32 client_index; |
| 229 | u32 context; |
| 230 | u32 sw_if_index; |
| 231 | u8 is_ipv6; |
| 232 | }; |
| 233 | |
| 234 | /** \brief Reply to get_sw_interface_vrf |
| 235 | @param context - sender context which was passed in the request |
| 236 | @param vrf_id - VRF id assigned to the interface |
| 237 | */ |
| 238 | define sw_interface_get_table_reply |
| 239 | { |
| 240 | u32 context; |
| 241 | i32 retval; |
| 242 | u32 vrf_id; |
| 243 | }; |
| 244 | |
Aloys Augustin | ee55198 | 2017-02-17 14:55:29 +0100 | [diff] [blame] | 245 | typeonly manual_print manual_endian define vlib_counter |
| 246 | { |
| 247 | u64 packets; /**< packet counter */ |
| 248 | u64 bytes; /**< byte counter */ |
| 249 | }; |
| 250 | |
Keith Burns (alagalah) | 831fb59 | 2017-09-12 15:12:17 -0700 | [diff] [blame] | 251 | /** \brief Combined interface counter data type for vnet_interface_combined_counters |
| 252 | @param sw_if_index - interface indexes for counters |
| 253 | @param rx_packets - received packet count |
| 254 | @param rx_bytes - received byte count |
Neale Ranns | 6f4a6be | 2018-03-16 16:26:21 -0700 | [diff] [blame] | 255 | @param rx_unicast_packets - received unicast packet count |
| 256 | @param rx_unicast_bytes - received unicast byte count |
| 257 | @param rx_multicast_packets - received multicast packet count |
| 258 | @param rx_multicast_bytes - received multicast byte count |
| 259 | @param rx_broadcast_packets - received broadcast packet count |
| 260 | @param rx_broadcast_bytes - received broadcast byte count |
Keith Burns (alagalah) | 831fb59 | 2017-09-12 15:12:17 -0700 | [diff] [blame] | 261 | @param tx_packets - transmitted packet count |
| 262 | @param tx_bytes - transmitted byte count |
Neale Ranns | 6f4a6be | 2018-03-16 16:26:21 -0700 | [diff] [blame] | 263 | @param tx_unicast_packets - transmitted unicast packet count |
| 264 | @param tx_unicast_bytes - transmitted unicast byte count |
| 265 | @param tx_multicast_packets - transmitted multicast packet count |
| 266 | @param tx_multicast_bytes - transmitted multicast byte count |
| 267 | @param tx_broadcast_packets - transmitted broadcast packet count |
| 268 | @param tx_broadcast_bytes - transmitted broadcast byte count |
Keith Burns (alagalah) | 831fb59 | 2017-09-12 15:12:17 -0700 | [diff] [blame] | 269 | |
| 270 | */ |
| 271 | typeonly manual_print manual_endian define vnet_combined_counter |
| 272 | { |
| 273 | u32 sw_if_index; |
Neale Ranns | 6f4a6be | 2018-03-16 16:26:21 -0700 | [diff] [blame] | 274 | u64 rx_packets; /**< packet counter */ |
| 275 | u64 rx_bytes; /**< byte counter */ |
| 276 | u64 rx_unicast_packets; /**< packet counter */ |
| 277 | u64 rx_unicast_bytes; /**< byte counter */ |
| 278 | u64 rx_multicast_packets; /**< packet counter */ |
| 279 | u64 rx_multicast_bytes; /**< byte counter */ |
| 280 | u64 rx_broadcast_packets; /**< packet counter */ |
| 281 | u64 rx_broadcast_bytes; /**< byte counter */ |
| 282 | u64 tx_packets; /**< packet counter */ |
| 283 | u64 tx_bytes; /**< byte counter */ |
| 284 | u64 tx_unicast_packets; /**< packet counter */ |
| 285 | u64 tx_unicast_bytes; /**< byte counter */ |
| 286 | u64 tx_multicast_packets; /**< packet counter */ |
| 287 | u64 tx_multicast_bytes; /**< byte counter */ |
| 288 | u64 tx_broadcast_packets; /**< packet counter */ |
| 289 | u64 tx_broadcast_bytes; /**< byte counter */ |
Keith Burns (alagalah) | 831fb59 | 2017-09-12 15:12:17 -0700 | [diff] [blame] | 290 | }; |
| 291 | |
| 292 | /** \brief Simple interface counter data type for vnet_interface_simple_counters |
| 293 | @param sw_if_index - interface indexes for counters |
| 294 | @param drop - RX or TX drops due to buffer starvation |
| 295 | @param punt - used with VNET "punt" disposition |
| 296 | @param rx_ip4 - received IP4 packets |
| 297 | @param rx_ip6 - received IP6 packets |
| 298 | @param rx_no_buffer - no RX buffers available |
| 299 | @param rx_miss - receive misses |
| 300 | @param rx_error - receive errors |
| 301 | @param tx_error - transmit errors |
| 302 | @param rx_mpls - received MPLS packet |
| 303 | |
| 304 | */ |
| 305 | typeonly manual_print manual_endian define vnet_simple_counter |
| 306 | { |
| 307 | u32 sw_if_index; |
| 308 | u64 drop; |
| 309 | u64 punt; |
| 310 | u64 rx_ip4; |
| 311 | u64 rx_ip6; |
| 312 | u64 rx_no_buffer; |
| 313 | u64 rx_miss; |
| 314 | u64 rx_error; |
| 315 | u64 tx_error; |
| 316 | u64 rx_mpls; |
| 317 | }; |
| 318 | |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 319 | /** \brief Set unnumbered interface add / del request |
| 320 | @param client_index - opaque cookie to identify the sender |
| 321 | @param context - sender context, to match reply w/ request |
| 322 | @param sw_if_index - interface with an IP address |
| 323 | @param unnumbered_sw_if_index - interface which will use the address |
| 324 | @param is_add - if non-zero set the association, else unset it |
| 325 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 326 | autoreply define sw_interface_set_unnumbered |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 327 | { |
| 328 | u32 client_index; |
| 329 | u32 context; |
| 330 | u32 sw_if_index; /* use this intfc address */ |
| 331 | u32 unnumbered_sw_if_index; /* on this interface */ |
| 332 | u8 is_add; |
| 333 | }; |
| 334 | |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 335 | /** \brief Clear interface statistics |
| 336 | @param client_index - opaque cookie to identify the sender |
| 337 | @param context - sender context, to match reply w/ request |
| 338 | @param sw_if_index - index of the interface to clear statistics |
| 339 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 340 | autoreply define sw_interface_clear_stats |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 341 | { |
| 342 | u32 client_index; |
| 343 | u32 context; |
| 344 | u32 sw_if_index; |
| 345 | }; |
| 346 | |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 347 | /** \brief Set / clear software interface tag |
| 348 | @param client_index - opaque cookie to identify the sender |
| 349 | @param context - sender context, to match reply w/ request |
| 350 | @param sw_if_index - the interface |
| 351 | @param add_del - 1 = add, 0 = delete |
| 352 | @param tag - an ascii tag |
| 353 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 354 | autoreply define sw_interface_tag_add_del |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 355 | { |
| 356 | u32 client_index; |
| 357 | u32 context; |
| 358 | u8 is_add; |
| 359 | u32 sw_if_index; |
| 360 | u8 tag[64]; |
| 361 | }; |
| 362 | |
Jon Loeliger | 10c273b | 2017-03-30 08:39:33 -0500 | [diff] [blame] | 363 | /** \brief Set an interface's MAC address |
| 364 | @param client_index - opaque cookie to identify the sender |
| 365 | @param context - sender context, to match reply w/ request |
| 366 | @param sw_if_index - the interface whose MAC will be set |
| 367 | @param mac_addr - the new MAC address |
| 368 | */ |
Dave Barach | 11b8dbf | 2017-04-24 10:46:54 -0400 | [diff] [blame] | 369 | autoreply define sw_interface_set_mac_address |
Jon Loeliger | 10c273b | 2017-03-30 08:39:33 -0500 | [diff] [blame] | 370 | { |
| 371 | u32 client_index; |
| 372 | u32 context; |
| 373 | u32 sw_if_index; |
| 374 | u8 mac_address[6]; |
| 375 | }; |
| 376 | |
Juraj Sloboda | c037423 | 2018-02-01 15:18:49 +0100 | [diff] [blame] | 377 | /** \brief Get interface's MAC address |
| 378 | @param client_index - opaque cookie to identify the sender |
| 379 | @param context - sender context, to match reply w/ request |
| 380 | @param sw_if_index - the interface whose MAC will be returned |
| 381 | */ |
| 382 | define sw_interface_get_mac_address |
| 383 | { |
| 384 | u32 client_index; |
| 385 | u32 context; |
| 386 | u32 sw_if_index; |
| 387 | }; |
| 388 | |
| 389 | /** \brief Reply for get interface's MAC address request |
| 390 | @param context - returned sender context, to match reply w/ request |
| 391 | @param retval - return code |
| 392 | @param mac_addr - returned interface's MAC address |
| 393 | */ |
| 394 | define sw_interface_get_mac_address_reply |
| 395 | { |
| 396 | u32 context; |
| 397 | i32 retval; |
| 398 | u8 mac_address[6]; |
| 399 | }; |
| 400 | |
Steven | ad8015b | 2017-10-29 22:10:46 -0700 | [diff] [blame] | 401 | /** \brief Set an interface's rx-mode |
| 402 | @param client_index - opaque cookie to identify the sender |
| 403 | @param context - sender context, to match reply w/ request |
| 404 | @param sw_if_index - the interface whose rx-mode will be set |
| 405 | @param queue_id_valid - 1 = the queue_id field is valid. 0 means all |
| 406 | queue_id's |
| 407 | @param queue_id - the queue number whose rx-mode will be set. Only valid |
| 408 | if queue_id_valid is 1 |
| 409 | @param mode - polling=1, interrupt=2, adaptive=3 |
| 410 | */ |
| 411 | autoreply define sw_interface_set_rx_mode |
| 412 | { |
| 413 | u32 client_index; |
| 414 | u32 context; |
| 415 | u32 sw_if_index; |
| 416 | u8 queue_id_valid; |
| 417 | u32 queue_id; |
| 418 | u8 mode; |
| 419 | }; |
| 420 | |
Neale Ranns | b8d4481 | 2017-11-10 06:53:54 -0800 | [diff] [blame] | 421 | /* Gross kludge, DGMS */ |
| 422 | autoreply define interface_name_renumber |
| 423 | { |
| 424 | u32 client_index; |
| 425 | u32 context; |
| 426 | u32 sw_if_index; |
| 427 | u32 new_show_dev_instance; |
| 428 | }; |
| 429 | |
| 430 | define create_subif |
| 431 | { |
| 432 | u32 client_index; |
| 433 | u32 context; |
| 434 | u32 sw_if_index; |
| 435 | u32 sub_id; |
| 436 | |
| 437 | /* These fields map directly onto the subif template */ |
| 438 | u8 no_tags; |
| 439 | u8 one_tag; |
| 440 | u8 two_tags; |
| 441 | u8 dot1ad; // 0 = dot1q, 1=dot1ad |
| 442 | u8 exact_match; |
| 443 | u8 default_sub; |
| 444 | u8 outer_vlan_id_any; |
| 445 | u8 inner_vlan_id_any; |
| 446 | u16 outer_vlan_id; |
| 447 | u16 inner_vlan_id; |
| 448 | }; |
| 449 | |
| 450 | define create_subif_reply |
| 451 | { |
| 452 | u32 context; |
| 453 | i32 retval; |
| 454 | u32 sw_if_index; |
| 455 | }; |
| 456 | |
| 457 | /** \brief Create a new subinterface with the given vlan id |
| 458 | @param client_index - opaque cookie to identify the sender |
| 459 | @param context - sender context, to match reply w/ request |
| 460 | @param sw_if_index - software index of the new vlan's parent interface |
| 461 | @param vlan_id - vlan tag of the new interface |
| 462 | */ |
| 463 | define create_vlan_subif |
| 464 | { |
| 465 | u32 client_index; |
| 466 | u32 context; |
| 467 | u32 sw_if_index; |
| 468 | u32 vlan_id; |
| 469 | }; |
| 470 | |
| 471 | /** \brief Reply for the vlan subinterface create request |
| 472 | @param context - returned sender context, to match reply w/ request |
| 473 | @param retval - return code |
| 474 | @param sw_if_index - software index allocated for the new subinterface |
| 475 | */ |
| 476 | define create_vlan_subif_reply |
| 477 | { |
| 478 | u32 context; |
| 479 | i32 retval; |
| 480 | u32 sw_if_index; |
| 481 | }; |
| 482 | |
| 483 | /** \brief Delete sub interface request |
| 484 | @param client_index - opaque cookie to identify the sender |
| 485 | @param context - sender context, to match reply w/ request |
| 486 | @param sw_if_index - sw index of the interface that was created by create_subif |
| 487 | */ |
| 488 | autoreply define delete_subif { |
| 489 | u32 client_index; |
| 490 | u32 context; |
| 491 | u32 sw_if_index; |
| 492 | }; |
| 493 | |
| 494 | /** \brief Create loopback interface request |
| 495 | @param client_index - opaque cookie to identify the sender |
| 496 | @param context - sender context, to match reply w/ request |
| 497 | @param mac_address - mac addr to assign to the interface if none-zero |
| 498 | */ |
| 499 | define create_loopback |
| 500 | { |
| 501 | u32 client_index; |
| 502 | u32 context; |
| 503 | u8 mac_address[6]; |
| 504 | }; |
| 505 | |
| 506 | /** \brief Create loopback interface response |
| 507 | @param context - sender context, to match reply w/ request |
| 508 | @param sw_if_index - sw index of the interface that was created |
| 509 | @param retval - return code for the request |
| 510 | */ |
| 511 | define create_loopback_reply |
| 512 | { |
| 513 | u32 context; |
| 514 | i32 retval; |
| 515 | u32 sw_if_index; |
| 516 | }; |
| 517 | |
| 518 | /** \brief Create loopback interface instance request |
| 519 | @param client_index - opaque cookie to identify the sender |
| 520 | @param context - sender context, to match reply w/ request |
| 521 | @param mac_address - mac addr to assign to the interface if none-zero |
| 522 | @param is_specified - if non-0, a specific user_instance is being requested |
| 523 | @param user_instance - requested instance, ~0 => dynamically allocate |
| 524 | */ |
| 525 | define create_loopback_instance |
| 526 | { |
| 527 | u32 client_index; |
| 528 | u32 context; |
| 529 | u8 mac_address[6]; |
| 530 | u8 is_specified; |
| 531 | u32 user_instance; |
| 532 | }; |
| 533 | |
| 534 | /** \brief Create loopback interface instance response |
| 535 | @param context - sender context, to match reply w/ request |
| 536 | @param sw_if_index - sw index of the interface that was created |
| 537 | @param retval - return code for the request |
| 538 | */ |
| 539 | define create_loopback_instance_reply |
| 540 | { |
| 541 | u32 context; |
| 542 | i32 retval; |
| 543 | u32 sw_if_index; |
| 544 | }; |
| 545 | |
| 546 | /** \brief Delete loopback interface request |
| 547 | @param client_index - opaque cookie to identify the sender |
| 548 | @param context - sender context, to match reply w/ request |
| 549 | @param sw_if_index - sw index of the interface that was created |
| 550 | */ |
| 551 | autoreply define delete_loopback |
| 552 | { |
| 553 | u32 client_index; |
| 554 | u32 context; |
| 555 | u32 sw_if_index; |
| 556 | }; |
| 557 | |
Neale Ranns | 6f4a6be | 2018-03-16 16:26:21 -0700 | [diff] [blame] | 558 | /** \brief Enable or disable detailed interface stats |
| 559 | @param client_index - opaque cookie to identify the sender |
| 560 | @param context - sender context, to match reply w/ request |
Neale Ranns | 0cae3f7 | 2018-03-21 09:44:01 -0400 | [diff] [blame] | 561 | @param sw_if_index - The interface to collect detail stats on. ~0 implies |
| 562 | all interfaces. |
Neale Ranns | 6f4a6be | 2018-03-16 16:26:21 -0700 | [diff] [blame] | 563 | @param enable_disable - set to 1 to enable, 0 to disable detailed stats |
| 564 | */ |
| 565 | autoreply define collect_detailed_interface_stats |
| 566 | { |
| 567 | u32 client_index; |
| 568 | u32 context; |
Neale Ranns | 0cae3f7 | 2018-03-21 09:44:01 -0400 | [diff] [blame] | 569 | u32 sw_if_index; |
| 570 | u8 enable_disable; |
Neale Ranns | 6f4a6be | 2018-03-16 16:26:21 -0700 | [diff] [blame] | 571 | }; |
| 572 | |
Dave Barach | 6d963c2 | 2016-12-05 09:50:05 -0500 | [diff] [blame] | 573 | /* |
| 574 | * Local Variables: |
| 575 | * eval: (c-set-style "gnu") |
| 576 | * End: |
| 577 | */ |