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