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