52254cd3b3e19b7c8c652f10216149c69dfd7783
[vpp.git] / vpp / vpp-api / vpe.api
1 /*
2  * Copyright (c) 2015-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 vpe control-plane API messages which are generally
19     called through a shared memory interface. 
20 */
21
22 /* 
23  * Note: API placement cleanup in progress
24  * If you're looking for interface APIs, please
25  * see .../vnet/vnet/{interface.api,interface_api.c}
26  * IP APIs: see .../vnet/vnet/ip/{ip.api, ip_api.c}
27  * TAP APIs: see .../vnet/vnet/unix/{tap.api, tap_api.c}
28  * VXLAN APIs: see .../vnet/vnet/vxlan/{vxlan.api, vxlan_api.c}
29  * AF-PACKET APIs: ... see /vnet/devices/af_packet/{af_packet.api, af_packet_api.c}
30  * NETMAP APIs: see ... /vnet/vnet/devices/netmap/{netmap.api, netmap_api.c}
31  * VHOST-USER APIs: see .../vnet/devices/virtio/{vhost_user.api, vhost_user_api.c}
32  * VXLAN GPE APIs: see .../vnet/vnet/vxlan-gpe/{vxlan_gpe.api, vxlan_gpe_api.c}
33  * GRE APIs: see .../vnet/vnet/gre/{gre.api, gre_api.c}
34  * L2TP APIs: see .../vnet/vnet/l2tp/{l2tp.api, l2tp_api.c}
35  * BFD APIs: see .../vnet/vnet/bfd/{bfd.api, bfd_api.c}
36  * IPSEC APIs: see .../vnet/vnet/ipsec/{ipsec.api, ipsec_api.c}
37  * IPSEC-GRE APIs: see .../vnet/vnet/ipsec-gre/{ipsec_gre.api, ipsec_gre_api.c}
38  */
39
40 /** \brief Create a new subinterface with the given vlan id
41     @param client_index - opaque cookie to identify the sender
42     @param context - sender context, to match reply w/ request
43     @param sw_if_index - software index of the new vlan's parent interface
44     @param vlan_id - vlan tag of the new interface
45 */
46 define create_vlan_subif
47 {
48   u32 client_index;
49   u32 context;
50   u32 sw_if_index;
51   u32 vlan_id;
52 };
53
54 /** \brief Reply for the vlan subinterface create request
55     @param context - returned sender context, to match reply w/ request
56     @param retval - return code
57     @param sw_if_index - software index allocated for the new subinterface
58 */
59 define create_vlan_subif_reply
60 {
61   u32 context;
62   i32 retval;
63   u32 sw_if_index;
64 };
65
66 /** \brief Enable or Disable MPLS on and interface
67     @param client_index - opaque cookie to identify the sender
68     @param context - sender context, to match reply w/ request
69     @param sw_if_index - index of the interface
70     @param enable - if non-zero enable, else disable
71 */
72 define sw_interface_set_mpls_enable
73 {
74   u32 client_index;
75   u32 context;
76   u32 sw_if_index;
77   u8 enable;
78 };
79
80 /** \brief Reply for MPLS state on an interface
81     @param context - returned sender context, to match reply w/ request
82     @param retval - return code
83 */
84 define sw_interface_set_mpls_enable_reply
85 {
86   u32 context;
87   i32 retval;
88 };
89
90 /** \brief MPLS Route Add / del route
91     @param client_index - opaque cookie to identify the sender
92     @param context - sender context, to match reply w/ request
93     @param mr_label - The MPLS label value
94     @param mr_eos - The End of stack bit
95     @param mr_table_id - The MPLS table-id the route is added in
96     @param mr_classify_table_index - If this is a classify route, 
97                                      this is the classify table index
98     @param  mr_create_table_if_needed - If the MPLS or IP tables do not exist,
99                                         create them
100     @param mr_is_add - Is this a route add or delete
101     @param mr_is_classify - Is this route result a classify
102     @param mr_is_multipath - Is this route update a multipath - i.e. is this
103                              a path addition to an existing route
104     @param mr_is_resolve_host - Recurse resolution constraint via a host prefix
105     @param mr_is_resolve_attached - Recurse resolution constraint via attached prefix
106     @param mr_next_hop_proto_is_ip4 - The next-hop is IPV4
107     @param mr_next_hop_weight - The weight, for UCMP
108     @param mr_next_hop[16] - the nextop address
109     @param mr_next_hop_sw_if_index - the next-hop SW interface
110     @param mr_next_hop_table_id - the next-hop table-id (if appropriate)
111     @param mr_next_hop_n_out_labels - the number of labels in the label stack
112     @param mr_next_hop_out_label_stack - the next-hop output label stack, outer most first
113     @param next_hop_via_label - The next-hop is a resolved via a local label
114 */
115 define mpls_route_add_del
116 {
117   u32 client_index;
118   u32 context;
119   u32 mr_label;
120   u8 mr_eos;
121   u32 mr_table_id;
122   u32 mr_classify_table_index;
123   u8 mr_create_table_if_needed;
124   u8 mr_is_add;
125   u8 mr_is_classify;
126   u8 mr_is_multipath;
127   u8 mr_is_resolve_host;
128   u8 mr_is_resolve_attached;
129   u8 mr_next_hop_proto_is_ip4;
130   u8 mr_next_hop_weight;
131   u8 mr_next_hop[16];
132   u8 mr_next_hop_n_out_labels;
133   u32 mr_next_hop_sw_if_index;
134   u32 mr_next_hop_table_id;
135   u32 mr_next_hop_via_label;
136   u32 mr_next_hop_out_label_stack[mr_next_hop_n_out_labels];
137 };
138
139 /** \brief Reply for MPLS route add / del request
140     @param context - returned sender context, to match reply w/ request
141     @param retval - return code
142 */
143 define mpls_route_add_del_reply
144 {
145   u32 context;
146   i32 retval;
147 };
148
149 /** \brief Dump MPLS fib table
150     @param client_index - opaque cookie to identify the sender
151 */
152 define mpls_fib_dump
153 {
154   u32 client_index;
155   u32 context;
156 };
157
158 /** \brief FIB path
159     @param sw_if_index - index of the interface
160     @param weight - The weight, for UCMP
161     @param is_local - local if non-zero, else remote
162     @param is_drop - Drop the packet
163     @param is_unreach - Drop the packet and rate limit send ICMP unreachable
164     @param is_prohibit - Drop the packet and rate limit send ICMP prohibited
165     @param afi - the afi of the next hop, IP46_TYPE_IP4=1, IP46_TYPE_IP6=2
166     @param next_hop[16] - the next hop address
167
168     WARNING: this type is replicated, pending cleanup completion
169
170 */
171 typeonly manual_print manual_endian define fib_path2
172 {
173   u32 sw_if_index;
174   u32 weight;
175   u8 is_local;
176   u8 is_drop;
177   u8 is_unreach;
178   u8 is_prohibit;
179   u8 afi;
180   u8 next_hop[16];
181 };
182
183 /** \brief mpls FIB table response
184     @param table_id - MPLS fib table id
185     @param s_bit - End-of-stack bit
186     @param label - MPLS label value
187     @param count - the number of fib_path in path
188     @param path  - array of of fib_path structures
189 */
190 manual_endian manual_print define mpls_fib_details
191 {
192   u32 context;
193   u32 table_id;
194   u8  eos_bit;
195   u32 label;
196   u32 count;
197   vl_api_fib_path2_t path[count];
198 };
199
200 /** \brief Bind/Unbind an MPLS local label to an IP prefix. i.e. create
201            a per-prefix label entry.
202     @param client_index - opaque cookie to identify the sender
203     @param context - sender context, to match reply w/ request
204     @param mb_mpls_table_id - The MPLS table-id the MPLS entry will be added in
205     @param mb_label - The MPLS label value to bind
206     @param mb_ip_table_id - The IP table-id of the IP prefix to bind to.
207     @param mb_create_table_if_needed - Create either/both tables if required.
208     @param mb_is_bind - Bind or unbind
209     @param mb_is_ip4 - The prefix to bind to is IPv4
210     @param mb_address_length - Length of IP prefix
211     @param mb_address[16] - IP prefix/
212 */
213 define mpls_ip_bind_unbind
214 {
215   u32 client_index;
216   u32 context;
217   u32 mb_mpls_table_id;
218   u32 mb_label;
219   u32 mb_ip_table_id;
220   u8 mb_create_table_if_needed;
221   u8 mb_is_bind;
222   u8 mb_is_ip4;
223   u8 mb_address_length;
224   u8 mb_address[16];
225 };
226
227 /** \brief Reply for MPLS IP bind/unbind request
228     @param context - returned sender context, to match reply w/ request
229     @param retval - return code
230 */
231 define mpls_ip_bind_unbind_reply
232 {
233   u32 context;
234   i32 retval;
235 };
236
237 /** \brief MPLS tunnel Add / del route
238     @param client_index - opaque cookie to identify the sender
239     @param context - sender context, to match reply w/ request
240     @param mt_is_add - Is this a route add or delete
241     @param mt_sw_if_index - The SW interface index of the tunnel to delete
242     @param mt_next_hop_proto_is_ip4 - The next-hop is IPV4
243     @param mt_next_hop_weight - The weight, for UCMP
244     @param mt_next_hop[16] - the nextop address
245     @param mt_next_hop_sw_if_index - the next-hop SW interface
246     @param mt_next_hop_table_id - the next-hop table-id (if appropriate)
247     @param mt_next_hop_n_out_labels - the number of next-hop output labels
248     @param mt_next_hop_out_label_stack - the next-hop output label stack,  outer most first
249 */
250 define mpls_tunnel_add_del
251 {
252   u32 client_index;
253   u32 context;
254   u32 mt_sw_if_index;
255   u8 mt_is_add;
256   u8 mt_l2_only;
257   u8 mt_next_hop_proto_is_ip4;
258   u8 mt_next_hop_weight;
259   u8 mt_next_hop[16];
260   u8 mt_next_hop_n_out_labels;
261   u32 mt_next_hop_sw_if_index;
262   u32 mt_next_hop_table_id;
263   u32 mt_next_hop_out_label_stack[mt_next_hop_n_out_labels];
264 };
265
266 /** \brief Reply for MPLS tunnel add / del request
267     @param context - returned sender context, to match reply w/ request
268     @param retval - return code
269     @param sw_if_index - SW interface index of the tunnel created
270 */
271 define mpls_tunnel_add_del_reply
272 {
273   u32 context;
274   i32 retval;
275   u32 sw_if_index;
276 };
277
278 /** \brief Dump mpls eth tunnel table
279     @param client_index - opaque cookie to identify the sender
280     @param tunnel_index - eth tunnel identifier or -1 in case of all tunnels
281 */
282 define mpls_tunnel_dump
283 {
284   u32 client_index;
285   u32 context;
286   i32 tunnel_index;
287 };
288
289 /** \brief mpls eth tunnel operational state response
290     @param tunnel_index - eth tunnel identifier
291     @param intfc_address - interface ipv4 addr
292     @param mask_width - interface ipv4 addr mask
293     @param hw_if_index - interface id
294     @param l2_only -
295     @param tunnel_dst_mac -
296     @param tx_sw_if_index -
297     @param encap_index - reference to mpls label table
298     @param nlabels - number of resolved labels
299     @param labels - resolved labels
300 */
301 define mpls_tunnel_details
302 {
303   u32 context;
304   u32 tunnel_index;
305   u8 mt_l2_only;
306   u8 mt_sw_if_index;
307   u8 mt_next_hop_proto_is_ip4;
308   u8 mt_next_hop[16];
309   u32 mt_next_hop_sw_if_index;
310   u32 mt_next_hop_table_id;
311   u32 mt_next_hop_n_labels;
312   u32 mt_next_hop_out_labels[mt_next_hop_n_labels];
313 };
314
315 /** \brief Proxy ARP add / del request
316     @param client_index - opaque cookie to identify the sender
317     @param context - sender context, to match reply w/ request
318     @param vrf_id - VRF / Fib table ID
319     @param is_add - 1 if adding the Proxy ARP range, 0 if deleting
320     @param low_address[4] - Low address of the Proxy ARP range
321     @param hi_address[4] - High address of the Proxy ARP range
322 */
323 define proxy_arp_add_del
324 {
325   u32 client_index;
326   u32 context;
327   u32 vrf_id;
328   u8 is_add;
329   u8 low_address[4];
330   u8 hi_address[4];
331 };
332
333 /** \brief Reply for proxy arp add / del request
334     @param context - returned sender context, to match reply w/ request
335     @param retval - return code
336 */
337 define proxy_arp_add_del_reply
338 {
339   u32 context;
340   i32 retval;
341 };
342
343 /** \brief Proxy ARP add / del request
344     @param client_index - opaque cookie to identify the sender
345     @param context - sender context, to match reply w/ request
346     @param sw_if_index - Which interface to enable / disable Proxy Arp on
347     @param enable_disable - 1 to enable Proxy ARP on interface, 0 to disable
348 */
349 define proxy_arp_intfc_enable_disable
350 {
351   u32 client_index;
352   u32 context;
353   u32 sw_if_index;
354   /* 1 = on, 0 = off */
355   u8 enable_disable;
356 };
357
358 /** \brief Reply for Proxy ARP interface enable / disable request
359     @param context - returned sender context, to match reply w/ request
360     @param retval - return code
361 */
362 define proxy_arp_intfc_enable_disable_reply
363 {
364   u32 context;
365   i32 retval;
366 };
367
368 /** \brief Reset VRF (remove all routes etc) request
369     @param client_index - opaque cookie to identify the sender
370     @param context - sender context, to match reply w/ request
371     @param is_ipv6 - 1 for IPv6 neighbor, 0 for IPv4
372     @param vrf_id - ID of th FIB table / VRF to reset
373 */
374 define reset_vrf
375 {
376   u32 client_index;
377   u32 context;
378   u8 is_ipv6;
379   u32 vrf_id;
380 };
381
382 /** \brief Reply for Reset VRF request
383     @param context - returned sender context, to match reply w/ request
384     @param retval - return code
385 */
386 define reset_vrf_reply
387 {
388   u32 context;
389   i32 retval;
390 };
391
392 /** \brief Is Address Reachable request - DISABLED
393     @param client_index - opaque cookie to identify the sender
394     @param context - sender context, to match reply w/ request
395     @param next_hop_sw_if_index - index of interface used to get to next hop
396     @param is_ipv6 - 1 for IPv6, 0 for IPv4
397     @param is_error - address not found or does not match intf
398     @param address[] - Address in question 
399 */
400 define is_address_reachable
401 {
402   u32 client_index;             /* (api_main_t *) am->my_client_index */
403   u32 context;
404   u32 next_hop_sw_if_index;
405   u8 is_known;                  /* on reply, this is the answer */
406   u8 is_ipv6;
407   u8 is_error;                  /* address not found or does not match intf */
408   u8 address[16];
409 };
410
411 /** \brief Want Stats, register for stats updates
412     @param client_index - opaque cookie to identify the sender
413     @param context - sender context, to match reply w/ request
414     @param enable_disable - 1 = enable stats, 0 = disable
415     @param pid - pid of process requesting stats updates
416 */
417 define want_stats
418 {
419   u32 client_index;
420   u32 context;
421   u32 enable_disable;
422   u32 pid;
423 };
424
425 /** \brief Reply for Want Stats request
426     @param context - returned sender context, to match reply w/ request
427     @param retval - return code
428 */
429 define want_stats_reply
430 {
431   u32 context;
432   i32 retval;
433 };
434
435 typeonly manual_print manual_endian define ip4_fib_counter
436 {
437   u32 address;
438   u8 address_length;
439   u64 packets;
440   u64 bytes;
441 };
442
443 manual_print manual_endian define vnet_ip4_fib_counters
444 {
445   u32 vrf_id;
446   u32 count;
447   vl_api_ip4_fib_counter_t c[count];
448 };
449
450 typeonly manual_print manual_endian define ip6_fib_counter
451 {
452   u64 address[2];
453   u8 address_length;
454   u64 packets;
455   u64 bytes;
456 };
457
458 manual_print manual_endian define vnet_ip6_fib_counters
459 {
460   u32 vrf_id;
461   u32 count;
462   vl_api_ip6_fib_counter_t c[count];
463 };
464
465 /** \brief Request for a single block of summary stats
466     @param client_index - opaque cookie to identify the sender
467     @param context - sender context, to match reply w/ request
468 */
469 define vnet_get_summary_stats
470 {
471   u32 client_index;
472   u32 context;
473 };
474
475 /** \brief Reply for vnet_get_summary_stats request
476     @param context - sender context, to match reply w/ request
477     @param retval - return code for request
478     @param total_pkts -  
479     @param total_bytes -
480     @param vector_rate - 
481 */
482 define vnet_summary_stats_reply
483 {
484   u32 context;
485   i32 retval;
486   u64 total_pkts[2];
487   u64 total_bytes[2];
488   f64 vector_rate;
489 };
490
491 /** \brief OAM event structure
492     @param dst_address[] - 
493     @param state
494 */
495 define oam_event
496 {
497   u8 dst_address[4];
498   u8 state;
499 };
500
501 /** \brief Want OAM events request
502     @param client_index - opaque cookie to identify the sender
503     @param context - sender context, to match reply w/ request
504     @param enable_disable- enable if non-zero, else disable
505     @param pid - pid of the requesting process
506 */
507 define want_oam_events
508 {
509   u32 client_index;
510   u32 context;
511   u32 enable_disable;
512   u32 pid;
513 };
514
515 /** \brief Want OAM events response
516     @param context - sender context, to match reply w/ request
517     @param retval - return code for the want oam stats request
518 */
519 define want_oam_events_reply
520 {
521   u32 context;
522   i32 retval;
523 };
524
525 /** \brief OAM add / del target request
526     @param client_index - opaque cookie to identify the sender
527     @param context - sender context, to match reply w/ request
528     @param vrf_id - vrf_id of the target
529     @param src_address[] - source address to use for the updates 
530     @param dst_address[] - destination address of the target
531     @param is_add - add target if non-zero, else delete
532 */
533 define oam_add_del
534 {
535   u32 client_index;
536   u32 context;
537   u32 vrf_id;
538   u8 src_address[4];
539   u8 dst_address[4];
540   u8 is_add;
541 };
542
543 /** \brief OAM add / del target response
544     @param context - sender context, to match reply w/ request
545     @param retval - return code of the request
546 */
547 define oam_add_del_reply
548 {
549   u32 context;
550   i32 retval;
551 };
552
553 /** \brief Reset fib table request
554     @param client_index - opaque cookie to identify the sender
555     @param context - sender context, to match reply w/ request
556     @param vrf_id - vrf/table id of the fib table to reset
557     @param is_ipv6 - an ipv6 fib to reset if non-zero, else ipv4
558 */
559 define reset_fib
560 {
561   u32 client_index;
562   u32 context;
563   u32 vrf_id;
564   u8 is_ipv6;
565 };
566
567 /** \brief Reset fib response
568     @param context - sender context, to match reply w/ request
569     @param retval - return code for the reset bfib request
570 */
571 define reset_fib_reply
572 {
573   u32 context;
574   i32 retval;
575 };
576
577 /** \brief DHCP Proxy config add / del request
578     @param client_index - opaque cookie to identify the sender
579     @param context - sender context, to match reply w/ request
580     @param vrf_id - vrf id
581     @param if_ipv6 - ipv6 if non-zero, else ipv4
582     @param is_add - add the config if non-zero, else delete
583     @param insert_circuit_id - option82 suboption 1 fib number
584     @param dhcp_server[] - server address
585     @param dhcp_src_address[] - <fix this, need details>
586 */
587 define dhcp_proxy_config
588 {
589   u32 client_index;
590   u32 context;
591   u32 vrf_id;
592   u8 is_ipv6;
593   u8 is_add;
594   u8 insert_circuit_id;
595   u8 dhcp_server[16];
596   u8 dhcp_src_address[16];
597 };
598
599 /** \brief DHCP Proxy config response
600     @param context - sender context, to match reply w/ request
601     @param retval - return code for the request
602 */
603 define dhcp_proxy_config_reply
604 {
605   u32 context;
606   i32 retval;
607 };
608
609 /** \brief DHCP Proxy set / unset vss request
610     @param client_index - opaque cookie to identify the sender
611     @param context - sender context, to match reply w/ request
612     @param tbl_id - table id
613     @param oui - first part of vpn id
614     @param fib_id - second part of vpn id
615     @param is_ipv6 - ip6 if non-zero, else ip4
616     @param is_add - set vss if non-zero, else delete
617 */
618 define dhcp_proxy_set_vss
619 {
620   u32 client_index;
621   u32 context;
622   u32 tbl_id;
623   u32 oui;
624   u32 fib_id;
625   u8 is_ipv6;
626   u8 is_add;
627 };
628
629 /** \brief DHCP proxy set / unset vss response
630     @param context - sender context, to match reply w/ request
631     @param retval - return code for the request
632 */
633 define dhcp_proxy_set_vss_reply
634 {
635   u32 context;
636   i32 retval;
637 };
638
639 /** \brief Create loopback interface request
640     @param client_index - opaque cookie to identify the sender
641     @param context - sender context, to match reply w/ request
642     @param mac_address - mac addr to assign to the interface if none-zero
643 */
644 define create_loopback
645 {
646   u32 client_index;
647   u32 context;
648   u8 mac_address[6];
649 };
650
651 /** \brief Create loopback interface response
652     @param context - sender context, to match reply w/ request
653     @param sw_if_index - sw index of the interface that was created
654     @param retval - return code for the request
655 */
656 define create_loopback_reply
657 {
658   u32 context;
659   i32 retval;
660   u32 sw_if_index;
661 };
662
663 /** \brief Delete loopback interface request
664     @param client_index - opaque cookie to identify the sender
665     @param context - sender context, to match reply w/ request
666     @param sw_if_index - sw index of the interface that was created
667 */
668 define delete_loopback
669 {
670   u32 client_index;
671   u32 context;
672   u32 sw_if_index;
673 };
674
675 /** \brief Delete loopback interface response
676     @param context - sender context, to match reply w/ request
677     @param retval - return code for the request
678 */
679 define delete_loopback_reply
680 {
681   u32 context;
682   i32 retval;
683 };
684
685 /** \brief Control ping from client to api server request
686     @param client_index - opaque cookie to identify the sender
687     @param context - sender context, to match reply w/ request
688 */
689 define control_ping
690 {
691   u32 client_index;
692   u32 context;
693 };
694
695 /** \brief Control ping from the client to the server response
696     @param client_index - opaque cookie to identify the sender
697     @param context - sender context, to match reply w/ request
698     @param retval - return code for the request
699     @param vpe_pid - the pid of the vpe, returned by the server
700 */
701 define control_ping_reply
702 {
703   u32 context;
704   i32 retval;
705   u32 client_index;
706   u32 vpe_pid;
707 };
708
709 /** \brief Process a vpe parser cli string request
710     @param client_index - opaque cookie to identify the sender
711     @param context - sender context, to match reply w/ request
712     @param cmd_in_shmem - pointer to cli command string
713 */
714 define cli_request
715 {
716   u32 client_index;
717   u32 context;
718   u64 cmd_in_shmem;
719 };
720 define cli_inband
721 {
722   u32 client_index;
723   u32 context;
724   u32 length;
725   u8 cmd[length];
726 };
727
728 /** \brief vpe parser cli string response
729     @param context - sender context, to match reply w/ request
730     @param retval - return code for request
731     @param reply_in_shmem - Reply string from cli processing if any
732 */
733 define cli_reply
734 {
735   u32 context;
736   i32 retval;
737   u64 reply_in_shmem;
738 };
739 define cli_inband_reply
740 {
741   u32 context;
742   i32 retval;
743   u32 length;
744   u8 reply[length];
745 };
746
747 /** \brief Set max allowed ARP or ip6 neighbor entries request
748     @param client_index - opaque cookie to identify the sender
749     @param context - sender context, to match reply w/ request
750     @param is_ipv6 - neighbor limit if non-zero, else ARP limit
751     @param arp_neighbor_limit - the new limit, defaults are ~ 50k
752 */
753 define set_arp_neighbor_limit
754 {
755   u32 client_index;
756   u32 context;
757   u8 is_ipv6;
758   u32 arp_neighbor_limit;
759 };
760
761 /** \brief Set max allowed ARP or ip6 neighbor entries response
762     @param context - sender context, to match reply w/ request
763     @param retval - return code for request
764 */
765 define set_arp_neighbor_limit_reply
766 {
767   u32 context;
768   i32 retval;
769 };
770
771 /** \brief L2 interface patch add / del request
772     @param client_index - opaque cookie to identify the sender
773     @param context - sender context, to match reply w/ request
774     @param rx_sw_if_index - receive side interface 
775     @param tx_sw_if_index - transmit side interface
776     @param is_add - if non-zero set up the interface patch, else remove it
777 */
778 define l2_patch_add_del
779 {
780   u32 client_index;
781   u32 context;
782   u32 rx_sw_if_index;
783   u32 tx_sw_if_index;
784   u8 is_add;
785 };
786
787 /** \brief L2 interface patch add / del response
788     @param context - sender context, to match reply w/ request
789     @param retval - return code for the request
790 */
791 define l2_patch_add_del_reply
792 {
793   u32 context;
794   i32 retval;
795 };
796
797 /** \brief IPv6 segment routing tunnel add / del request
798     @param client_index - opaque cookie to identify the sender
799     @param context - sender context, to match reply w/ request
800     @param is_add - add the tunnel if non-zero, else delete it
801     @param name[] - tunnel name (len. 64)
802     @param src_address[] -
803     @param dst_address[] -
804     @param dst_mask_width -
805     @param inner_vrf_id -
806     @param outer_vrf_id -
807     @param flags_net_byte_order -
808     @param n_segments -
809     @param n_tags -
810     @param segs_and_tags[] -
811     @param policy_name[] - name of policy to associate this tunnel to (len. 64)
812 */
813 define sr_tunnel_add_del
814 {
815   u32 client_index;
816   u32 context;
817   u8 is_add;
818   u8 name[64];
819   u8 src_address[16];
820   u8 dst_address[16];
821   u8 dst_mask_width;
822   u32 inner_vrf_id;
823   u32 outer_vrf_id;
824   u16 flags_net_byte_order;
825   u8 n_segments;
826   u8 n_tags;
827   u8 policy_name[64];
828   u8 segs_and_tags[0];
829 };
830
831 /** \brief IPv6 segment routing tunnel add / del response
832     @param context - sender context, to match reply w/ request
833     @param retval - return value for request
834 */
835 define sr_tunnel_add_del_reply
836 {
837   u32 context;
838   i32 retval;
839 };
840
841 /** \brief IPv6 segment routing policy add / del request
842     @param client_index - opaque cookie to identify the sender
843     @param context - sender context, to match reply w/ request
844     @param is_add - add the tunnel if non-zero, else delete it
845     @param name[] - policy name (len. 64)
846     @param tunnel_names[] -
847 */
848 define sr_policy_add_del
849 {
850   u32 client_index;
851   u32 context;
852   u8 is_add;
853   u8 name[64];
854   u8 tunnel_names[0];
855 };
856
857 /** \brief IPv6 segment routing policy add / del response
858     @param context - sender context, to match reply w/ request
859     @param retval - return value for request
860 */
861 define sr_policy_add_del_reply
862 {
863   u32 context;
864   i32 retval;
865 };
866
867 /** \brief IPv6 segment routing multicast map to policy add / del request
868     @param client_index - opaque cookie to identify the sender
869     @param context - sender context, to match reply w/ request
870     @param is_add - add the tunnel if non-zero, else delete it
871     @param multicast_address[] - IP6 multicast address
872     @param policy_name[] = policy name (len.64)
873 */
874 define sr_multicast_map_add_del
875 {
876   u32 client_index;
877   u32 context;
878   u8 is_add;
879   u8 multicast_address[16];
880   u8 policy_name[64];
881 };
882
883 /** \brief IPv6 segment routing multicast map to policy add / del response
884     @param context - sender context, to match reply w/ request
885     @param retval - return value for request
886 */
887 define sr_multicast_map_add_del_reply
888 {
889   u32 context;
890   i32 retval;
891 };
892
893 /** \brief Interface set vpath request
894     @param client_index - opaque cookie to identify the sender
895     @param context - sender context, to match reply w/ request
896     @param sw_if_index - interface used to reach neighbor
897     @param enable - if non-zero enable, else disable
898 */
899 define sw_interface_set_vpath
900 {
901   u32 client_index;
902   u32 context;
903   u32 sw_if_index;
904   u8 enable;
905 };
906
907 /** \brief Interface set vpath response
908     @param context - sender context, to match reply w/ request
909     @param retval - return code for the request
910 */
911 define sw_interface_set_vpath_reply
912 {
913   u32 context;
914   i32 retval;
915 };
916
917 /** \brief Set L2 XConnect between two interfaces request
918     @param client_index - opaque cookie to identify the sender
919     @param context - sender context, to match reply w/ request
920     @param rx_sw_if_index - Receive interface index
921     @param tx_sw_if_index - Transmit interface index
922     @param enable - enable xconnect if not 0, else set to L3 mode
923 */
924 define sw_interface_set_l2_xconnect
925 {
926   u32 client_index;
927   u32 context;
928   u32 rx_sw_if_index;
929   u32 tx_sw_if_index;
930   u8 enable;
931 };
932
933 /** \brief Set L2 XConnect response
934     @param context - sender context, to match reply w/ request
935     @param retval - L2 XConnect request return code
936 */
937 define sw_interface_set_l2_xconnect_reply
938 {
939   u32 context;
940   i32 retval;
941 };
942
943 /** \brief Interface bridge mode request
944     @param client_index - opaque cookie to identify the sender
945     @param context - sender context, to match reply w/ request
946     @param rx_sw_if_index - the interface
947     @param bd_id - bridge domain id
948     @param bvi - Setup interface as a bvi, bridge mode only
949     @param shg - Shared horizon group, for bridge mode only
950     @param enable - Enable beige mode if not 0, else set to L3 mode
951 */
952 define sw_interface_set_l2_bridge
953 {
954   u32 client_index;
955   u32 context;
956   u32 rx_sw_if_index;
957   u32 bd_id;
958   u8 shg;
959   u8 bvi;
960   u8 enable;
961 };
962
963 /** \brief Interface bridge mode response
964     @param context - sender context, to match reply w/ request
965     @param retval - Bridge mode request return code
966 */
967 define sw_interface_set_l2_bridge_reply
968 {
969   u32 context;
970   i32 retval;
971 };
972
973 /** \brief L2 FIB add entry request
974     @param client_index - opaque cookie to identify the sender
975     @param context - sender context, to match reply w/ request
976     @param mac - the entry's mac address
977     @param bd_id - the entry's bridge domain id
978     @param sw_if_index - the interface
979     @param is_add - If non zero add the entry, else delete it
980     @param static_mac - 
981     @param filter_mac -
982 */
983 define l2fib_add_del
984 {
985   u32 client_index;
986   u32 context;
987   u64 mac;
988   u32 bd_id;
989   u32 sw_if_index;
990   u8 is_add;
991   u8 static_mac;
992   u8 filter_mac;
993   u8 bvi_mac;
994 };
995
996 /** \brief L2 FIB add entry response
997     @param context - sender context, to match reply w/ request
998     @param retval - return code for the add l2fib entry request
999 */
1000 define l2fib_add_del_reply
1001 {
1002   u32 context;
1003   i32 retval;
1004 };
1005
1006 /** \brief Set L2 flags request !!! TODO - need more info, feature bits in l2_input.h
1007     @param client_index - opaque cookie to identify the sender
1008     @param context - sender context, to match reply w/ request
1009     @param sw_if_index - interface 
1010     @param is_set - if non-zero, set the bits, else clear them
1011     @param feature_bitmap - non-zero bits to set or clear
1012 */
1013 define l2_flags
1014 {
1015   u32 client_index;
1016   u32 context;
1017   u32 sw_if_index;
1018   u8 is_set;
1019   u32 feature_bitmap;
1020 };
1021
1022 /** \brief Set L2 bits response
1023     @param context - sender context, to match reply w/ request
1024     @param retval - return code for the set l2 bits request
1025 */
1026 define l2_flags_reply
1027 {
1028   u32 context;
1029   i32 retval;
1030   u32 resulting_feature_bitmap;
1031 };
1032
1033 /** \brief Set bridge flags (such as L2_LEARN, L2_FWD, L2_FLOOD, 
1034     L2_UU_FLOOD, or L2_ARP_TERM) request
1035     @param client_index - opaque cookie to identify the sender
1036     @param context - sender context, to match reply w/ request
1037     @param bd_id - the bridge domain to set the flags for
1038     @param is_set - if non-zero, set the flags, else clear them
1039     @param feature_bitmap - bits that are non-zero to set or clear
1040 */
1041 define bridge_flags
1042 {
1043   u32 client_index;
1044   u32 context;
1045   u32 bd_id;
1046   u8 is_set;
1047   u32 feature_bitmap;
1048 };
1049
1050 /** \brief Set bridge flags response
1051     @param context - sender context, to match reply w/ request
1052     @param retval - return code for the set bridge flags request
1053     @param resulting_feature_bitmap - the feature bitmap value after the request is implemented
1054 */
1055 define bridge_flags_reply
1056 {
1057   u32 context;
1058   i32 retval;
1059   u32 resulting_feature_bitmap;
1060 };
1061
1062 /** \brief Set bridge domain ip to mac entry request
1063     @param client_index - opaque cookie to identify the sender
1064     @param context - sender context, to match reply w/ request
1065     @param bd_id - the bridge domain to set the flags for
1066     @param is_add - if non-zero, add the entry, else clear it
1067     @param is_ipv6 - if non-zero, ipv6 address, else ipv4 address
1068     @param mac_address - MAC address
1069     @param 
1070 */
1071 define bd_ip_mac_add_del
1072 {
1073   u32 client_index;
1074   u32 context;
1075   u32 bd_id;
1076   u8 is_add;
1077   u8 is_ipv6;
1078   u8 ip_address[16];
1079   u8 mac_address[6];
1080 };
1081
1082 /** \brief Set bridge domain ip to mac entry response
1083     @param context - sender context, to match reply w/ request
1084     @param retval - return code for the set bridge flags request
1085 */
1086 define bd_ip_mac_add_del_reply
1087 {
1088   u32 context;
1089   i32 retval;
1090 };
1091
1092 /** \brief Add/Delete classification table request
1093     @param client_index - opaque cookie to identify the sender
1094     @param context - sender context, to match reply w/ request
1095     @param is_add- if non-zero add the table, else delete it
1096     @param del_chain - if non-zero delete the whole chain of tables
1097     @param table_index - if add, reuturns index of the created table, else specifies the table to delete  
1098     @param nbuckets - number of buckets when adding a table
1099     @param memory_size - memory size when adding a table
1100     @param match_n_vectors - number of match vectors
1101     @param next_table_index - index of next table
1102     @param miss_next_index - index of miss table
1103     @param current_data_flag - option to use current node's packet payload
1104             as the starting point from where packets are classified,
1105             This option is only valid for L2/L3 input ACL for now.
1106             0: by default, classify data from the buffer's start location
1107             1: classify packets from VPP node’s current data pointer
1108     @param current_data_offset - a signed value to shift the start location of
1109             the packet to be classified
1110             For example, if input IP ACL node is used, L2 header’s first byte
1111             can be accessible by configuring current_data_offset to -14
1112             if there is no vlan tag.
1113             This is valid only if current_data_flag is set to 1.
1114     @param mask[] - match mask
1115 */
1116 define classify_add_del_table
1117 {
1118   u32 client_index;
1119   u32 context;
1120   u8 is_add;
1121   u8 del_chain;
1122   u32 table_index;
1123   u32 nbuckets;
1124   u32 memory_size;
1125   u32 skip_n_vectors;
1126   u32 match_n_vectors;
1127   u32 next_table_index;
1128   u32 miss_next_index;
1129   u32 current_data_flag;
1130   i32 current_data_offset;
1131   u8 mask[0];
1132 };
1133
1134 /** \brief Add/Delete classification table response
1135     @param context - sender context, to match reply w/ request
1136     @param retval - return code for the table add/del requst
1137     @param new_table_index - for add, returned index of the new table
1138     @param skip_n_vectors - for add, returned value of skip_n_vectors in table
1139     @param match_n_vectors -for add, returned value of match_n_vectors in table
1140 */
1141 define classify_add_del_table_reply
1142 {
1143   u32 context;
1144   i32 retval;
1145   u32 new_table_index;
1146   u32 skip_n_vectors;
1147   u32 match_n_vectors;
1148 };
1149
1150 /** \brief Classify add / del session request
1151     @param client_index - opaque cookie to identify the sender
1152     @param context - sender context, to match reply w/ request
1153     @param is_add - add session if non-zero, else delete
1154     @param table_index - index of the table to add/del the session, required
1155     @param hit_next_index - for add, hit_next_index of new session, required
1156     @param opaque_index - for add, opaque_index of new session
1157     @param advance -for add, advance value for session
1158     @param action -
1159            0: no action (by default)
1160               metadata is not used.
1161            1: Classified IP packets will be looked up from the
1162               specified ipv4 fib table (configured by metadata as VRF id).
1163               Only valid for L3 input ACL node
1164            2: Classified IP packets will be looked up from the
1165               specified ipv6 fib table (configured by metadata as VRF id).
1166               Only valid for L3 input ACL node
1167     @param metadata - valid only if action != 0
1168            VRF id if action is 1 or 2.
1169     @param match[] - for add, match value for session, required
1170 */
1171 define classify_add_del_session
1172 {
1173   u32 client_index;
1174   u32 context;
1175   u8 is_add;
1176   u32 table_index;
1177   u32 hit_next_index;
1178   u32 opaque_index;
1179   i32 advance;
1180   u8 action;
1181   u32 metadata;
1182   u8 match[0];
1183 };
1184
1185 /** \brief Classify add / del session response
1186     @param context - sender context, to match reply w/ request
1187     @param retval - return code for the add/del session request
1188 */
1189 define classify_add_del_session_reply
1190 {
1191   u32 context;
1192   i32 retval;
1193 };
1194
1195 /** \brief Set/unset the classification table for an interface request 
1196     @param client_index - opaque cookie to identify the sender
1197     @param context - sender context, to match reply w/ request
1198     @param is_ipv6 - ipv6 if non-zero, else ipv4
1199     @param sw_if_index - interface to associate with the table
1200     @param table_index - index of the table, if ~0 unset the table
1201 */
1202 define classify_set_interface_ip_table
1203 {
1204   u32 client_index;
1205   u32 context;
1206   u8 is_ipv6;
1207   u32 sw_if_index;
1208   u32 table_index;              /* ~0 => off */
1209 };
1210
1211 /** \brief Set/unset interface classification table response 
1212     @param context - sender context, to match reply w/ request
1213     @param retval - return code
1214 */
1215 define classify_set_interface_ip_table_reply
1216 {
1217   u32 context;
1218   i32 retval;
1219 };
1220
1221 /** \brief Set/unset l2 classification tables for an interface request
1222     @param client_index - opaque cookie to identify the sender
1223     @param context - sender context, to match reply w/ request
1224     @param sw_if_index - interface to set/unset tables for
1225     @param ip4_table_index - ip4 index, use ~0 for all 3 indexes to unset
1226     @param ip6_table_index - ip6 index
1227     @param other_table_index - other index
1228 */
1229 define classify_set_interface_l2_tables
1230 {
1231   u32 client_index;
1232   u32 context;
1233   u32 sw_if_index;
1234   /* 3 x ~0 => off */
1235   u32 ip4_table_index;
1236   u32 ip6_table_index;
1237   u32 other_table_index;
1238   u8 is_input;
1239 };
1240
1241 /** \brief Set/unset l2 classification tables for an interface response
1242     @param context - sender context, to match reply w/ request
1243     @param retval - return code for the request
1244 */
1245 define classify_set_interface_l2_tables_reply
1246 {
1247   u32 context;
1248   i32 retval;
1249 };
1250
1251 /** \brief Get node index using name request
1252     @param client_index - opaque cookie to identify the sender
1253     @param context - sender context, to match reply w/ request
1254     @param node_name[] - name of the node
1255 */
1256 define get_node_index
1257 {
1258   u32 client_index;
1259   u32 context;
1260   u8 node_name[64];
1261 };
1262
1263 /** \brief Get node index using name request
1264     @param context - sender context, to match reply w/ request
1265     @param retval - return code for the request
1266     @param node_index - index of the desired node if found, else ~0
1267 */
1268 define get_node_index_reply
1269 {
1270   u32 context;
1271   i32 retval;
1272   u32 node_index;
1273 };
1274
1275 /** \brief Set the next node for a given node request
1276     @param client_index - opaque cookie to identify the sender
1277     @param context - sender context, to match reply w/ request
1278     @param node_name[] - node to add the next node to
1279     @param next_name[] - node to add as the next node
1280 */
1281 define add_node_next
1282 {
1283   u32 client_index;
1284   u32 context;
1285   u8 node_name[64];
1286   u8 next_name[64];
1287 };
1288
1289 /** \brief IP Set the next node for a given node response
1290     @param context - sender context, to match reply w/ request
1291     @param retval - return code for the add next node request
1292     @param next_index - the index of the next node if success, else ~0
1293 */
1294 define add_node_next_reply
1295 {
1296   u32 context;
1297   i32 retval;
1298   u32 next_index;
1299 };
1300
1301 /** \brief DHCP Proxy config 2 add / del request
1302     @param client_index - opaque cookie to identify the sender
1303     @param context - sender context, to match reply w/ request
1304     @param rx_vrf_id - receive vrf id
1305     @param server_vrf_id - server vrf id
1306     @param if_ipv6 - ipv6 if non-zero, else ipv4
1307     @param is_add - add the config if non-zero, else delete
1308     @param insert_circuit_id - option82 suboption 1 fib number
1309     @param dhcp_server[] - server address
1310     @param dhcp_src_address[] - <fix this, need details>
1311 */
1312 define dhcp_proxy_config_2
1313 {
1314   u32 client_index;
1315   u32 context;
1316   u32 rx_vrf_id;
1317   u32 server_vrf_id;
1318   u8 is_ipv6;
1319   u8 is_add;
1320   u8 insert_circuit_id;
1321   u8 dhcp_server[16];
1322   u8 dhcp_src_address[16];
1323 };
1324
1325 /** \brief DHCP Proxy config 2 add / del response
1326     @param context - sender context, to match reply w/ request
1327     @param retval - return code for request
1328 */
1329 define dhcp_proxy_config_2_reply
1330 {
1331   u32 context;
1332   i32 retval;
1333 };
1334
1335 /** \brief L2 fib clear table request, clear all mac entries in the l2 fib
1336     @param client_index - opaque cookie to identify the sender
1337     @param context - sender context, to match reply w/ request
1338 */
1339 define l2_fib_clear_table
1340 {
1341   u32 client_index;
1342   u32 context;
1343 };
1344
1345 /** \brief L2 fib clear table response
1346     @param context - sender context, to match reply w/ request
1347     @param retval - return code for the request
1348 */
1349 define l2_fib_clear_table_reply
1350 {
1351   u32 context;
1352   i32 retval;
1353 };
1354
1355 /** \brief L2 interface ethernet flow point filtering enable/disable request
1356     @param client_index - opaque cookie to identify the sender
1357     @param context - sender context, to match reply w/ request
1358     @param sw_if_index - interface to enable/disable filtering on
1359     @param enable_disable - if non-zero enable filtering, else disable
1360 */
1361 define l2_interface_efp_filter
1362 {
1363   u32 client_index;
1364   u32 context;
1365   u32 sw_if_index;
1366   u32 enable_disable;
1367 };
1368
1369 /** \brief L2 interface ethernet flow point filtering response
1370     @param context - sender context, to match reply w/ request
1371     @param retval - return code for the request
1372 */
1373 define l2_interface_efp_filter_reply
1374 {
1375   u32 context;
1376   i32 retval;
1377 };
1378
1379 /** \brief L2 interface vlan tag rewrite configure request
1380     @param client_index - opaque cookie to identify the sender
1381     @param context - sender context, to match reply w/ request
1382     @param sw_if_index - interface the operation is applied to
1383     @param vtr_op - Choose from l2_vtr_op_t enum values
1384     @param push_dot1q - first pushed flag dot1q id set, else dot1ad
1385     @param tag1 - Needed for any push or translate vtr op
1386     @param tag2 - Needed for any push 2 or translate x-2 vtr ops
1387 */
1388 define l2_interface_vlan_tag_rewrite
1389 {
1390   u32 client_index;
1391   u32 context;
1392   u32 sw_if_index;
1393   u32 vtr_op;
1394   u32 push_dot1q;               // ethertype of first pushed tag is dot1q/dot1ad
1395   u32 tag1;                     // first pushed tag
1396   u32 tag2;                     // second pushed tag
1397 };
1398
1399 /** \brief L2 interface vlan tag rewrite response
1400     @param context - sender context, to match reply w/ request
1401     @param retval - return code for the request
1402 */
1403 define l2_interface_vlan_tag_rewrite_reply
1404 {
1405   u32 context;
1406   i32 retval;
1407 };
1408
1409 define create_subif
1410 {
1411   u32 client_index;
1412   u32 context;
1413   u32 sw_if_index;
1414   u32 sub_id;
1415
1416   /* These fields map directly onto the subif template */
1417   u8 no_tags;
1418   u8 one_tag;
1419   u8 two_tags;
1420   u8 dot1ad;                    // 0 = dot1q, 1=dot1ad
1421   u8 exact_match;
1422   u8 default_sub;
1423   u8 outer_vlan_id_any;
1424   u8 inner_vlan_id_any;
1425   u16 outer_vlan_id;
1426   u16 inner_vlan_id;
1427 };
1428
1429 define create_subif_reply
1430 {
1431   u32 context;
1432   i32 retval;
1433   u32 sw_if_index;
1434 };
1435
1436 /** \brief show version
1437     @param client_index - opaque cookie to identify the sender
1438     @param context - sender context, to match reply w/ request
1439 */
1440 define show_version
1441 {
1442   u32 client_index;
1443   u32 context;
1444 };
1445
1446 /** \brief show version response
1447     @param context - sender context, to match reply w/ request
1448     @param retval - return code for the request
1449     @param program - name of the program (vpe)
1450     @param version  - version of the program
1451     @param build_directory - root of the workspace where the program was built
1452 */
1453 define show_version_reply
1454 {
1455   u32 context;
1456   i32 retval;
1457   u8 program[32];
1458   u8 version[32];
1459   u8 build_date[32];
1460   u8 build_directory[256];
1461 };
1462
1463 /** \brief l2 fib table entry structure
1464     @param bd_id - the l2 fib / bridge domain table id
1465     @param mac - the entry's mac address
1466     @param sw_if_index - index of the interface
1467     @param static_mac - the entry is statically configured.
1468     @param filter_mac - the entry is a mac filter entry.
1469     @param bvi_mac - the mac address is a bridge virtual interface
1470 */
1471 define l2_fib_table_entry
1472 {
1473   u32 context;
1474   u32 bd_id;
1475   u64 mac;
1476   u32 sw_if_index;
1477   u8 static_mac;
1478   u8 filter_mac;
1479   u8 bvi_mac;
1480 };
1481
1482 /** \brief Dump l2 fib (aka bridge domain) table
1483     @param client_index - opaque cookie to identify the sender
1484     @param bd_id - the l2 fib / bridge domain table identifier
1485 */
1486 define l2_fib_table_dump
1487 {
1488   u32 client_index;
1489   u32 context;
1490   u32 bd_id;
1491 };
1492
1493 /** \brief add or delete locator_set
1494     @param client_index - opaque cookie to identify the sender
1495     @param context - sender context, to match reply w/ request
1496     @param is_add - add address if non-zero, else delete
1497     @param locator_set_name - locator name
1498     @param locator_num - number of locators
1499     @param locators - LISP locator records
1500         Structure of one locator record is as follows:
1501
1502         define locator_t {
1503           u32 sw_if_index;
1504           u8 priority;
1505           u8 weight;
1506         }
1507 */
1508 define lisp_add_del_locator_set
1509 {
1510   u32 client_index;
1511   u32 context;
1512   u8 is_add;
1513   u8 locator_set_name[64];
1514   u32 locator_num;
1515   u8 locators[0];
1516 };
1517
1518 /** \brief Reply for locator_set add/del
1519     @param context - returned sender context, to match reply w/ request
1520     @param retval - return code
1521     @param ls_index - locator set index
1522 */
1523 define lisp_add_del_locator_set_reply
1524 {
1525   u32 context;
1526   i32 retval;
1527   u32 ls_index;
1528 };
1529
1530 /** \brief add or delete locator for locator_set
1531     @param client_index - opaque cookie to identify the sender
1532     @param context - sender context, to match reply w/ request
1533     @param is_add - add address if non-zero, else delete
1534     @param locator_set_name - name of locator_set to add/del locator
1535     @param sw_if_index - index of the interface
1536     @param priority - priority of the lisp locator
1537     @param weight - weight of the lisp locator
1538 */
1539 define lisp_add_del_locator
1540 {
1541   u32 client_index;
1542   u32 context;
1543   u8 is_add;
1544   u8 locator_set_name[64];
1545   u32 sw_if_index;
1546   u8 priority;
1547   u8 weight;
1548 };
1549
1550 /** \brief Reply for locator add/del
1551     @param context - returned sender context, to match reply w/ request
1552     @param retval - return code
1553 */
1554 define lisp_add_del_locator_reply
1555 {
1556   u32 context;
1557   i32 retval;
1558 };
1559
1560 /** \brief add or delete lisp eid-table
1561     @param client_index - opaque cookie to identify the sender
1562     @param context - sender context, to match reply w/ request
1563     @param is_add - add address if non-zero, else delete
1564     @param eid_type:
1565       0 : ipv4
1566       1 : ipv6
1567       2 : mac
1568     @param eid - EID can be ip4, ip6 or mac
1569     @param prefix_len - prefix len
1570     @param locator_set_name - name of locator_set to add/del eid-table
1571     @param vni - virtual network instance
1572     @param key_id
1573       HMAC_NO_KEY           0
1574       HMAC_SHA_1_96         1
1575       HMAC_SHA_256_128      2
1576     @param key - secret key
1577 */
1578 define lisp_add_del_local_eid
1579 {
1580   u32 client_index;
1581   u32 context;
1582   u8 is_add;
1583   u8 eid_type;
1584   u8 eid[16];
1585   u8 prefix_len;
1586   u8 locator_set_name[64];
1587   u32 vni;
1588   u16 key_id;
1589   u8 key[64];
1590 };
1591
1592 /** \brief Reply for local_eid add/del
1593     @param context - returned sender context, to match reply w/ request
1594     @param retval - return code
1595 */
1596 define lisp_add_del_local_eid_reply
1597 {
1598   u32 context;
1599   i32 retval;
1600 };
1601
1602 /** \brief add or delete lisp gpe tunnel
1603     @param client_index - opaque cookie to identify the sender
1604     @param context - sender context, to match reply w/ request
1605     @param is_add - add address if non-zero, else delete
1606     @param eid_type -
1607       0 : ipv4
1608       1 : ipv6
1609       2 : mac
1610     @param rmt_eid - remote eid
1611     @param lcl_eid - local eid
1612     @param rmt_len - remote prefix len
1613     @param lcl_len - local prefix len
1614     @param vni - virtual network identifier
1615     @param dp_table - vrf/bridge domain id
1616     @param loc_num - number of locators
1617     @param lcl_locs - array of local locators
1618     @param rmt_locs - array of remote locators
1619     @param action - negative action when 0 locators configured
1620 */
1621 define lisp_gpe_add_del_fwd_entry
1622 {
1623   u32 client_index;
1624   u32 context;
1625   u8 is_add;
1626   u8 eid_type;
1627   u8 rmt_eid[16];
1628   u8 lcl_eid[16];
1629   u8 rmt_len;
1630   u8 lcl_len;
1631   u32 vni;
1632   u32 dp_table;
1633   u32 loc_num;
1634   u8 lcl_locs[loc_num];
1635   u8 rmt_locs[loc_num];
1636   u8 action;
1637 };
1638
1639 /** \brief Reply for gpe_fwd_entry add/del
1640     @param context - returned sender context, to match reply w/ request
1641     @param retval - return code
1642 */
1643 define lisp_gpe_add_del_fwd_entry_reply
1644 {
1645   u32 context;
1646   i32 retval;
1647 };
1648
1649 /** \brief Add/delete map server
1650     @param client_index - opaque cookie to identify the sender
1651     @param context - sender context, to match reply w/ request
1652     @param is_add - add address if non-zero; delete otherwise
1653     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
1654     @param ip_address - map server IP address
1655 */
1656 define lisp_add_del_map_server
1657 {
1658   u32 client_index;
1659   u32 context;
1660   u8 is_add;
1661   u8 is_ipv6;
1662   u8 ip_address[16];
1663 };
1664
1665 /** \brief Reply for lisp_add_del_map_server
1666     @param context - returned sender context, to match reply w/ request
1667     @param retval - return code
1668 */
1669 define lisp_add_del_map_server_reply
1670 {
1671   u32 context;
1672   i32 retval;
1673 };
1674
1675 /** \brief add or delete map-resolver
1676     @param client_index - opaque cookie to identify the sender
1677     @param context - sender context, to match reply w/ request
1678     @param is_add - add address if non-zero, else delete
1679     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
1680     @param ip_address - array of address bytes
1681 */
1682 define lisp_add_del_map_resolver
1683 {
1684   u32 client_index;
1685   u32 context;
1686   u8 is_add;
1687   u8 is_ipv6;
1688   u8 ip_address[16];
1689 };
1690
1691 /** \brief Reply for map_resolver add/del
1692     @param context - returned sender context, to match reply w/ request
1693     @param retval - return code
1694 */
1695 define lisp_add_del_map_resolver_reply
1696 {
1697   u32 context;
1698   i32 retval;
1699 };
1700
1701 /** \brief enable or disable lisp-gpe protocol
1702     @param client_index - opaque cookie to identify the sender
1703     @param context - sender context, to match reply w/ request
1704     @param is_en - enable protocol if non-zero, else disable
1705 */
1706 define lisp_gpe_enable_disable
1707 {
1708   u32 client_index;
1709   u32 context;
1710   u8 is_en;
1711 };
1712
1713 /** \brief Reply for gpe enable/disable
1714     @param context - returned sender context, to match reply w/ request
1715     @param retval - return code
1716 */
1717 define lisp_gpe_enable_disable_reply
1718 {
1719   u32 context;
1720   i32 retval;
1721 };
1722
1723 /** \brief enable or disable LISP feature
1724     @param client_index - opaque cookie to identify the sender
1725     @param context - sender context, to match reply w/ request
1726     @param is_en - enable protocol if non-zero, else disable
1727 */
1728 define lisp_enable_disable
1729 {
1730   u32 client_index;
1731   u32 context;
1732   u8 is_en;
1733 };
1734
1735 /** \brief Reply for gpe enable/disable
1736     @param context - returned sender context, to match reply w/ request
1737     @param retval - return code
1738 */
1739 define lisp_enable_disable_reply
1740 {
1741   u32 context;
1742   i32 retval;
1743 };
1744
1745 /** \brief add or delete gpe_iface
1746     @param client_index - opaque cookie to identify the sender
1747     @param context - sender context, to match reply w/ request
1748     @param is_add - add address if non-zero, else delete
1749 */
1750 define lisp_gpe_add_del_iface
1751 {
1752   u32 client_index;
1753   u32 context;
1754   u8 is_add;
1755   u8 is_l2;
1756   u32 dp_table;
1757   u32 vni;
1758 };
1759
1760 /** \brief Reply for gpe_iface add/del
1761     @param context - returned sender context, to match reply w/ request
1762     @param retval - return code
1763 */
1764 define lisp_gpe_add_del_iface_reply
1765 {
1766   u32 context;
1767   i32 retval;
1768 };
1769
1770 /** \brief configure or disable LISP PITR node
1771     @param client_index - opaque cookie to identify the sender
1772     @param context - sender context, to match reply w/ request
1773     @param ls_name - locator set name
1774     @param is_add - add locator set if non-zero, else disable pitr
1775 */
1776 define lisp_pitr_set_locator_set
1777 {
1778   u32 client_index;
1779   u32 context;
1780   u8 is_add;
1781   u8 ls_name[64];
1782 };
1783
1784 /** \brief Reply for lisp_pitr_set_locator_set
1785     @param context - returned sender context, to match reply w/ request
1786     @param retval - return code
1787 */
1788 define lisp_pitr_set_locator_set_reply
1789 {
1790   u32 context;
1791   i32 retval;
1792 };
1793
1794 /** \brief Get state of LISP RLOC probing
1795     @param client_index - opaque cookie to identify the sender
1796     @param context - sender context, to match reply w/ request
1797 */
1798 define show_lisp_rloc_probe_state
1799 {
1800   u32 client_index;
1801   u32 context;
1802 };
1803
1804 /** \brief Reply for show_lisp_rloc_probe_state
1805     @param context - returned sender context, to match reply w/ request
1806     @param retval - return code
1807     @param is_enabled - state of RLOC probing
1808 */
1809 define show_lisp_rloc_probe_state_reply
1810 {
1811   u32 context;
1812   i32 retval;
1813   u8 is_enabled;
1814 };
1815
1816 /** \brief enable/disable LISP RLOC probing
1817     @param client_index - opaque cookie to identify the sender
1818     @param context - sender context, to match reply w/ request
1819     @param is_enable - enable if non-zero; disable otherwise
1820 */
1821 define lisp_rloc_probe_enable_disable
1822 {
1823   u32 client_index;
1824   u32 context;
1825   u8 is_enabled;
1826 };
1827
1828 /** \brief Reply for lisp_rloc_probe_enable_disable
1829     @param context - returned sender context, to match reply w/ request
1830     @param retval - return code
1831 */
1832 define lisp_rloc_probe_enable_disable_reply
1833 {
1834   u32 context;
1835   i32 retval;
1836 };
1837
1838 /** \brief enable/disable LISP map-register
1839     @param client_index - opaque cookie to identify the sender
1840     @param context - sender context, to match reply w/ request
1841     @param is_enable - enable if non-zero; disable otherwise
1842 */
1843 define lisp_map_register_enable_disable
1844 {
1845   u32 client_index;
1846   u32 context;
1847   u8 is_enabled;
1848 };
1849
1850 /** \brief Reply for lisp_map_register_enable_disable
1851     @param context - returned sender context, to match reply w/ request
1852     @param retval - return code
1853 */
1854 define lisp_map_register_enable_disable_reply
1855 {
1856   u32 context;
1857   i32 retval;
1858 };
1859
1860 /** \brief Get state of LISP map-register
1861     @param client_index - opaque cookie to identify the sender
1862     @param context - sender context, to match reply w/ request
1863 */
1864 define show_lisp_map_register_state
1865 {
1866   u32 client_index;
1867   u32 context;
1868 };
1869
1870 /** \brief Reply for show_lisp_map_register_state
1871     @param context - returned sender context, to match reply w/ request
1872     @param retval - return code
1873 */
1874 define show_lisp_map_register_state_reply
1875 {
1876   u32 context;
1877   i32 retval;
1878   u8 is_enabled;
1879 };
1880
1881 /** \brief set LISP map-request mode. Based on configuration VPP will send
1882       src/dest or just normal destination map requests.
1883     @param client_index - opaque cookie to identify the sender
1884     @param context - sender context, to match reply w/ request
1885     @param mode - new map-request mode. Supported values are:
1886       0 - destination only
1887       1 - source/destaination
1888 */
1889 define lisp_map_request_mode
1890 {
1891   u32 client_index;
1892   u32 context;
1893   u8 mode;
1894 };
1895
1896 /** \brief Reply for lisp_map_request_mode
1897     @param context - returned sender context, to match reply w/ request
1898     @param retval - return code
1899 */
1900 define lisp_map_request_mode_reply
1901 {
1902   u32 context;
1903   i32 retval;
1904 };
1905
1906 /** \brief Request for LISP map-request mode
1907     @param client_index - opaque cookie to identify the sender
1908     @param context - sender context, to match reply w/ request
1909 */
1910 define show_lisp_map_request_mode
1911 {
1912   u32 client_index;
1913   u32 context;
1914 };
1915
1916 /** \brief Reply for show_lisp_map_request_mode
1917     @param context - returned sender context, to match reply w/ request
1918     @param retval - return code
1919     @param mode - map-request mode
1920 */
1921 define show_lisp_map_request_mode_reply
1922 {
1923   u32 context;
1924   i32 retval;
1925   u8 mode;
1926 };
1927
1928 /** \brief add or delete remote static mapping
1929     @param client_index - opaque cookie to identify the sender
1930     @param context - sender context, to match reply w/ request
1931     @param is_add - add address if non-zero, else delete
1932     @param is_src_dst - flag indicating src/dst based routing policy
1933     @param del_all - if set, delete all remote mappings
1934     @param vni - virtual network instance
1935     @param action - negative map-reply action
1936     @param eid_type -
1937       0 : ipv4
1938       1 : ipv6
1939       2 : mac
1940     @param deid - dst EID
1941     @param seid - src EID, valid only if is_src_dst is enabled
1942     @param rloc_num - number of remote locators
1943     @param rlocs - remote locator records
1944         Structure of remote locator:
1945
1946         define rloc_t {
1947           u8 is_ip4;
1948           u8 priority;
1949           u8 weight;
1950           u8 addr[16];
1951         }
1952 */
1953 define lisp_add_del_remote_mapping
1954 {
1955   u32 client_index;
1956   u32 context;
1957   u8 is_add;
1958   u8 is_src_dst;
1959   u8 del_all;
1960   u32 vni;
1961   u8 action;
1962   u8 eid_type;
1963   u8 eid[16];
1964   u8 eid_len;
1965   u8 seid[16];
1966   u8 seid_len;
1967   u32 rloc_num;
1968   u8 rlocs[0];
1969 };
1970
1971 /** \brief Reply for lisp_add_del_remote_mapping
1972     @param context - returned sender context, to match reply w/ request
1973     @param retval - return code
1974 */
1975 define lisp_add_del_remote_mapping_reply
1976 {
1977   u32 context;
1978   i32 retval;
1979 };
1980
1981 /** \brief add or delete LISP adjacency adjacency
1982     @param client_index - opaque cookie to identify the sender
1983     @param context - sender context, to match reply w/ request
1984     @param is_add - add address if non-zero, else delete
1985     @param vni - virtual network instance
1986     @param eid_type -
1987       0 : ipv4
1988       1 : ipv6
1989       2 : mac
1990     @param reid - remote EID
1991     @param leid - local EID
1992 */
1993 define lisp_add_del_adjacency
1994 {
1995   u32 client_index;
1996   u32 context;
1997   u8 is_add;
1998   u32 vni;
1999   u8 eid_type;
2000   u8 reid[16];
2001   u8 leid[16];
2002   u8 reid_len;
2003   u8 leid_len;
2004 };
2005
2006 /** \brief Reply for lisp_add_del_adjacency
2007     @param context - returned sender context, to match reply w/ request
2008     @param retval - return code
2009 */
2010 define lisp_add_del_adjacency_reply
2011 {
2012   u32 context;
2013   i32 retval;
2014 };
2015
2016 /** \brief add or delete map request itr rlocs
2017     @param client_index - opaque cookie to identify the sender
2018     @param context - sender context, to match reply w/ request
2019     @param is_add - add address if non-zero, else delete
2020     @param locator_set_name - locator set name
2021 */
2022 define lisp_add_del_map_request_itr_rlocs
2023 {
2024   u32 client_index;
2025   u32 context;
2026   u8 is_add;
2027   u8 locator_set_name[64];
2028 };
2029
2030 /** \brief Reply for lisp_add_del_map_request_itr_rlocs
2031     @param context - returned sender context, to match reply w/ request
2032     @param retval - return code
2033 */
2034
2035 define lisp_add_del_map_request_itr_rlocs_reply
2036 {
2037   u32 context;
2038   i32 retval;
2039 };
2040
2041 /** \brief map/unmap vni/bd_index to vrf
2042     @param client_index - opaque cookie to identify the sender
2043     @param context - sender context, to match reply w/ request
2044     @param is_add - add or delete mapping
2045     @param dp_table - virtual network id/bridge domain index
2046     @param vrf - vrf
2047 */
2048 define lisp_eid_table_add_del_map
2049 {
2050   u32 client_index;
2051   u32 context;
2052   u8 is_add;
2053   u32 vni;
2054   u32 dp_table;
2055   u8 is_l2;
2056 };
2057
2058 /** \brief Reply for lisp_eid_table_add_del_map
2059     @param context - returned sender context, to match reply w/ request
2060     @param retval - return code
2061 */
2062 define lisp_eid_table_add_del_map_reply
2063 {
2064   u32 context;
2065   i32 retval;
2066 };
2067
2068 /** \brief Request for map lisp locator status
2069     @param client_index - opaque cookie to identify the sender
2070     @param context - sender context, to match reply w/ request
2071     @param locator_set_index - index of locator_set
2072     @param ls_name - locator set name
2073     @param is_index_set - flag indicating whether ls_name or ls_index is set
2074  */
2075 define lisp_locator_dump
2076 {
2077   u32 client_index;
2078   u32 context;
2079   u32 ls_index;
2080   u8 ls_name[64];
2081   u8 is_index_set;
2082 };
2083
2084 /** \brief LISP locator_set status
2085     @param local - if is set, then locator is local
2086     @param locator_set_name - name of the locator_set
2087     @param sw_if_index - sw_if_index of the locator
2088     @param priority - locator priority
2089     @param weight - locator weight
2090   */
2091 define lisp_locator_details
2092 {
2093   u32 context;
2094   u8 local;
2095   u32 sw_if_index;
2096   u8 is_ipv6;
2097   u8 ip_address[16];
2098   u8 priority;
2099   u8 weight;
2100 };
2101
2102 /** \brief LISP locator_set status
2103     @param context - sender context, to match reply w/ request
2104     @param ls_index - locator set index
2105     @param ls_name - name of the locator set
2106  */
2107 define lisp_locator_set_details
2108 {
2109   u32 context;
2110   u32 ls_index;
2111   u8 ls_name[64];
2112 };
2113
2114 /** \brief Request for locator_set summary status
2115     @param client_index - opaque cookie to identify the sender
2116     @param context - sender context, to match reply w/ request
2117     @param filter - filter type
2118       Supported values:
2119         0: all locator sets
2120         1: local locator sets
2121         2: remote locator sets
2122  */
2123 define lisp_locator_set_dump
2124 {
2125   u32 client_index;
2126   u32 context;
2127   u8 filter;
2128 };
2129
2130 /** \brief Dump lisp eid-table
2131     @param client_index - opaque cookie to identify the sender
2132     @param context - sender context, to match reply w/ request
2133     @param locator_set_index - index of locator_set, if ~0 then the mapping
2134                                 is negative
2135     @param action - negative map request action
2136     @param is_local - local if non-zero, else remote
2137     @param eid_type:
2138       0 : ipv4
2139       1 : ipv6
2140       2 : mac
2141     @param is_src_dst - EID is type of source/destination
2142     @param eid - EID can be ip4, ip6 or mac
2143     @param eid_prefix_len - prefix length
2144     @param seid - source EID can be ip4, ip6 or mac
2145     @param seid_prefix_len - source prefix length
2146     @param vni - virtual network instance
2147     @param ttl - time to live
2148     @param authoritative - authoritative
2149     @param key_id
2150       HMAC_NO_KEY           0
2151       HMAC_SHA_1_96         1
2152       HMAC_SHA_256_128      2
2153     @param key - secret key
2154 */
2155
2156 define lisp_eid_table_details
2157 {
2158   u32 context;
2159   u32 locator_set_index;
2160   u8 action;
2161   u8 is_local;
2162   u8 eid_type;
2163   u8 is_src_dst;
2164   u32 vni;
2165   u8 eid[16];
2166   u8 eid_prefix_len;
2167   u8 seid[16];
2168   u8 seid_prefix_len;
2169   u32 ttl;
2170   u8 authoritative;
2171   u16 key_id;
2172   u8 key[64];
2173 };
2174
2175 /** \brief Request for eid table summary status
2176     @param client_index - opaque cookie to identify the sender
2177     @param context - sender context, to match reply w/ request
2178     @param eid_set - if non-zero request info about specific mapping
2179     @param vni - virtual network instance; valid only if eid_set != 0
2180     @param prefix_length - prefix length if EID is IP address;
2181       valid only if eid_set != 0
2182     @param eid_type - EID type; valid only if eid_set != 0
2183       Supported values:
2184         0: EID is IPv4
2185         1: EID is IPv6
2186         2: EID is ethernet address
2187     @param eid - endpoint identifier
2188     @param filter - filter type;
2189       Support values:
2190         0: all eid
2191         1: local eid
2192         2: remote eid
2193  */
2194 define lisp_eid_table_dump
2195 {
2196   u32 client_index;
2197   u32 context;
2198   u8 eid_set;
2199   u8 prefix_length;
2200   u32 vni;
2201   u8 eid_type;
2202   u8 eid[16];
2203   u8 filter;
2204 };
2205
2206 /** \brief LISP adjacency
2207     @param eid_type -
2208       0 : ipv4
2209       1 : ipv6
2210       2 : mac
2211     @param reid - remote EID
2212     @param leid - local EID
2213     @param reid_prefix_len - remote EID IP prefix length
2214     @param leid_prefix_len - local EID IP prefix length
2215   */
2216 typeonly manual_print manual_endian define lisp_adjacency
2217 {
2218   u8 eid_type;
2219   u8 reid[16];
2220   u8 leid[16];
2221   u8 reid_prefix_len;
2222   u8 leid_prefix_len;
2223 };
2224
2225 /** \brief LISP adjacency reply
2226     @param count - number of adjacencies
2227     @param adjacencies - array of adjacencies
2228   */
2229 manual_endian manual_print define lisp_adjacencies_get_reply
2230 {
2231   u32 context;
2232   i32 retval;
2233   u32 count;
2234   vl_api_lisp_adjacency_t adjacencies[count];
2235 };
2236
2237 /** \brief Request for LISP adjacencies
2238     @param client_index - opaque cookie to identify the sender
2239     @param context - sender context, to match reply w/ request
2240     @param vni - filter adjacencies by VNI
2241  */
2242 define lisp_adjacencies_get
2243 {
2244   u32 client_index;
2245   u32 context;
2246   u32 vni;
2247 };
2248
2249 /** \brief Shows relationship between vni and vrf/bd
2250     @param dp_table - VRF index or bridge domain index
2251     @param vni - vitual network instance
2252   */
2253 define lisp_eid_table_map_details
2254 {
2255   u32 context;
2256   u32 vni;
2257   u32 dp_table;
2258 };
2259
2260 /** \brief Request for lisp_eid_table_map_details
2261     @param client_index - opaque cookie to identify the sender
2262     @param context - sender context, to match reply w/ request
2263     @param is_l2 - if set dump vni/bd mappings else vni/vrf
2264  */
2265 define lisp_eid_table_map_dump
2266 {
2267   u32 client_index;
2268   u32 context;
2269   u8 is_l2;
2270 };
2271
2272 /** \brief Dumps all VNIs used in mappings
2273     @param client_index - opaque cookie to identify the sender
2274     @param context - sender context, to match reply w/ request
2275   */
2276 define lisp_eid_table_vni_dump
2277 {
2278   u32 client_index;
2279   u32 context;
2280 };
2281
2282 /** \brief reply to lisp_eid_table_vni_dump
2283     @param client_index - opaque cookie to identify the sender
2284     @param context - sender context, to match reply w/ request
2285     @param vni - virtual network instance
2286  */
2287 define lisp_eid_table_vni_details
2288 {
2289   u32 client_index;
2290   u32 context;
2291   u32 vni;
2292 };
2293
2294 define lisp_gpe_tunnel_details
2295 {
2296   u32 context;
2297   u32 tunnels;
2298   u8 is_ipv6;
2299   u8 source_ip[16];
2300   u8 destination_ip[16];
2301   u32 encap_fib_id;
2302   u32 decap_fib_id;
2303   u32 dcap_next;
2304   u8 lisp_ver;
2305   u8 next_protocol;
2306   u8 flags;
2307   u8 ver_res;
2308   u8 res;
2309   u32 iid;
2310 };
2311
2312 /** \brief Request for gpe tunnel summary status
2313     @param client_index - opaque cookie to identify the sender
2314     @param context - sender context, to match reply w/ request
2315  */
2316 define lisp_gpe_tunnel_dump
2317 {
2318   u32 client_index;
2319   u32 context;
2320 };
2321
2322 /** \brief LISP map resolver status
2323     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2324     @param ip_address - array of address bytes
2325  */
2326 define lisp_map_resolver_details
2327 {
2328   u32 context;
2329   u8 is_ipv6;
2330   u8 ip_address[16];
2331 };
2332
2333 /** \brief Request for map resolver summary status
2334     @param client_index - opaque cookie to identify the sender
2335     @param context - sender context, to match reply w/ request
2336  */
2337 define lisp_map_resolver_dump
2338 {
2339   u32 client_index;
2340   u32 context;
2341 };
2342
2343 /** \brief LISP map server details
2344     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2345     @param ip_address - array of address bytes
2346  */
2347 define lisp_map_server_details
2348 {
2349   u32 context;
2350   u8 is_ipv6;
2351   u8 ip_address[16];
2352 };
2353
2354 /** \brief Request for map server summary status
2355     @param client_index - opaque cookie to identify the sender
2356     @param context - sender context, to match reply w/ request
2357  */
2358 define lisp_map_server_dump
2359 {
2360   u32 client_index;
2361   u32 context;
2362 };
2363
2364 /** \brief Request for lisp-gpe protocol status
2365     @param client_index - opaque cookie to identify the sender
2366     @param context - sender context, to match reply w/ request
2367 */
2368 define show_lisp_status
2369 {
2370   u32 client_index;
2371   u32 context;
2372 };
2373
2374 /** \brief Status of lisp, enable or disable
2375     @param context - sender context, to match reply w/ request
2376     @param feature_status - lisp enable if non-zero, else disable
2377     @param gpe_status - lisp enable if non-zero, else disable
2378 */
2379 define show_lisp_status_reply
2380 {
2381   u32 context;
2382   i32 retval;
2383   u8 feature_status;
2384   u8 gpe_status;
2385 };
2386
2387 /** \brief Get LISP map request itr rlocs status
2388     @param context - sender context, to match reply w/ request
2389     @param locator_set_name - name of the locator_set
2390  */
2391 define lisp_get_map_request_itr_rlocs
2392 {
2393   u32 client_index;
2394   u32 context;
2395 };
2396
2397 /** \brief Request for map request itr rlocs summary status
2398  */
2399 define lisp_get_map_request_itr_rlocs_reply
2400 {
2401   u32 context;
2402   i32 retval;
2403   u8 locator_set_name[64];
2404 };
2405
2406 /** \brief Request for lisp pitr status
2407     @param client_index - opaque cookie to identify the sender
2408     @param context - sender context, to match reply w/ request
2409 */
2410 define show_lisp_pitr
2411 {
2412   u32 client_index;
2413   u32 context;
2414 };
2415
2416 /** \brief Status of lisp pitr, enable or disable
2417     @param context - sender context, to match reply w/ request
2418     @param status - lisp pitr enable if non-zero, else disable
2419     @param locator_set_name -  name of the locator_set
2420 */
2421 define show_lisp_pitr_reply
2422 {
2423   u32 context;
2424   i32 retval;
2425   u8 status;
2426   u8 locator_set_name[64];
2427 };
2428
2429 /* Gross kludge, DGMS */
2430 define interface_name_renumber
2431 {
2432   u32 client_index;
2433   u32 context;
2434   u32 sw_if_index;
2435   u32 new_show_dev_instance;
2436 };
2437
2438 define interface_name_renumber_reply
2439 {
2440   u32 context;
2441   i32 retval;
2442 };
2443
2444 /** \brief Register for ip4 arp resolution events
2445     @param client_index - opaque cookie to identify the sender
2446     @param context - sender context, to match reply w/ request
2447     @param enable_disable - 1 => register for events, 0 => cancel registration
2448     @param pid - sender's pid
2449     @param address - the exact ip4 address of interest
2450 */
2451 define want_ip4_arp_events
2452 {
2453   u32 client_index;
2454   u32 context;
2455   u8 enable_disable;
2456   u32 pid;
2457   u32 address;
2458 };
2459
2460 /** \brief Reply for interface events registration
2461     @param context - returned sender context, to match reply w/ request
2462     @param retval - return code
2463 */
2464 define want_ip4_arp_events_reply
2465 {
2466   u32 context;
2467   i32 retval;
2468 };
2469
2470 /** \brief Tell client about an ip4 arp resolution event
2471     @param client_index - opaque cookie to identify the sender
2472     @param context - sender context, to match reply w/ request
2473     @param address - the exact ip4 address of interest
2474     @param pid - client pid registered to receive notification
2475     @param sw_if_index - interface which received ARP packet
2476     @param new_mac - the new mac address 
2477     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
2478 */
2479 define ip4_arp_event
2480 {
2481   u32 client_index;
2482   u32 context;
2483   u32 address;
2484   u32 pid;
2485   u32 sw_if_index;
2486   u8 new_mac[6];
2487   u8 mac_ip;
2488 };
2489
2490 /** \brief Register for ip6 nd resolution events
2491     @param client_index - opaque cookie to identify the sender
2492     @param context - sender context, to match reply w/ request
2493     @param enable_disable - 1 => register for events, 0 => cancel registration
2494     @param pid - sender's pid
2495     @param address - the exact ip6 address of interest
2496 */
2497 define want_ip6_nd_events
2498 {
2499   u32 client_index;
2500   u32 context;
2501   u8 enable_disable;
2502   u32 pid;
2503   u8 address[16];
2504 };
2505
2506 /** \brief Reply for ip6 nd resolution events registration
2507     @param context - returned sender context, to match reply w/ request
2508     @param retval - return code
2509 */
2510 define want_ip6_nd_events_reply
2511 {
2512   u32 context;
2513   i32 retval;
2514 };
2515
2516 /** \brief Tell client about an ip6 nd resolution or mac/ip event
2517     @param client_index - opaque cookie to identify the sender
2518     @param context - sender context, to match reply w/ request
2519     @param pid - client pid registered to receive notification
2520     @param sw_if_index - interface which received ARP packet
2521     @param address - the exact ip6 address of interest
2522     @param new_mac - the new mac address 
2523     @param mac_ip - 0: resolution event, 1: mac/ip binding in bd
2524 */
2525 define ip6_nd_event
2526 {
2527   u32 client_index;
2528   u32 context;
2529   u32 pid;
2530   u32 sw_if_index;
2531   u8 address[16];
2532   u8 new_mac[6];
2533   u8 mac_ip;
2534 };
2535     
2536 /** \brief L2 bridge domain add or delete request
2537     @param client_index - opaque cookie to identify the sender
2538     @param context - sender context, to match reply w/ request
2539     @param bd_id - the bridge domain to create
2540     @param flood - enable/disable bcast/mcast flooding in the bd
2541     @param uu_flood - enable/disable uknown unicast flood in the bd
2542     @param forward - enable/disable forwarding on all interfaces in the bd
2543     @param learn - enable/disable learning on all interfaces in the bd
2544     @param arp_term - enable/disable arp termination in the bd
2545     @param mac_age - mac aging time in min, 0 for disabled
2546     @param is_add - add or delete flag
2547 */
2548 define bridge_domain_add_del
2549 {
2550   u32 client_index;
2551   u32 context;
2552   u32 bd_id;
2553   u8 flood;
2554   u8 uu_flood;
2555   u8 forward;
2556   u8 learn;
2557   u8 arp_term;
2558   u8 mac_age;
2559   u8 is_add;
2560 };
2561
2562 /** \brief L2 bridge domain add or delete response
2563     @param context - sender context, to match reply w/ request
2564     @param retval - return code for the set bridge flags request
2565 */
2566 define bridge_domain_add_del_reply
2567 {
2568   u32 context;
2569   i32 retval;
2570 };
2571
2572 /** \brief L2 bridge domain request operational state details
2573     @param client_index - opaque cookie to identify the sender
2574     @param context - sender context, to match reply w/ request
2575     @param bd_id - the bridge domain id desired or ~0 to request all bds
2576 */
2577 define bridge_domain_dump
2578 {
2579   u32 client_index;
2580   u32 context;
2581   u32 bd_id;
2582 };
2583
2584 /** \brief L2 bridge domain operational state response
2585     @param bd_id - the bridge domain id
2586     @param flood - bcast/mcast flooding state on all interfaces in the bd
2587     @param uu_flood - uknown unicast flooding state on all interfaces in the bd
2588     @param forward - forwarding state on all interfaces in the bd
2589     @param learn - learning state on all interfaces in the bd
2590     @param arp_term - arp termination state on all interfaces in the bd
2591     @param mac_age - mac aging time in min, 0 for disabled
2592     @param n_sw_ifs - number of sw_if_index's in the domain
2593 */
2594 define bridge_domain_details
2595 {
2596   u32 context;
2597   u32 bd_id;
2598   u8 flood;
2599   u8 uu_flood;
2600   u8 forward;
2601   u8 learn;
2602   u8 arp_term;
2603   u8 mac_age;
2604   u32 bvi_sw_if_index;
2605   u32 n_sw_ifs;
2606 };
2607
2608 /** \brief L2 bridge domain sw interface operational state response
2609     @param bd_id - the bridge domain id
2610     @param sw_if_index - sw_if_index in the domain
2611     @param shg - split horizon group for the interface
2612 */
2613 define bridge_domain_sw_if_details
2614 {
2615   u32 context;
2616   u32 bd_id;
2617   u32 sw_if_index;
2618   u8 shg;
2619 };
2620
2621 /** \brief DHCP Client config add / del request
2622     @param client_index - opaque cookie to identify the sender
2623     @param context - sender context, to match reply w/ request
2624     @param sw_if_index - index of the interface for DHCP client
2625     @param hostname - hostname
2626     @param is_add - add the config if non-zero, else delete
2627     @param want_dhcp_event - DHCP event sent to the sender
2628            via dhcp_compl_event API message if non-zero
2629     @param pid - sender's pid
2630 */
2631 define dhcp_client_config
2632 {
2633   u32 client_index;
2634   u32 context;
2635   u32 sw_if_index;
2636   u8 hostname[64];
2637   u8 is_add;
2638   u8 want_dhcp_event;
2639   u32 pid;
2640 };
2641
2642 /** \brief DHCP Client config response
2643     @param context - sender context, to match reply w/ request
2644     @param retval - return code for the request
2645 */
2646 define dhcp_client_config_reply
2647 {
2648   u32 context;
2649   i32 retval;
2650 };
2651
2652 /** \brief Set/unset input ACL interface
2653     @param client_index - opaque cookie to identify the sender
2654     @param context - sender context, to match reply w/ request
2655     @param sw_if_index - interface to set/unset input ACL
2656     @param ip4_table_index - ip4 classify table index (~0 for skip)
2657     @param ip6_table_index - ip6 classify table index (~0 for skip)
2658     @param l2_table_index  -  l2 classify table index (~0 for skip)
2659     @param is_add - Set input ACL if non-zero, else unset
2660     Note: User is recommeneded to use just one valid table_index per call.
2661           (ip4_table_index, ip6_table_index, or l2_table_index)
2662 */
2663 define input_acl_set_interface
2664 {
2665   u32 client_index;
2666   u32 context;
2667   u32 sw_if_index;
2668   u32 ip4_table_index;
2669   u32 ip6_table_index;
2670   u32 l2_table_index;
2671   u8 is_add;
2672 };
2673
2674 /** \brief Set/unset input ACL interface response
2675     @param context - sender context, to match reply w/ request
2676     @param retval - return code for the request
2677 */
2678 define input_acl_set_interface_reply
2679 {
2680   u32 context;
2681   i32 retval;
2682 };
2683
2684 /** \brief Tell client about a DHCP completion event
2685     @param client_index - opaque cookie to identify the sender
2686     @param pid - client pid registered to receive notification
2687     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
2688     @param host_address - Host IP address
2689     @param router_address - Router IP address
2690     @param host_mac - Host MAC address
2691 */
2692 define dhcp_compl_event
2693 {
2694   u32 client_index;
2695   u32 pid;
2696   u8 hostname[64];
2697   u8 is_ipv6;
2698   u8 host_address[16];
2699   u8 router_address[16];
2700   u8 host_mac[6];
2701 };
2702
2703 /** \brief cop: enable/disable junk filtration features on an interface
2704     @param client_index - opaque cookie to identify the sender
2705     @param context - sender context, to match reply w/ request
2706     @param sw_if_inded - desired interface
2707     @param enable_disable - 1 => enable, 0 => disable
2708 */
2709
2710 define cop_interface_enable_disable
2711 {
2712   u32 client_index;
2713   u32 context;
2714   u32 sw_if_index;
2715   u8 enable_disable;
2716 };
2717
2718 /** \brief cop: interface enable/disable junk filtration reply
2719     @param context - returned sender context, to match reply w/ request
2720     @param retval - return code
2721 */
2722
2723 define cop_interface_enable_disable_reply
2724 {
2725   u32 context;
2726   i32 retval;
2727 };
2728
2729 /** \brief cop: enable/disable whitelist filtration features on an interface
2730     Note: the supplied fib_id must match in order to remove the feature!
2731     
2732     @param client_index - opaque cookie to identify the sender
2733     @param context - sender context, to match reply w/ request
2734     @param sw_if_index - interface handle, physical interfaces only
2735     @param fib_id - fib identifier for the whitelist / blacklist fib
2736     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
2737     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
2738     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
2739 */
2740
2741 define cop_whitelist_enable_disable
2742 {
2743   u32 client_index;
2744   u32 context;
2745   u32 sw_if_index;
2746   u32 fib_id;
2747   u8 ip4;
2748   u8 ip6;
2749   u8 default_cop;
2750 };
2751
2752 /** \brief cop: interface enable/disable junk filtration reply
2753     @param context - returned sender context, to match reply w/ request
2754     @param retval - return code
2755 */
2756
2757 define cop_whitelist_enable_disable_reply
2758 {
2759   u32 context;
2760   i32 retval;
2761 };
2762
2763 /** \brief get_node_graph - get a copy of the vpp node graph
2764     including the current set of graph arcs.
2765
2766     @param client_index - opaque cookie to identify the sender
2767     @param context - sender context, to match reply w/ request
2768 */
2769
2770 define get_node_graph
2771 {
2772   u32 client_index;
2773   u32 context;
2774 };
2775
2776 /** \brief get_node_graph_reply
2777     @param context - returned sender context, to match reply w/ request
2778     @param retval - return code
2779     @param reply_in_shmem - result from vlib_node_serialize, in shared
2780     memory. Process with vlib_node_unserialize, remember to switch
2781     heaps and free the result.
2782 */
2783
2784 define get_node_graph_reply
2785 {
2786   u32 context;
2787   i32 retval;
2788   u64 reply_in_shmem;
2789 };
2790
2791 /** \brief IOAM enable : Enable in-band OAM
2792     @param id - profile id
2793     @param seqno - To enable Seqno Processing
2794     @param analyse - Enabling analysis of iOAM at decap node 
2795     @param pow_enable - Proof of Work enabled or not flag
2796     @param trace_enable - iOAM Trace enabled or not flag
2797 */
2798 define ioam_enable
2799 {
2800   u32 client_index;
2801   u32 context;
2802   u16 id;
2803   u8 seqno;
2804   u8 analyse;
2805   u8 pot_enable;
2806   u8 trace_enable;
2807   u32 node_id;
2808 };
2809
2810 /** \brief iOAM Trace profile add / del response
2811     @param context - sender context, to match reply w/ request
2812     @param retval - return value for request
2813 */
2814 define ioam_enable_reply
2815 {
2816   u32 context;
2817   i32 retval;
2818 };
2819
2820 /** \brief iOAM disable
2821     @param client_index - opaque cookie to identify the sender
2822     @param context - sender context, to match reply w/ request
2823     @param index - MAP Domain index
2824 */
2825 define ioam_disable
2826 {
2827   u32 client_index;
2828   u32 context;
2829   u16 id;
2830 };
2831
2832 /** \brief iOAM disable response
2833     @param context - sender context, to match reply w/ request
2834     @param retval - return value for request
2835 */
2836 define ioam_disable_reply
2837 {
2838   u32 context;
2839   i32 retval;
2840 };
2841
2842 /** \brief Add/del policer
2843     @param client_index - opaque cookie to identify the sender
2844     @param context - sender context, to match reply w/ request
2845     @param is_add - add policer if non-zero, else delete
2846     @param name - policer name
2847     @param cir - CIR
2848     @param eir - EIR
2849     @param cb - Committed Burst
2850     @param eb - Excess or Peak Burst
2851     @param rate_type - rate type
2852     @param round_type - rounding type
2853     @param type - policer algorithm
2854     @param color_aware - 0=color-blind, 1=color-aware
2855     @param conform_action_type - conform action type
2856     @param conform_dscp - DSCP for conform mar-and-transmit action
2857     @param exceed_action_type - exceed action type
2858     @param exceed_dscp - DSCP for exceed mar-and-transmit action
2859     @param violate_action_type - violate action type
2860     @param violate_dscp - DSCP for violate mar-and-transmit action
2861 */
2862 define policer_add_del
2863 {
2864   u32 client_index;
2865   u32 context;
2866
2867   u8 is_add;
2868   u8 name[64];
2869   u32 cir;
2870   u32 eir;
2871   u64 cb;
2872   u64 eb;
2873   u8 rate_type;
2874   u8 round_type;
2875   u8 type;
2876   u8 color_aware;
2877   u8 conform_action_type;
2878   u8 conform_dscp;
2879   u8 exceed_action_type;
2880   u8 exceed_dscp;
2881   u8 violate_action_type;
2882   u8 violate_dscp;
2883 };
2884
2885 /** \brief Add/del policer response
2886     @param context - sender context, to match reply w/ request
2887     @param retval - return value for request
2888     @param policer_index - for add, returned index of the new policer
2889 */
2890 define policer_add_del_reply
2891 {
2892   u32 context;
2893   i32 retval;
2894   u32 policer_index;
2895 };
2896
2897 /** \brief Get list of policers
2898     @param client_index - opaque cookie to identify the sender
2899     @param context - sender context, to match reply w/ request
2900     @param match_name_valid - if 0 request all policers otherwise use match_name
2901     @param match_name - policer name
2902 */
2903 define policer_dump
2904 {
2905   u32 client_index;
2906   u32 context;
2907
2908   u8 match_name_valid;
2909   u8 match_name[64];
2910 };
2911
2912 /** \brief Policer operational state response.
2913     @param context - sender context, to match reply w/ request
2914     @param name - policer name
2915     @param cir - CIR
2916     @param eir - EIR
2917     @param cb - Committed Burst
2918     @param eb - Excess or Peak Burst
2919     @param rate_type - rate type
2920     @param round_type - rounding type
2921     @param type - policer algorithm
2922     @param conform_action_type - conform action type
2923     @param conform_dscp - DSCP for conform mar-and-transmit action
2924     @param exceed_action_type - exceed action type
2925     @param exceed_dscp - DSCP for exceed mar-and-transmit action
2926     @param violate_action_type - violate action type
2927     @param violate_dscp - DSCP for violate mar-and-transmit action
2928     @param single_rate - 1 = single rate policer, 0 = two rate policer
2929     @param color_aware - for hierarchical policing
2930     @param scale - power-of-2 shift amount for lower rates
2931     @param cir_tokens_per_period - number of tokens for each period
2932     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
2933     @param current_limit - current limit
2934     @param current_bucket - current bucket
2935     @param extended_limit - extended limit
2936     @param extended_bucket - extended bucket
2937     @param last_update_time - last update time
2938 */
2939 define policer_details
2940 {
2941   u32 context;
2942
2943   u8 name[64];
2944   u32 cir;
2945   u32 eir;
2946   u64 cb;
2947   u64 eb;
2948   u8 rate_type;
2949   u8 round_type;
2950   u8 type;
2951   u8 conform_action_type;
2952   u8 conform_dscp;
2953   u8 exceed_action_type;
2954   u8 exceed_dscp;
2955   u8 violate_action_type;
2956   u8 violate_dscp;
2957   u8 single_rate;
2958   u8 color_aware;
2959   u32 scale;
2960   u32 cir_tokens_per_period;
2961   u32 pir_tokens_per_period;
2962   u32 current_limit;
2963   u32 current_bucket;
2964   u32 extended_limit;
2965   u32 extended_bucket;
2966   u64 last_update_time;
2967 };
2968
2969 /** \brief Set/unset policer classify interface
2970     @param client_index - opaque cookie to identify the sender
2971     @param context - sender context, to match reply w/ request
2972     @param sw_if_index - interface to set/unset policer classify
2973     @param ip4_table_index - ip4 classify table index (~0 for skip)
2974     @param ip6_table_index - ip6 classify table index (~0 for skip)
2975     @param l2_table_index  -  l2 classify table index (~0 for skip)
2976     @param is_add - Set if non-zero, else unset
2977     Note: User is recommeneded to use just one valid table_index per call.
2978           (ip4_table_index, ip6_table_index, or l2_table_index)
2979 */
2980 define policer_classify_set_interface
2981 {
2982   u32 client_index;
2983   u32 context;
2984   u32 sw_if_index;
2985   u32 ip4_table_index;
2986   u32 ip6_table_index;
2987   u32 l2_table_index;
2988   u8 is_add;
2989 };
2990
2991 /** \brief Set/unset policer classify interface response
2992     @param context - sender context, to match reply w/ request
2993     @param retval - return value for request
2994 */
2995 define policer_classify_set_interface_reply
2996 {
2997   u32 context;
2998   i32 retval;
2999 };
3000
3001 /** \brief Get list of policer classify interfaces and tables
3002     @param client_index - opaque cookie to identify the sender
3003     @param context - sender context, to match reply w/ request
3004     @param type - classify table type
3005 */
3006 define policer_classify_dump
3007 {
3008   u32 client_index;
3009   u32 context;
3010   u8 type;
3011 };
3012
3013 /** \brief Policer iclassify operational state response.
3014     @param context - sender context, to match reply w/ request
3015     @param sw_if_index - software interface index
3016     @param table_index - classify table index
3017 */
3018 define policer_classify_details
3019 {
3020   u32 context;
3021   u32 sw_if_index;
3022   u32 table_index;
3023 };
3024
3025 /** \brief Classify get table IDs request
3026     @param client_index - opaque cookie to identify the sender
3027     @param context - sender context, to match reply w/ request
3028 */
3029 define classify_table_ids
3030 {
3031   u32 client_index;
3032   u32 context;
3033 };
3034
3035 /** \brief Reply for classify get table IDs request
3036     @param context - sender context which was passed in the request
3037     @param count - number of ids returned in response
3038     @param ids - array of classify table ids
3039 */
3040 define classify_table_ids_reply
3041 {
3042   u32 context;
3043   i32 retval;
3044   u32 count;
3045   u32 ids[count];
3046 };
3047
3048 /** \brief Classify table ids by interface index request
3049     @param client_index - opaque cookie to identify the sender
3050     @param context - sender context, to match reply w/ request
3051     @param sw_if_index - index of the interface
3052 */
3053 define classify_table_by_interface
3054 {
3055   u32 client_index;
3056   u32 context;
3057   u32 sw_if_index;
3058 };
3059
3060 /** \brief Reply for classify table id by interface index request
3061     @param context - sender context which was passed in the request
3062     @param count - number of ids returned in response
3063     @param sw_if_index - index of the interface
3064     @param l2_table_id - l2 classify table index
3065     @param ip4_table_id - ip4 classify table index
3066     @param ip6_table_id - ip6 classify table index
3067 */
3068 define classify_table_by_interface_reply
3069 {
3070   u32 context;
3071   i32 retval;
3072   u32 sw_if_index;
3073   u32 l2_table_id;
3074   u32 ip4_table_id;
3075   u32 ip6_table_id;
3076 };
3077
3078 /** \brief Classify table info
3079     @param client_index - opaque cookie to identify the sender
3080     @param context - sender context, to match reply w/ request
3081     @param table_id - classify table index
3082 */
3083 define classify_table_info
3084 {
3085   u32 client_index;
3086   u32 context;
3087   u32 table_id;
3088 };
3089
3090 /** \brief Reply for classify table info request
3091     @param context - sender context which was passed in the request
3092     @param count - number of ids returned in response
3093     @param table_id - classify table index
3094     @param nbuckets - number of buckets when adding a table
3095     @param match_n_vectors - number of match vectors
3096     @param skip_n_vectors - number of skip_n_vectors
3097     @param active_sessions - number of sessions (active entries)
3098     @param next_table_index - index of next table
3099     @param miss_next_index - index of miss table
3100     @param mask[] - match mask
3101 */
3102 define classify_table_info_reply
3103 {
3104   u32 context;
3105   i32 retval;
3106   u32 table_id;
3107   u32 nbuckets;
3108   u32 match_n_vectors;
3109   u32 skip_n_vectors;
3110   u32 active_sessions;
3111   u32 next_table_index;
3112   u32 miss_next_index;
3113   u32 mask_length;
3114   u8 mask[mask_length];
3115 };
3116
3117 /** \brief Classify sessions dump request
3118     @param client_index - opaque cookie to identify the sender
3119     @param context - sender context, to match reply w/ request
3120     @param table_id - classify table index
3121 */
3122 define classify_session_dump
3123 {
3124   u32 client_index;
3125   u32 context;
3126   u32 table_id;
3127 };
3128
3129 /** \brief Reply for classify table session dump request
3130     @param context - sender context which was passed in the request
3131     @param count - number of ids returned in response
3132     @param table_id - classify table index
3133     @param hit_next_index - hit_next_index of session
3134     @param opaque_index - for add, opaque_index of session
3135     @param advance - advance value of session
3136     @param match[] - match value for session
3137 */
3138 define classify_session_details
3139 {
3140   u32 context;
3141   i32 retval;
3142   u32 table_id;
3143   u32 hit_next_index;
3144   i32 advance;
3145   u32 opaque_index;
3146   u32 match_length;
3147   u8 match[match_length];
3148 };
3149
3150 /** \brief Configure IPFIX exporter process request
3151     @param client_index - opaque cookie to identify the sender
3152     @param context - sender context, to match reply w/ request
3153     @param collector_address - address of IPFIX collector
3154     @param collector_port - port of IPFIX collector
3155     @param src_address - address of IPFIX exporter
3156     @param vrf_id - VRF / fib table ID
3157     @param path_mtu - Path MTU between exporter and collector
3158     @param template_interval - number of seconds after which to resend template
3159     @param udp_checksum - UDP checksum calculation enable flag
3160 */
3161 define set_ipfix_exporter
3162 {
3163   u32 client_index;
3164   u32 context;
3165   u8 collector_address[16];
3166   u16 collector_port;
3167   u8 src_address[16];
3168   u32 vrf_id;
3169   u32 path_mtu;
3170   u32 template_interval;
3171   u8 udp_checksum;
3172 };
3173
3174 /** \brief Reply to IPFIX exporter configure request
3175     @param context - sender context which was passed in the request
3176 */
3177 define set_ipfix_exporter_reply
3178 {
3179   u32 context;
3180   i32 retval;
3181 };
3182
3183 /** \brief IPFIX exporter dump request
3184     @param client_index - opaque cookie to identify the sender
3185     @param context - sender context, to match reply w/ request
3186 */
3187 define ipfix_exporter_dump
3188 {
3189   u32 client_index;
3190   u32 context;
3191 };
3192
3193 /** \brief Reply to IPFIX exporter dump request
3194     @param context - sender context which was passed in the request
3195     @param collector_address - address of IPFIX collector
3196     @param collector_port - port of IPFIX collector
3197     @param src_address - address of IPFIX exporter
3198     @param fib_index - fib table index
3199     @param path_mtu - Path MTU between exporter and collector
3200     @param template_interval - number of seconds after which to resend template
3201     @param udp_checksum - UDP checksum calculation enable flag
3202 */
3203 define ipfix_exporter_details
3204 {
3205   u32 context;
3206   u8 collector_address[16];
3207   u16 collector_port;
3208   u8 src_address[16];
3209   u32 vrf_id;
3210   u32 path_mtu;
3211   u32 template_interval;
3212   u8 udp_checksum;
3213 };
3214
3215 /** \brief IPFIX classify stream configure request
3216     @param client_index - opaque cookie to identify the sender
3217     @param context - sender context, to match reply w/ request
3218     @param domain_id - domain ID reported in IPFIX messages for classify stream
3219     @param src_port - source port of UDP session for classify stream
3220 */
3221 define set_ipfix_classify_stream {
3222     u32 client_index;
3223     u32 context;
3224     u32 domain_id;
3225     u16 src_port;
3226 };
3227
3228 /** \brief IPFIX classify stream configure response
3229     @param context - sender context, to match reply w/ request
3230     @param retval - return value for request
3231 */
3232 define set_ipfix_classify_stream_reply {
3233     u32 context;
3234     i32 retval;
3235 };
3236
3237 /** \brief IPFIX classify stream dump request
3238     @param client_index - opaque cookie to identify the sender
3239     @param context - sender context, to match reply w/ request
3240 */
3241 define ipfix_classify_stream_dump {
3242     u32 client_index;
3243     u32 context;
3244 };
3245
3246 /** \brief Reply to IPFIX classify stream dump request
3247     @param context - sender context, to match reply w/ request
3248     @param domain_id - domain ID reported in IPFIX messages for classify stream
3249     @param src_port - source port of UDP session for classify stream
3250 */
3251 define ipfix_classify_stream_details {
3252     u32 context;
3253     u32 domain_id;
3254     u16 src_port;
3255 };
3256
3257 /** \brief IPFIX add or delete classifier table request
3258     @param client_index - opaque cookie to identify the sender
3259     @param context - sender context, to match reply w/ request
3260     @param table_id - classifier table ID
3261     @param ip_version - version of IP used in the classifier table
3262     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
3263 */
3264 define ipfix_classify_table_add_del {
3265     u32 client_index;
3266     u32 context;
3267     u32 table_id;
3268     u8 ip_version;
3269     u8 transport_protocol;
3270     u8 is_add;
3271 };
3272
3273 /** \brief IPFIX add classifier table response
3274     @param context - sender context which was passed in the request
3275 */
3276 define ipfix_classify_table_add_del_reply {
3277     u32 context;
3278     i32 retval;
3279 };
3280
3281 /** \brief IPFIX classify tables dump request
3282     @param client_index - opaque cookie to identify the sender
3283     @param context - sender context, to match reply w/ request
3284 */
3285 define ipfix_classify_table_dump {
3286     u32 client_index;
3287     u32 context;
3288 };
3289
3290 /** \brief Reply to IPFIX classify tables dump request
3291     @param context - sender context, to match reply w/ request
3292     @param table_id - classifier table ID
3293     @param ip_version - version of IP used in the classifier table
3294     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
3295 */
3296 define ipfix_classify_table_details {
3297     u32 context;
3298     u32 table_id;
3299     u8 ip_version;
3300     u8 transport_protocol;
3301 };
3302
3303 /** \brief Set/unset flow classify interface
3304     @param client_index - opaque cookie to identify the sender
3305     @param context - sender context, to match reply w/ request
3306     @param sw_if_index - interface to set/unset flow classify
3307     @param ip4_table_index - ip4 classify table index (~0 for skip)
3308     @param ip6_table_index - ip6 classify table index (~0 for skip)
3309     @param l2_table_index  -  l2 classify table index (~0 for skip)
3310     @param is_add - Set if non-zero, else unset
3311     Note: User is recommeneded to use just one valid table_index per call.
3312           (ip4_table_index, ip6_table_index, or l2_table_index)
3313 */
3314 define flow_classify_set_interface {
3315     u32 client_index;
3316     u32 context;
3317     u32 sw_if_index;
3318     u32 ip4_table_index;
3319     u32 ip6_table_index;
3320     u8  is_add;
3321 };
3322
3323 /** \brief Set/unset flow classify interface response
3324     @param context - sender context, to match reply w/ request
3325     @param retval - return value for request
3326 */
3327 define flow_classify_set_interface_reply {
3328     u32 context;
3329     i32 retval;
3330 };
3331
3332 /** \brief Get list of flow classify interfaces and tables
3333     @param client_index - opaque cookie to identify the sender
3334     @param context - sender context, to match reply w/ request
3335     @param type - classify table type
3336 */
3337 define flow_classify_dump {
3338     u32 client_index;
3339     u32 context;
3340     u8 type;
3341 };
3342
3343 /** \brief Flow classify operational state response.
3344     @param context - sender context, to match reply w/ request
3345     @param sw_if_index - software interface index
3346     @param table_index - classify table index
3347 */
3348 define flow_classify_details {
3349     u32 context;
3350     u32 sw_if_index;
3351     u32 table_index;
3352 };
3353
3354 /** \brief Query relative index via node names
3355     @param client_index - opaque cookie to identify the sender
3356     @param context - sender context, to match reply w/ request
3357     @param node_name - name of node to find relative index from
3358     @param next_name - next node from node_name to find relative index of
3359 */
3360 define get_next_index
3361 {
3362   u32 client_index;
3363   u32 context;
3364   u8 node_name[64];
3365   u8 next_name[64];
3366 };
3367
3368 /** \brief Reply for get next node index
3369     @param context - sender context which was passed in the request
3370     @param retval - return value
3371     @param next_index - index of the next_node
3372 */
3373 define get_next_index_reply
3374 {
3375   u32 context;
3376   i32 retval;
3377   u32 next_index;
3378 };
3379
3380 /** \brief PacketGenerator create interface request
3381     @param client_index - opaque cookie to identify the sender
3382     @param context - sender context, to match reply w/ request
3383     @param interface_id - interface index
3384 */
3385 define pg_create_interface
3386 {
3387   u32 client_index;
3388   u32 context;
3389   u32 interface_id;
3390 };
3391
3392 /** \brief PacketGenerator create interface response
3393     @param context - sender context, to match reply w/ request
3394     @param retval - return value for request
3395 */
3396 define pg_create_interface_reply
3397 {
3398   u32 context;
3399   i32 retval;
3400   u32 sw_if_index;
3401 };
3402
3403 /** \brief PacketGenerator capture packets on given interface request
3404     @param client_index - opaque cookie to identify the sender
3405     @param context - sender context, to match reply w/ request
3406     @param interface_id - pg interface index
3407     @param is_enabled - 1 if enabling streams, 0 if disabling
3408     @param count - number of packets to be captured
3409     @param pcap_file - pacp file name to store captured packets
3410 */
3411 define pg_capture
3412 {
3413   u32 client_index;
3414   u32 context;
3415   u32 interface_id;
3416   u8 is_enabled;
3417   u32 count;
3418   u32 pcap_name_length;
3419   u8 pcap_file_name[pcap_name_length];
3420 };
3421
3422 /** \brief PacketGenerator capture packets response
3423     @param context - sender context, to match reply w/ request
3424     @param retval - return value for request
3425 */
3426 define pg_capture_reply
3427 {
3428   u32 context;
3429   i32 retval;
3430 };
3431
3432 /** \brief Enable / disable packet generator request
3433     @param client_index - opaque cookie to identify the sender
3434     @param context - sender context, to match reply w/ request
3435     @param is_enabled - 1 if enabling streams, 0 if disabling
3436     @param stream - stream name to be enable/disabled, if not specified handle all streams
3437 */
3438 define pg_enable_disable
3439 {
3440   u32 client_index;
3441   u32 context;
3442   u8 is_enabled;
3443   u32 stream_name_length;
3444   u8 stream_name[stream_name_length];
3445 };
3446
3447 /** \brief Reply for enable / disable packet generator
3448     @param context - returned sender context, to match reply w/ request
3449     @param retval - return code
3450 */
3451 define pg_enable_disable_reply
3452 {
3453   u32 context;
3454   i32 retval;
3455 };
3456
3457 /** \brief Configure IP source and L4 port-range check
3458     @param client_index - opaque cookie to identify the sender
3459     @param context - sender context, to match reply w/ request
3460     @param is_ip6 - 1 if source address type is IPv6
3461     @param is_add - 1 if add, 0 if delete
3462     @param mask_length - mask length for address entry
3463     @param address - array of address bytes
3464     @param number_of_ranges - length of low_port and high_port arrays (must match)
3465     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
3466     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
3467     @param vrf_id - fib table/vrf id to associate the source and port-range check with
3468     @note To specify a single port set low_port and high_port entry the same
3469 */
3470 define ip_source_and_port_range_check_add_del
3471 {
3472   u32 client_index;
3473   u32 context;
3474   u8 is_ipv6;
3475   u8 is_add;
3476   u8 mask_length;
3477   u8 address[16];
3478   u8 number_of_ranges;
3479   u16 low_ports[32];
3480   u16 high_ports[32];
3481   u32 vrf_id;
3482 };
3483
3484 /** \brief Configure IP source and L4 port-range check reply
3485     @param context - returned sender context, to match reply w/ request
3486     @param retval - return code
3487 */
3488 define ip_source_and_port_range_check_add_del_reply
3489 {
3490   u32 context;
3491   i32 retval;
3492 };
3493
3494 /** \brief Set interface source and L4 port-range request
3495     @param client_index - opaque cookie to identify the sender
3496     @param context - sender context, to match reply w/ request
3497     @param interface_id - interface index
3498     @param tcp_vrf_id - VRF associated with source and TCP port-range check
3499     @param udp_vrf_id - VRF associated with source and TCP port-range check
3500 */
3501 define ip_source_and_port_range_check_interface_add_del
3502 {
3503   u32 client_index;
3504   u32 context;
3505   u8 is_add;
3506   u32 sw_if_index;
3507   u32 tcp_in_vrf_id;
3508   u32 tcp_out_vrf_id;
3509   u32 udp_in_vrf_id;
3510   u32 udp_out_vrf_id;
3511 };
3512
3513 /** \brief Set interface source and L4 port-range response
3514     @param context - sender context, to match reply w/ request
3515     @param retval - return value for request
3516 */
3517 define ip_source_and_port_range_check_interface_add_del_reply
3518 {
3519   u32 context;
3520   i32 retval;
3521 };
3522
3523 /** \brief Delete sub interface request
3524     @param client_index - opaque cookie to identify the sender
3525     @param context - sender context, to match reply w/ request
3526     @param sw_if_index - sw index of the interface that was created by create_subif
3527 */
3528 define delete_subif {
3529   u32 client_index;
3530   u32 context;
3531   u32 sw_if_index;
3532 };
3533
3534 /** \brief Delete sub interface response
3535     @param context - sender context, to match reply w/ request
3536     @param retval - return code for the request
3537 */
3538 define delete_subif_reply {
3539   u32 context;
3540   i32 retval;
3541 };
3542
3543 /** \brief DPDK interface HQoS pipe profile set request
3544     @param client_index - opaque cookie to identify the sender
3545     @param context - sender context, to match reply w/ request
3546     @param sw_if_index - the interface
3547     @param subport - subport ID
3548     @param pipe - pipe ID within its subport
3549     @param profile - pipe profile ID
3550 */
3551 define sw_interface_set_dpdk_hqos_pipe {
3552     u32 client_index;
3553     u32 context;
3554     u32 sw_if_index;
3555     u32 subport;
3556     u32 pipe;
3557     u32 profile;
3558 };
3559
3560 /** \brief DPDK interface HQoS pipe profile set reply
3561     @param context - sender context, to match reply w/ request
3562     @param retval - request return code
3563 */
3564 define sw_interface_set_dpdk_hqos_pipe_reply {
3565     u32 context;
3566     i32 retval;
3567 };
3568
3569 /** \brief DPDK interface HQoS subport parameters set request
3570     @param client_index - opaque cookie to identify the sender
3571     @param context - sender context, to match reply w/ request
3572     @param sw_if_index - the interface
3573     @param subport - subport ID
3574     @param tb_rate - subport token bucket rate (measured in bytes/second)
3575     @param tb_size - subport token bucket size (measured in credits)
3576     @param tc_rate - subport traffic class 0 .. 3 rates (measured in bytes/second)
3577     @param tc_period - enforcement period for rates (measured in milliseconds)
3578 */
3579 define sw_interface_set_dpdk_hqos_subport {
3580     u32 client_index;
3581     u32 context;
3582     u32 sw_if_index;
3583     u32 subport;
3584     u32 tb_rate;
3585     u32 tb_size;
3586     u32 tc_rate[4];
3587     u32 tc_period;
3588 };
3589
3590 /** \brief DPDK interface HQoS subport parameters set reply
3591     @param context - sender context, to match reply w/ request
3592     @param retval - request return code
3593 */
3594 define sw_interface_set_dpdk_hqos_subport_reply {
3595     u32 context;
3596     i32 retval;
3597 };
3598
3599 /** \brief DPDK interface HQoS tctbl entry set request
3600     @param client_index - opaque cookie to identify the sender
3601     @param context - sender context, to match reply w/ request
3602     @param sw_if_index - the interface
3603     @param entry - entry index ID
3604     @param tc - traffic class (0 .. 3)
3605     @param queue - traffic class queue (0 .. 3)
3606 */
3607 define sw_interface_set_dpdk_hqos_tctbl {
3608     u32 client_index;
3609     u32 context;
3610     u32 sw_if_index;
3611     u32 entry;
3612     u32 tc;
3613     u32 queue;
3614 };
3615
3616 /** \brief DPDK interface HQoS tctbl entry set reply
3617     @param context - sender context, to match reply w/ request
3618     @param retval - request return code
3619 */
3620 define sw_interface_set_dpdk_hqos_tctbl_reply {
3621     u32 context;
3622     i32 retval;
3623 };
3624
3625 /** \brief L2 interface pbb tag rewrite configure request
3626     @param client_index - opaque cookie to identify the sender
3627     @param context - sender context, to match reply w/ request
3628     @param sw_if_index - interface the operation is applied to
3629     @param vtr_op - Choose from l2_vtr_op_t enum values
3630     @param inner_tag - needed for translate_qinq vtr op only
3631     @param outer_tag - needed for translate_qinq vtr op only 
3632     @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
3633     @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
3634     @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
3635     @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
3636 */
3637 define l2_interface_pbb_tag_rewrite
3638 {
3639   u32 client_index;
3640   u32 context;
3641   u32 sw_if_index;
3642   u32 vtr_op;
3643   u16 outer_tag;
3644   u8  b_dmac[6];
3645   u8  b_smac[6];
3646   u16 b_vlanid;
3647   u32 i_sid;
3648 };
3649
3650 /** \brief L2 interface pbb tag rewrite response
3651     @param context - sender context, to match reply w/ request
3652     @param retval - return code for the request
3653 */
3654 define l2_interface_pbb_tag_rewrite_reply
3655 {
3656   u32 context;
3657   i32 retval;
3658 };
3659
3660 /** \brief Punt traffic to the host
3661     @param client_index - opaque cookie to identify the sender
3662     @param context - sender context, to match reply w/ request
3663     @param is_add - add punt if non-zero, else delete
3664     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
3665     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
3666     @param l4_port - TCP/UDP port to be punted
3667 */
3668 define punt {
3669     u32 client_index;
3670     u32 context;
3671     u8 is_add;
3672     u8 ipv;
3673     u8 l4_protocol;
3674     u16 l4_port;
3675 };
3676
3677 /** \brief Reply to the punt request
3678     @param context - sender context which was passed in the request
3679     @param retval - return code of punt request
3680 */
3681 define punt_reply
3682 {
3683     u32 context;
3684     i32 retval;
3685 };
3686
3687 /** \brief Feature path enable/disable request
3688     @param client_index - opaque cookie to identify the sender
3689     @param context - sender context, to match reply w/ request
3690     @param sw_if_index - the interface
3691     @param enable - 1 = on, 0 = off
3692 */
3693 define feature_enable_disable {
3694     u32 client_index;
3695     u32 context;
3696     u32 sw_if_index;
3697     u8 enable;
3698     u8 arc_name[64];
3699     u8 feature_name[64];
3700 };
3701
3702 /** \brief Reply to the eature path enable/disable request
3703     @param context - sender context which was passed in the request
3704     @param retval - return code for the request
3705 */
3706 define feature_enable_disable_reply
3707 {
3708     u32 context;
3709     i32 retval;
3710 };
3711
3712 /*
3713  * Local Variables:
3714  * eval: (c-set-style "gnu")
3715  * End:
3716  */