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
81 /** \brief IP FIB table response
82 @param table_id - IP fib table id
83 @address_length - mask length
85 @param count - the number of fib_path in path
86 @param path - array of of fib_path structures
88 manual_endian manual_print define ip_fib_details
96 vl_api_fib_path_t path[count];
99 /** \brief Dump IP6 fib table
100 @param client_index - opaque cookie to identify the sender
108 /** \brief IP6 FIB table entry response
109 @param table_id - IP6 fib table id
110 @param address_length - mask length
111 @param address - ip6 prefix
112 @param count - the number of fib_path in path
113 @param path - array of of fib_path structures
115 manual_endian manual_print define ip6_fib_details
123 vl_api_fib_path_t path[count];
126 /** \brief Dump IP neighboors
127 @param client_index - opaque cookie to identify the sender
128 @param context - sender context, to match reply w/ request
129 @param sw_if_index - the interface to dump neighboors
130 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
132 define ip_neighbor_dump
140 /** \brief IP neighboors dump response
141 @param context - sender context which was passed in the request
142 @param is_static - [1|0] to indicate if neighbor is statically configured
143 @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
145 define ip_neighbor_details {
153 /** \brief IP neighbor add / del request
154 @param client_index - opaque cookie to identify the sender
155 @param context - sender context, to match reply w/ request
156 @param sw_if_index - interface used to reach neighbor
157 @param is_add - 1 to add neighbor, 0 to delete
158 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
159 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
160 @param is_static - A static neighbor Entry - there are not flushed
161 If the interface goes down.
162 @param is_no_adj_fib - Do not create a corresponding entry in the FIB
163 table for the neighbor.
164 @param mac_address - l2 address of the neighbor
165 @param dst_address - ip4 or ip6 address of the neighbor
167 autoreply define ip_neighbor_add_del
172 /* 1 = add, 0 = delete */
181 /** \brief Set the ip flow hash config for a fib request
182 @param client_index - opaque cookie to identify the sender
183 @param context - sender context, to match reply w/ request
184 @param vrf_id - vrf/fib id
185 @param is_ipv6 - if non-zero the fib is ip6, else ip4
186 @param src - if non-zero include src in flow hash
187 @param dst - if non-zero include dst in flow hash
188 @param sport - if non-zero include sport in flow hash
189 @param dport - if non-zero include dport in flow hash
190 @param proto -if non-zero include proto in flow hash
191 @param reverse - if non-zero include reverse in flow hash
193 autoreply define set_ip_flow_hash
207 /** \brief IPv6 router advertisement config request
208 @param client_index - opaque cookie to identify the sender
209 @param context - sender context, to match reply w/ request
214 @param send_unicast -
217 @param default_router -
218 @param max_interval -
219 @param min_interval -
221 @param initial_count -
222 @param initial_interval -
224 autoreply define sw_interface_ip6nd_ra_config
241 u32 initial_interval;
244 /** \brief IPv6 router advertisement prefix config request
245 @param client_index - opaque cookie to identify the sender
246 @param context - sender context, to match reply w/ request
247 @param sw_if_index - The interface the RA prefix information is for
248 @param address[] - The prefix to advertise
249 @param address_length - the prefix length
250 @param use_default - Revert to default settings
251 @param no_advertise - Do not advertise this prefix
252 @param off_link - The prefix is off link (it is not configured on the interface)
253 Configures the L-flag, When set, indicates that this
254 prefix can be used for on-link determination.
255 @param no_autoconfig - Setting for the A-flag. When
256 set indicates that this prefix can be used for
257 stateless address configuration.
258 @param no_onlink - The prefix is not on link. Make sure this is consistent
259 with the off_link parameter else YMMV
260 @param is_no - add/delete
261 @param val_lifetime - The length of time in
262 seconds (relative to the time the packet is sent)
263 that the prefix is valid for the purpose of on-link
264 determination. A value of all one bits
265 (0xffffffff) represents infinity
266 @param pref_lifetime - The length of time in
267 seconds (relative to the time the packet is sent)
268 that addresses generated from the prefix via
269 stateless address autoconfiguration remain
270 preferred [ADDRCONF]. A value of all one bits
271 (0xffffffff) represents infinity.
273 autoreply define sw_interface_ip6nd_ra_prefix
290 /** \brief IPv6 ND proxy config
291 @param client_index - opaque cookie to identify the sender
292 @param context - sender context, to match reply w/ request
293 @param sw_if_index - The interface the host is on
294 @param address - The address of the host for which to proxy for
295 @param is_add - Adding or deleting
297 autoreply define ip6nd_proxy_add_del
306 /** \brief IPv6 ND proxy details returned after request
307 @param context - sender context, to match reply w/ request
308 @param retval - return code for the request
310 define ip6nd_proxy_details
318 /** \brief IPv6 ND proxy dump request
319 @param context - sender context, to match reply w/ request
320 @param retval - return code for the request
321 @param sw_if_index - The interface the host is on
322 @param address - The address of the host for which to proxy for
324 define ip6nd_proxy_dump
330 /** \brief IPv6 interface enable / disable request
331 @param client_index - opaque cookie to identify the sender
332 @param context - sender context, to match reply w/ request
333 @param sw_if_index - interface used to reach neighbor
334 @param enable - if non-zero enable ip6 on interface, else disable
336 autoreply define sw_interface_ip6_enable_disable
341 u8 enable; /* set to true if enable */
344 /** \brief IPv6 set link local address on interface request
345 @param client_index - opaque cookie to identify the sender
346 @param context - sender context, to match reply w/ request
347 @param sw_if_index - interface to set link local on
348 @param address[] - the new link local address
350 autoreply define sw_interface_ip6_set_link_local_address
358 /** \brief Add / del route request
359 @param client_index - opaque cookie to identify the sender
360 @param context - sender context, to match reply w/ request
361 @param sw_if_index - software index of the new vlan's parent interface
362 @param vrf_id - fib table /vrf associated with the route
363 @param lookup_in_vrf -
364 @param classify_table_index -
365 @param create_vrf_if_needed -
366 @param is_add - 1 if adding the route, 0 if deleting
367 @param is_drop - Drop the packet
368 @param is_unreach - Drop the packet and rate limit send ICMP unreachable
369 @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
370 @param is_ipv6 - 0 if an ip4 route, else ip6
373 @param is_multipath - Set to 1 if this is a multipath route, else 0
374 @param is_source_lookup - The the path is a deaggregate path (i.e. a lookup
375 in another table) is the lookup on the packet's
376 source address or destination.
377 @param not_last - Is last or not last msg in group of multiple add/del msgs
378 @param next_hop_weight -
379 @param dst_address_length -
380 @param dst_address[16] -
381 @param next_hop_address[16] -
382 @param next_hop_n_out_labels - the number of labels in the label stack
383 @param next_hop_out_label_stack - the next-hop output label stack, outer most first
384 @param next_hop_via_label - The next-hop is a resolved via a local label
386 autoreply define ip_add_del_route
390 u32 next_hop_sw_if_index;
392 u32 classify_table_index;
393 u32 next_hop_table_id;
394 u8 create_vrf_if_needed;
404 u8 is_resolve_attached;
407 /* Is last/not-last message in group of multiple add/del messages. */
410 u8 next_hop_preference;
411 u8 dst_address_length;
413 u8 next_hop_address[16];
414 u8 next_hop_n_out_labels;
415 u32 next_hop_via_label;
416 u32 next_hop_out_label_stack[next_hop_n_out_labels];
419 /** \brief Add / del route request
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 vrf_id - fib table /vrf associated with the route
427 autoreply define ip_mroute_add_del
431 u32 next_hop_sw_if_index;
436 u16 grp_address_length;
437 u8 create_vrf_if_needed;
445 /** \brief Dump IP multicast fib table
446 @param client_index - opaque cookie to identify the sender
454 /** \brief IP Multicast FIB table response
455 @param table_id - IP fib table id
456 @address_length - mask length
457 @grp_address - Group address/prefix
458 @src_address - Source address
459 @param count - the number of fib_path in path
460 @param path - array of of fib_path structures
462 manual_endian manual_print define ip_mfib_details
472 vl_api_fib_path_t path[count];
475 /** \brief Dump IP6 multicast fib table
476 @param client_index - opaque cookie to identify the sender
484 /** \brief IP6 Multicast FIB table response
485 @param table_id - IP fib table id
486 @address_length - mask length
487 @grp_address - Group address/prefix
488 @src_address - Source address
489 @param count - the number of fib_path in path
490 @param path - array of of fib_path structures
492 manual_endian manual_print define ip6_mfib_details
500 vl_api_fib_path_t path[count];
503 define ip_address_details
513 define ip_address_dump
535 define mfib_signal_dump
541 define mfib_signal_details
551 u8 ip_packet_data[256];
554 /** \brief IP punt policer
555 @param client_index - opaque cookie to identify the sender
556 @param context - sender context, to match reply w/ request
557 @param is_add - 1 to add neighbor, 0 to delete
558 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
559 @param policer_index - Index of policer to use
561 autoreply define ip_punt_police
570 /** \brief IP punt redirect
571 @param client_index - opaque cookie to identify the sender
572 @param context - sender context, to match reply w/ request
573 @param is_add - 1 to add neighbor, 0 to delete
574 @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
575 @param tx_sw_if_index - the TX interface to which traffic shoulde be
577 @param nh - The next-hop to redirect the traffic to.
579 autoreply define ip_punt_redirect
592 * eval: (c-set-style "gnu")