1 option version = "2.2.0";
4 rpc want_interface_events returns want_interface_events_reply
5 events sw_interface_event;
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.
15 autoreply define sw_interface_set_flags
20 /* 1 = up, 0 = down */
24 /** \brief Set interface physical 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
30 autoreply define hw_interface_set_mtu
38 /** \brief Set interface L3 MTU */
39 autoreply define sw_interface_set_mtu
44 /* $$$$ Replace with enum */
45 u32 mtu[4]; /* 0 - L3, 1 - IP4, 2 - IP6, 3 - MPLS */
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
54 autoreply define sw_interface_set_ip_directed_broadcast
63 /** \brief Interface Event generated by want_interface_events
64 @param client_index - opaque cookie to identify the sender
65 @param pid - client pid registered to receive notification
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
71 define sw_interface_event
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
87 autoreply define want_interface_events
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 - value in kbps
103 @param link_MTU - max. transmission unit
104 @param sub_if_id - A number 0-N to uniquely identify this subif on super if
105 @param sub_dot1ad - 0 = dot1q, 1 = dot1ad
106 @param sub_dot1ah - 1 = dot1ah, 0 = otherwise
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
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
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
124 define sw_interface_details
129 /* index of sup interface (e.g. hw interface).
130 equal to sw_if_index for super hw interface. */
133 /* Layer 2 address, if applicable */
134 u32 l2_address_length;
138 u8 interface_name[64];
140 /* 1 = up, 0 = down */
144 /* 1 = half duplex, 2 = full duplex */
147 /* link speed in kbps */
153 /* Per protocol MTUs */
154 u32 mtu[4]; /* 0 - L3, 1 - IP4, 2 - IP6, 3 - MPLS */
156 /* Subinterface ID. A number 0-N to uniquely identify this subinterface under the super interface */
159 /* 0 = dot1q, 1=dot1ad */
161 /* 1 = dot1h, 1=otherwise */
164 /* Number of tags 0-2 */
165 u8 sub_number_of_tags;
166 u16 sub_outer_vlan_id;
167 u16 sub_inner_vlan_id;
170 u8 sub_outer_vlan_id_any;
171 u8 sub_inner_vlan_id_any;
173 /* vlan tag rewrite state */
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
180 /* pbb tag rewrite info */
189 define sw_interface_dump
193 u8 name_filter_valid;
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
207 autoreply define sw_interface_add_del_address
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
226 autoreply define sw_interface_set_table
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
240 define sw_interface_get_table
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
252 define sw_interface_get_table_reply
259 typeonly manual_print manual_endian define vlib_counter
261 u64 packets; /**< packet counter */
262 u64 bytes; /**< byte counter */
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
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
275 @param tx_packets - transmitted packet count
276 @param tx_bytes - transmitted byte count
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
285 typeonly manual_print manual_endian define vnet_combined_counter
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 */
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
319 typeonly manual_print manual_endian define vnet_simple_counter
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
340 autoreply define sw_interface_set_unnumbered
344 u32 sw_if_index; /* use this intfc address */
345 u32 unnumbered_sw_if_index; /* on this interface */
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
354 autoreply define sw_interface_clear_stats
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
368 autoreply define sw_interface_tag_add_del
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
383 autoreply define sw_interface_set_mac_address
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
396 define sw_interface_get_mac_address
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
408 define sw_interface_get_mac_address_reply
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
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
425 autoreply define sw_interface_set_rx_mode
435 /** \brief Set an interface's rx-placement
436 Rx-Queue placement on specific thread is operational for only hardware
437 interface. It will not set queue - thread placement for sub-interfaces,
438 p2p and pipe interfaces.
439 @param client_index - opaque cookie to identify the sender
440 @param context - sender context, to match reply w/ request
441 @param sw_if_index - the interface whose rx-placement will be set
442 @param queue_id - the queue number whose rx-placement will be set.
443 @param worker_id - the worker number whom rx-placement will be at.
444 @param is_main - flag to set rx-placement to main thread
446 autoreply define sw_interface_set_rx_placement
456 /** \brief dump the rx queue placement of interface(s)
457 @param sw_if_index - optional interface index for which queue placement to
458 be requested. sw_if_index = ~0 will dump placement information for all
459 interfaces. It will not dump information related to sub-interfaces, p2p
462 define sw_interface_rx_placement_dump
469 /** \brief show the interface's queue - thread placement
470 This api is used to display the interface and queue worker
471 thread placement. One message per rx-queue per interface will
473 Each message will contain information about rx-queue id of an
474 interface, interface index, thread on which this rx-queue is
475 placed and mode of rx-queue.
476 @param client_index - opaque cookie to identify the sender
477 @param context - sender context, to match reply w/ request
478 @param sw_if_index - the interface whose rx-placement will be dumped
479 @param queue_id - the queue id
480 @param worker_id - the worker id on which queue_id is placed,
481 worker_id = 0 means main thread.
482 @param mode - polling=1, interrupt=2, adaptive=3
484 define sw_interface_rx_placement_details
494 /* Gross kludge, DGMS */
495 autoreply define interface_name_renumber
500 u32 new_show_dev_instance;
510 /* These fields map directly onto the subif template */
514 u8 dot1ad; // 0 = dot1q, 1=dot1ad
517 u8 outer_vlan_id_any;
518 u8 inner_vlan_id_any;
523 define create_subif_reply
530 /** \brief Create a new subinterface with the given vlan id
531 @param client_index - opaque cookie to identify the sender
532 @param context - sender context, to match reply w/ request
533 @param sw_if_index - software index of the new vlan's parent interface
534 @param vlan_id - vlan tag of the new interface
536 define create_vlan_subif
544 /** \brief Reply for the vlan subinterface create request
545 @param context - returned sender context, to match reply w/ request
546 @param retval - return code
547 @param sw_if_index - software index allocated for the new subinterface
549 define create_vlan_subif_reply
556 /** \brief Delete sub interface request
557 @param client_index - opaque cookie to identify the sender
558 @param context - sender context, to match reply w/ request
559 @param sw_if_index - sw index of the interface that was created by create_subif
561 autoreply define delete_subif {
567 /** \brief Create loopback interface request
568 @param client_index - opaque cookie to identify the sender
569 @param context - sender context, to match reply w/ request
570 @param mac_address - mac addr to assign to the interface if none-zero
572 define create_loopback
579 /** \brief Create loopback interface response
580 @param context - sender context, to match reply w/ request
581 @param sw_if_index - sw index of the interface that was created
582 @param retval - return code for the request
584 define create_loopback_reply
591 /** \brief Create loopback interface instance request
592 @param client_index - opaque cookie to identify the sender
593 @param context - sender context, to match reply w/ request
594 @param mac_address - mac addr to assign to the interface if none-zero
595 @param is_specified - if non-0, a specific user_instance is being requested
596 @param user_instance - requested instance, ~0 => dynamically allocate
598 define create_loopback_instance
607 /** \brief Create loopback interface instance response
608 @param context - sender context, to match reply w/ request
609 @param sw_if_index - sw index of the interface that was created
610 @param retval - return code for the request
612 define create_loopback_instance_reply
619 /** \brief Delete loopback interface request
620 @param client_index - opaque cookie to identify the sender
621 @param context - sender context, to match reply w/ request
622 @param sw_if_index - sw index of the interface that was created
624 autoreply define delete_loopback
631 /** \brief Enable or disable detailed interface stats
632 @param client_index - opaque cookie to identify the sender
633 @param context - sender context, to match reply w/ request
634 @param sw_if_index - The interface to collect detail stats on. ~0 implies
636 @param enable_disable - set to 1 to enable, 0 to disable detailed stats
638 autoreply define collect_detailed_interface_stats
648 * eval: (c-set-style "gnu")