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