FD.io VPP  v17.01.1-3-gc6833f8
Vector Packet Processing
ip.api
Go to the documentation of this file.
1 /*
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:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15 
16 /** \file
17 
18  This file defines vpp IP control-plane API messages which are generally
19  called through a shared memory interface.
20 */
21 
22 /** \brief Dump IP fib table
23  @param client_index - opaque cookie to identify the sender
24 */
25 define ip_fib_dump
26 {
29 };
30 
31 /** \brief FIB path
32  @param sw_if_index - index of the interface
33  @param weight - The weight, for UCMP
34  @param is_local - local if non-zero, else remote
35  @param is_drop - Drop the packet
36  @param is_unreach - Drop the packet and rate limit send ICMP unreachable
37  @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
38  @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
39  @param next_hop[16] - the next hop address
40 
41  WARNING: this type is replicated, pending cleanup completion
42 */
43 typeonly manual_print manual_endian define fib_path
44 {
52  u8 next_hop[16];
53 };
54 
55 /** \brief IP FIB table response
56  @param table_id - IP fib table id
57  @address_length - mask length
58  @address - ip4 prefix
59  @param count - the number of fib_path in path
60  @param path - array of of fib_path structures
61 */
62 manual_endian manual_print define ip_fib_details
63 {
67  u8 address[4];
69  vl_api_fib_path_t path[count];
70 };
71 
72 /** \brief Dump IP6 fib table
73  @param client_index - opaque cookie to identify the sender
74 */
75 define ip6_fib_dump
76 {
79 };
80 
81 /** \brief IP6 FIB table response
82  @param table_id - IP6 fib table id
83  @address_length - mask length
84  @address - ip6 prefix
85  @param count - the number of fib_path in path
86  @param path - array of of fib_path structures
87 */
88 manual_endian manual_print define ip6_fib_details
89 {
93  u8 address[16];
95  vl_api_fib_path_t path[count];
96 };
97 
98 /** \brief Dump IP neighboors
99  @param client_index - opaque cookie to identify the sender
100  @param context - sender context, to match reply w/ request
101  @param sw_if_index - the interface to dump neighboors
102  @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
103 */
104 define ip_neighbor_dump
105 {
110 };
111 
112 /** \brief IP neighboors dump response
113  @param context - sender context which was passed in the request
114  @param is_static - [1|0] to indicate if neighbor is statically configured
115  @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
116 */
117 define ip_neighbor_details {
121  u8 mac_address[6];
122  u8 ip_address[16];
123 };
124 
125 /** \brief IP neighbor add / del request
126  @param client_index - opaque cookie to identify the sender
127  @param context - sender context, to match reply w/ request
128  @param vrf_id - vrf_id, only for IP4
129  @param sw_if_index - interface used to reach neighbor
130  @param is_add - 1 to add neighbor, 0 to delete
131  @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
132  @param is_static -
133  @param mac_address - l2 address of the neighbor
134  @param dst_address - ip4 or ip6 address of the neighbor
135 */
136 define ip_neighbor_add_del
137 {
140  u32 vrf_id; /* only makes sense for ip4 */
142  /* 1 = add, 0 = delete */
146  u8 mac_address[6];
147  u8 dst_address[16];
148 };
149 
150 /** \brief Reply for IP Neighbor add / delete request
151  @param context - returned sender context, to match reply w/ request
152  @param retval - return code
153 */
154 define ip_neighbor_add_del_reply
155 {
158 };
159 
160 /** \brief Set the ip flow hash config for a fib request
161  @param client_index - opaque cookie to identify the sender
162  @param context - sender context, to match reply w/ request
163  @param vrf_id - vrf/fib id
164  @param is_ipv6 - if non-zero the fib is ip6, else ip4
165  @param src - if non-zero include src in flow hash
166  @param dst - if non-zero include dst in flow hash
167  @param sport - if non-zero include sport in flow hash
168  @param dport - if non-zero include dport in flow hash
169  @param proto -if non-zero include proto in flow hash
170  @param reverse - if non-zero include reverse in flow hash
171 */
172 define set_ip_flow_hash
173 {
184 };
185 
186 /** \brief Set the ip flow hash config for a fib response
187  @param context - sender context, to match reply w/ request
188  @param retval - return code for the request
189 */
190 define set_ip_flow_hash_reply
191 {
194 };
195 
196 /** \brief IPv6 router advertisement config request
197  @param client_index - opaque cookie to identify the sender
198  @param context - sender context, to match reply w/ request
199  @param suppress -
200  @param managed -
201  @param other -
202  @param ll_option -
203  @param send_unicast -
204  @param cease -
205  @param is_no -
206  @param default_router -
207  @param max_interval -
208  @param min_interval -
209  @param lifetime -
210  @param initial_count -
211  @param initial_interval -
212 */
213 define sw_interface_ip6nd_ra_config
214 {
231 };
232 
233 /** \brief IPv6 router advertisement config response
234  @param context - sender context, to match reply w/ request
235  @param retval - return code for the request
236 */
237 define sw_interface_ip6nd_ra_config_reply
238 {
241 };
242 
243 /** \brief IPv6 router advertisement prefix config request
244  @param client_index - opaque cookie to identify the sender
245  @param context - sender context, to match reply w/ request
246  @param sw_if_index -
247  @param address[] -
248  @param address_length -
249  @param use_default -
250  @param no_advertise -
251  @param off_link -
252  @param no_autoconfig -
253  @param no_onlink -
254  @param is_no -
255  @param val_lifetime -
256  @param pref_lifetime -
257 */
258 define sw_interface_ip6nd_ra_prefix
259 {
263  u8 address[16];
273 };
274 
275 /** \brief IPv6 router advertisement prefix config response
276  @param context - sender context, to match reply w/ request
277  @param retval - return code for the request
278 */
279 define sw_interface_ip6nd_ra_prefix_reply
280 {
283 };
284 
285 /** \brief IPv6 interface enable / disable request
286  @param client_index - opaque cookie to identify the sender
287  @param context - sender context, to match reply w/ request
288  @param sw_if_index - interface used to reach neighbor
289  @param enable - if non-zero enable ip6 on interface, else disable
290 */
291 define sw_interface_ip6_enable_disable
292 {
296  u8 enable; /* set to true if enable */
297 };
298 
299 /** \brief IPv6 interface enable / disable response
300  @param context - sender context, to match reply w/ request
301  @param retval - return code for the request
302 */
303 define sw_interface_ip6_enable_disable_reply
304 {
307 };
308 
309 /** \brief IPv6 set link local address on interface request
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 - interface to set link local on
313  @param address[] - the new link local address
314  @param address_length - link local address length
315 */
316 define sw_interface_ip6_set_link_local_address
317 {
321  u8 address[16];
323 };
324 
325 /** \brief IPv6 set link local address on interface response
326  @param context - sender context, to match reply w/ request
327  @param retval - error code for the request
328 */
329 define sw_interface_ip6_set_link_local_address_reply
330 {
333 };
334 
335 /** \brief Add / del route request
336  @param client_index - opaque cookie to identify the sender
337  @param context - sender context, to match reply w/ request
338  @param sw_if_index - software index of the new vlan's parent interface
339  @param vrf_id - fib table /vrf associated with the route
340  @param lookup_in_vrf -
341  @param classify_table_index -
342  @param create_vrf_if_needed -
343  @param is_add - 1 if adding the route, 0 if deleting
344  @param is_drop - Drop the packet
345  @param is_unreach - Drop the packet and rate limit send ICMP unreachable
346  @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
347  @param is_ipv6 - 0 if an ip4 route, else ip6
348  @param is_local -
349  @param is_classify -
350  @param is_multipath - Set to 1 if this is a multipath route, else 0
351  @param not_last - Is last or not last msg in group of multiple add/del msgs
352  @param next_hop_weight -
353  @param dst_address_length -
354  @param dst_address[16] -
355  @param next_hop_address[16] -
356  @param next_hop_n_out_labels - the number of labels in the label stack
357  @param next_hop_out_label_stack - the next-hop output label stack, outer most first
358  @param next_hop_via_label - The next-hop is a resolved via a local label
359 */
360 define ip_add_del_route
361 {
379  /* Is last/not-last message in group of multiple add/del messages. */
383  u8 dst_address[16];
384  u8 next_hop_address[16];
387  u32 next_hop_out_label_stack[next_hop_n_out_labels];
388 };
389 
390 /** \brief Reply for add / del route request
391  @param context - returned sender context, to match reply w/ request
392  @param retval - return code
393 */
394 define ip_add_del_route_reply
395 {
398 };
399 
400 define ip_address_details
401 {
404  u8 ip[16];
406 };
407 
408 define ip_address_dump
409 {
414 };
415 
416 define ip_details
417 {
420 };
421 
422 define ip_dump
423 {
427 };
428 
429 
430 /*
431  * Local Variables:
432  * eval: (c-set-style "gnu")
433  * End:
434  */
int i32
Definition: types.h:81
u32 sw_if_index
Definition: ip.api:45
unsigned int u32
Definition: types.h:88
FIB path.
Definition: ip.api:43
unsigned char u8
Definition: types.h:56
u32 client_index
Definition: ip.api:424
u8 is_prohibit
Definition: ip.api:50