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