2 * Copyright (c) 2016 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
18 This file defines vpp IP control-plane API messages which are generally
19 called through a shared memory interface.
24 /** \brief Add / del table request
25 A table can be added multiple times, but need be deleted only once.
26 @param client_index - opaque cookie to identify the sender
27 @param context - sender context, to match reply w/ request
28 @param is_ipv6 - V4 or V6 table
29 @param table_id - table ID associated with the route
30 This table ID will apply to both the unicats
32 @param name - A client provided name/tag for the table. If this is
33 not set by the client, then VPP will generate something
36 autoreply define ip_table_add_del
46 /** \brief Dump IP fib table
47 @param client_index - opaque cookie to identify the sender
56 @param sw_if_index - index of the interface
57 @param weight - The weight, for UCMP
58 @param preference - The preference of the path. lowest preference is prefered
59 @param is_local - local if non-zero, else remote
60 @param is_drop - Drop the packet
61 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
62 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
63 @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
64 @param next_hop[16] - the next hop address
66 WARNING: this type is replicated, pending cleanup completion
68 typeonly manual_print manual_endian define fib_path
82 /** \brief IP FIB table response
83 @param table_id - IP fib table id
84 @address_length - mask length
86 @param count - the number of fib_path in path
87 @param path - array of of fib_path structures
89 manual_endian manual_print define ip_fib_details
97 vl_api_fib_path_t path[count];
100 /** \brief Dump IP6 fib table
101 @param client_index - opaque cookie to identify the sender
109 /** \brief IP6 FIB table entry response
110 @param table_id - IP6 fib table id
111 @param address_length - mask length
112 @param address - ip6 prefix
113 @param count - the number of fib_path in path
114 @param path - array of of fib_path structures
116 manual_endian manual_print define ip6_fib_details
124 vl_api_fib_path_t path[count];
127 /** \brief Dump IP neighboors
128 @param client_index - opaque cookie to identify the sender
129 @param context - sender context, to match reply w/ request
130 @param sw_if_index - the interface to dump neighboors, ~0 == all
131 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
133 define ip_neighbor_dump
141 /** \brief IP neighboors dump response
142 @param context - sender context which was passed in the request
143 @param sw_if_index - The interface used to reach the neighbor
144 @param is_static - [1|0] to indicate if neighbor is statically configured
145 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
147 define ip_neighbor_details {
156 /** \brief IP neighbor add / del request
157 @param client_index - opaque cookie to identify the sender
158 @param context - sender context, to match reply w/ request
159 @param sw_if_index - interface used to reach neighbor
160 @param is_add - 1 to add neighbor, 0 to delete
161 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
162 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
163 @param is_static - A static neighbor Entry - there are not flushed
164 If the interface goes down.
165 @param is_no_adj_fib - Do not create a corresponding entry in the FIB
166 table for the neighbor.
167 @param mac_address - l2 address of the neighbor
168 @param dst_address - ip4 or ip6 address of the neighbor
170 autoreply define ip_neighbor_add_del
175 /* 1 = add, 0 = delete */
184 /** \brief Set the ip flow hash config for a fib request
185 @param client_index - opaque cookie to identify the sender
186 @param context - sender context, to match reply w/ request
187 @param vrf_id - vrf/fib id
188 @param is_ipv6 - if non-zero the fib is ip6, else ip4
189 @param src - if non-zero include src in flow hash
190 @param dst - if non-zero include dst in flow hash
191 @param sport - if non-zero include sport in flow hash
192 @param dport - if non-zero include dport in flow hash
193 @param proto -if non-zero include proto in flow hash
194 @param reverse - if non-zero include reverse in flow hash
196 autoreply define set_ip_flow_hash
210 /** \brief IPv6 router advertisement config request
211 @param client_index - opaque cookie to identify the sender
212 @param context - sender context, to match reply w/ request
217 @param send_unicast -
220 @param default_router -
221 @param max_interval -
222 @param min_interval -
224 @param initial_count -
225 @param initial_interval -
227 autoreply define sw_interface_ip6nd_ra_config
244 u32 initial_interval;
247 /** \brief IPv6 router advertisement prefix config request
248 @param client_index - opaque cookie to identify the sender
249 @param context - sender context, to match reply w/ request
250 @param sw_if_index - The interface the RA prefix information is for
251 @param address[] - The prefix to advertise
252 @param address_length - the prefix length
253 @param use_default - Revert to default settings
254 @param no_advertise - Do not advertise this prefix
255 @param off_link - The prefix is off link (it is not configured on the interface)
256 Configures the L-flag, When set, indicates that this
257 prefix can be used for on-link determination.
258 @param no_autoconfig - Setting for the A-flag. When
259 set indicates that this prefix can be used for
260 stateless address configuration.
261 @param no_onlink - The prefix is not on link. Make sure this is consistent
262 with the off_link parameter else YMMV
263 @param is_no - add/delete
264 @param val_lifetime - The length of time in
265 seconds (relative to the time the packet is sent)
266 that the prefix is valid for the purpose of on-link
267 determination. A value of all one bits
268 (0xffffffff) represents infinity
269 @param pref_lifetime - The length of time in
270 seconds (relative to the time the packet is sent)
271 that addresses generated from the prefix via
272 stateless address autoconfiguration remain
273 preferred [ADDRCONF]. A value of all one bits
274 (0xffffffff) represents infinity.
276 autoreply define sw_interface_ip6nd_ra_prefix
293 /** \brief IPv6 ND proxy config
294 @param client_index - opaque cookie to identify the sender
295 @param context - sender context, to match reply w/ request
296 @param sw_if_index - The interface the host is on
297 @param address - The address of the host for which to proxy for
298 @param is_add - Adding or deleting
300 autoreply define ip6nd_proxy_add_del
309 /** \brief IPv6 ND proxy details returned after request
310 @param context - sender context, to match reply w/ request
311 @param retval - return code for the request
313 define ip6nd_proxy_details
321 /** \brief IPv6 ND proxy dump request
322 @param context - sender context, to match reply w/ request
323 @param retval - return code for the request
324 @param sw_if_index - The interface the host is on
325 @param address - The address of the host for which to proxy for
327 define ip6nd_proxy_dump
333 /** \brief IPv6 interface enable / disable 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 used to reach neighbor
337 @param enable - if non-zero enable ip6 on interface, else disable
339 autoreply define sw_interface_ip6_enable_disable
344 u8 enable; /* set to true if enable */
347 /** \brief IPv6 set link local address on interface request
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 - interface to set link local on
351 @param address[] - the new link local address
353 autoreply define sw_interface_ip6_set_link_local_address
361 /** \brief Add / del route request
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 - software index of the new vlan's parent interface
365 @param vrf_id - fib table /vrf associated with the route
366 @param lookup_in_vrf -
367 @param classify_table_index -
368 @param create_vrf_if_needed -
369 @param is_add - 1 if adding the route, 0 if deleting
370 @param is_drop - Drop the packet
371 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
372 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
373 @param is_ipv6 - 0 if an ip4 route, else ip6
374 @param is_local - The route will result in packets sent to VPP IP stack
375 @param is_udp_encap - The path describes a UDP-o-IP encapsulation.
377 @param is_multipath - Set to 1 if this is a multipath route, else 0
378 @param is_source_lookup - The the path is a deaggregate path (i.e. a lookup
379 in another table) is the lookup on the packet's
380 source address or destination.
381 @param next_hop_weight - Weight for Unequal cost multi-path
382 @param next_hop_preference - Path that are up that have the best preference are
383 are used for forwarding. lower value is better.
384 @param next_hop_id - Used when the path resolves via an object that has a unique
386 @param dst_address_length -
387 @param dst_address[16] -
388 @param next_hop_address[16] -
389 @param next_hop_n_out_labels - the number of labels in the label stack
390 @param next_hop_out_label_stack - the next-hop output label stack, outer most first
391 @param next_hop_via_label - The next-hop is a resolved via a local label
393 autoreply define ip_add_del_route
397 u32 next_hop_sw_if_index;
399 u32 classify_table_index;
400 u32 next_hop_table_id;
402 u8 create_vrf_if_needed;
412 u8 is_resolve_attached;
417 u8 next_hop_preference;
419 u8 dst_address_length;
421 u8 next_hop_address[16];
422 u8 next_hop_n_out_labels;
423 u32 next_hop_via_label;
424 u32 next_hop_out_label_stack[next_hop_n_out_labels];
427 /** \brief Add / del route request
428 @param client_index - opaque cookie to identify the sender
429 @param context - sender context, to match reply w/ request
430 @param sw_if_index - software index of the new vlan's parent interface
431 @param vrf_id - fib table /vrf associated with the route
432 @param next_hop_afi - Use dpo_proto_t
435 autoreply define ip_mroute_add_del
439 u32 next_hop_sw_if_index;
445 u16 grp_address_length;
447 u8 create_vrf_if_needed;
455 /** \brief Dump IP multicast fib table
456 @param client_index - opaque cookie to identify the sender
464 /** \brief IP Multicast FIB table response
465 @param table_id - IP fib table id
466 @address_length - mask length
467 @grp_address - Group address/prefix
468 @src_address - Source address
469 @param count - the number of fib_path in path
470 @param path - array of of fib_path structures
472 manual_endian manual_print define ip_mfib_details
482 vl_api_fib_path_t path[count];
485 /** \brief Dump IP6 multicast fib table
486 @param client_index - opaque cookie to identify the sender
494 /** \brief IP6 Multicast FIB table response
495 @param table_id - IP fib table id
496 @address_length - mask length
497 @grp_address - Group address/prefix
498 @src_address - Source address
499 @param count - the number of fib_path in path
500 @param path - array of of fib_path structures
502 manual_endian manual_print define ip6_mfib_details
510 vl_api_fib_path_t path[count];
513 define ip_address_details
523 define ip_address_dump
545 define mfib_signal_dump
551 define mfib_signal_details
561 u8 ip_packet_data[256];
564 /** \brief IP punt policer
565 @param client_index - opaque cookie to identify the sender
566 @param context - sender context, to match reply w/ request
567 @param is_add - 1 to add neighbor, 0 to delete
568 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
569 @param policer_index - Index of policer to use
571 autoreply define ip_punt_police
580 /** \brief IP punt redirect
581 @param client_index - opaque cookie to identify the sender
582 @param context - sender context, to match reply w/ request
583 @param is_add - 1 to add neighbor, 0 to delete
584 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
585 @param tx_sw_if_index - the TX interface to which traffic shoulde be
587 @param nh - The next-hop to redirect the traffic to.
589 autoreply define ip_punt_redirect
600 autoreply define ip_container_proxy_add_del
611 /** \brief Configure IP source and L4 port-range check
612 @param client_index - opaque cookie to identify the sender
613 @param context - sender context, to match reply w/ request
614 @param is_ip6 - 1 if source address type is IPv6
615 @param is_add - 1 if add, 0 if delete
616 @param mask_length - mask length for address entry
617 @param address - array of address bytes
618 @param number_of_ranges - length of low_port and high_port arrays (must match)
619 @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
620 @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
621 @param vrf_id - fib table/vrf id to associate the source and port-range check with
622 @note To specify a single port set low_port and high_port entry the same
624 autoreply define ip_source_and_port_range_check_add_del
638 /** \brief Set interface source and L4 port-range request
639 @param client_index - opaque cookie to identify the sender
640 @param context - sender context, to match reply w/ request
641 @param interface_id - interface index
642 @param tcp_vrf_id - VRF associated with source and TCP port-range check
643 @param udp_vrf_id - VRF associated with source and TCP port-range check
645 autoreply define ip_source_and_port_range_check_interface_add_del
657 /** \brief Register for ip4 arp resolution events
658 @param client_index - opaque cookie to identify the sender
659 @param context - sender context, to match reply w/ request
660 @param enable_disable - 1 => register for events, 0 => cancel registration
661 @param pid - sender's pid
662 @param address - the exact ip4 address of interest
664 autoreply define want_ip4_arp_events
673 /** \brief Tell client about an ip4 arp resolution event
674 @param client_index - opaque cookie to identify the sender
675 @param address - the exact ip4 address of interest
676 @param pid - client pid registered to receive notification
677 @param sw_if_index - interface which received ARP packet
678 @param new_mac - the new mac address
679 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
691 /** \brief Register for ip6 nd resolution events
692 @param client_index - opaque cookie to identify the sender
693 @param context - sender context, to match reply w/ request
694 @param enable_disable - 1 => register for events, 0 => cancel registration
695 @param pid - sender's pid
696 @param address - the exact ip6 address of interest
698 autoreply define want_ip6_nd_events
707 /** \brief Tell client about an ip6 nd resolution or mac/ip event
708 @param client_index - opaque cookie to identify the sender
709 @param pid - client pid registered to receive notification
710 @param sw_if_index - interface which received ARP packet
711 @param address - the exact ip6 address of interest
712 @param new_mac - the new mac address
713 @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
725 /** \brief Proxy ARP add / del request
726 @param client_index - opaque cookie to identify the sender
727 @param context - sender context, to match reply w/ request
728 @param vrf_id - VRF / Fib table ID
729 @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
730 @param low_address[4] - Low address of the Proxy ARP range
731 @param hi_address[4] - High address of the Proxy ARP range
733 autoreply define proxy_arp_add_del
743 /** \brief Proxy ARP add / del request
744 @param client_index - opaque cookie to identify the sender
745 @param context - sender context, to match reply w/ request
746 @param sw_if_index - Which interface to enable / disable Proxy Arp on
747 @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
749 autoreply define proxy_arp_intfc_enable_disable
754 /* 1 = on, 0 = off */
758 /** \brief Reset fib table request
759 @param client_index - opaque cookie to identify the sender
760 @param context - sender context, to match reply w/ request
761 @param vrf_id - vrf/table id of the fib table to reset
762 @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
764 autoreply define reset_fib
772 /** \brief Set max allowed ARP or ip6 neighbor entries request
773 @param client_index - opaque cookie to identify the sender
774 @param context - sender context, to match reply w/ request
775 @param is_ipv6 - neighbor limit if non-zero, else ARP limit
776 @param arp_neighbor_limit - the new limit, defaults are ~ 50k
778 autoreply define set_arp_neighbor_limit
783 u32 arp_neighbor_limit;
786 /** \brief IOAM enable : Enable in-band OAM
787 @param id - profile id
788 @param seqno - To enable Seqno Processing
789 @param analyse - Enabling analysis of iOAM at decap node
790 @param pow_enable - Proof of Work enabled or not flag
791 @param trace_enable - iOAM Trace enabled or not flag
793 autoreply define ioam_enable
805 /** \brief iOAM disable
806 @param client_index - opaque cookie to identify the sender
807 @param context - sender context, to match reply w/ request
808 @param index - MAP Domain index
810 autoreply define ioam_disable
819 * eval: (c-set-style "gnu")