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