d5818cb75181440bf036443e00df5b99fb751481
[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 policy_name[64];
818   u8 segs_and_tags[0];
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 mac_age - mac aging time in min, 0 for disabled
2894     @param is_add - add or delete flag
2895 */
2896 define bridge_domain_add_del
2897 {
2898   u32 client_index;
2899   u32 context;
2900   u32 bd_id;
2901   u8 flood;
2902   u8 uu_flood;
2903   u8 forward;
2904   u8 learn;
2905   u8 arp_term;
2906   u8 mac_age;
2907   u8 is_add;
2908 };
2909
2910 /** \brief L2 bridge domain add or delete response
2911     @param context - sender context, to match reply w/ request
2912     @param retval - return code for the set bridge flags request
2913 */
2914 define bridge_domain_add_del_reply
2915 {
2916   u32 context;
2917   i32 retval;
2918 };
2919
2920 /** \brief L2 bridge domain request operational state details
2921     @param client_index - opaque cookie to identify the sender
2922     @param context - sender context, to match reply w/ request
2923     @param bd_id - the bridge domain id desired or ~0 to request all bds
2924 */
2925 define bridge_domain_dump
2926 {
2927   u32 client_index;
2928   u32 context;
2929   u32 bd_id;
2930 };
2931
2932 /** \brief L2 bridge domain operational state response
2933     @param bd_id - the bridge domain id
2934     @param flood - bcast/mcast flooding state on all interfaces in the bd
2935     @param uu_flood - uknown unicast flooding state on all interfaces in the bd
2936     @param forward - forwarding state on all interfaces in the bd
2937     @param learn - learning state on all interfaces in the bd
2938     @param arp_term - arp termination state on all interfaces in the bd
2939     @param mac_age - mac aging time in min, 0 for disabled
2940     @param n_sw_ifs - number of sw_if_index's in the domain
2941 */
2942 define bridge_domain_details
2943 {
2944   u32 context;
2945   u32 bd_id;
2946   u8 flood;
2947   u8 uu_flood;
2948   u8 forward;
2949   u8 learn;
2950   u8 arp_term;
2951   u8 mac_age;
2952   u32 bvi_sw_if_index;
2953   u32 n_sw_ifs;
2954 };
2955
2956 /** \brief L2 bridge domain sw interface operational state response
2957     @param bd_id - the bridge domain id
2958     @param sw_if_index - sw_if_index in the domain
2959     @param shg - split horizon group for the interface
2960 */
2961 define bridge_domain_sw_if_details
2962 {
2963   u32 context;
2964   u32 bd_id;
2965   u32 sw_if_index;
2966   u8 shg;
2967 };
2968
2969 /** \brief DHCP Client config add / del request
2970     @param client_index - opaque cookie to identify the sender
2971     @param context - sender context, to match reply w/ request
2972     @param sw_if_index - index of the interface for DHCP client
2973     @param hostname - hostname
2974     @param is_add - add the config if non-zero, else delete
2975     @param want_dhcp_event - DHCP event sent to the sender
2976            via dhcp_compl_event API message if non-zero
2977     @param pid - sender's pid
2978 */
2979 define dhcp_client_config
2980 {
2981   u32 client_index;
2982   u32 context;
2983   u32 sw_if_index;
2984   u8 hostname[64];
2985   u8 is_add;
2986   u8 want_dhcp_event;
2987   u32 pid;
2988 };
2989
2990 /** \brief DHCP Client config response
2991     @param context - sender context, to match reply w/ request
2992     @param retval - return code for the request
2993 */
2994 define dhcp_client_config_reply
2995 {
2996   u32 context;
2997   i32 retval;
2998 };
2999
3000 /** \brief Set/unset input ACL interface
3001     @param client_index - opaque cookie to identify the sender
3002     @param context - sender context, to match reply w/ request
3003     @param sw_if_index - interface to set/unset input ACL
3004     @param ip4_table_index - ip4 classify table index (~0 for skip)
3005     @param ip6_table_index - ip6 classify table index (~0 for skip)
3006     @param l2_table_index  -  l2 classify table index (~0 for skip)
3007     @param is_add - Set input ACL if non-zero, else unset
3008     Note: User is recommeneded to use just one valid table_index per call.
3009           (ip4_table_index, ip6_table_index, or l2_table_index)
3010 */
3011 define input_acl_set_interface
3012 {
3013   u32 client_index;
3014   u32 context;
3015   u32 sw_if_index;
3016   u32 ip4_table_index;
3017   u32 ip6_table_index;
3018   u32 l2_table_index;
3019   u8 is_add;
3020 };
3021
3022 /** \brief Set/unset input ACL interface response
3023     @param context - sender context, to match reply w/ request
3024     @param retval - return code for the request
3025 */
3026 define input_acl_set_interface_reply
3027 {
3028   u32 context;
3029   i32 retval;
3030 };
3031
3032 /** \brief IPsec: Add/delete Security Policy Database
3033     @param client_index - opaque cookie to identify the sender
3034     @param context - sender context, to match reply w/ request
3035     @param is_add - add SPD if non-zero, else delete
3036     @param spd_id - SPD instance id (control plane allocated)
3037 */
3038
3039 define ipsec_spd_add_del
3040 {
3041   u32 client_index;
3042   u32 context;
3043   u8 is_add;
3044   u32 spd_id;
3045 };
3046
3047 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3048     @param context - returned sender context, to match reply w/ request
3049     @param retval - return code
3050 */
3051
3052 define ipsec_spd_add_del_reply
3053 {
3054   u32 context;
3055   i32 retval;
3056 };
3057
3058 /** \brief IPsec: Add/delete SPD from interface
3059
3060     @param client_index - opaque cookie to identify the sender
3061     @param context - sender context, to match reply w/ request
3062     @param is_add - add security mode if non-zero, else delete
3063     @param sw_if_index - index of the interface
3064     @param spd_id - SPD instance id to use for lookups
3065 */
3066
3067
3068 define ipsec_interface_add_del_spd
3069 {
3070   u32 client_index;
3071   u32 context;
3072
3073   u8 is_add;
3074   u32 sw_if_index;
3075   u32 spd_id;
3076 };
3077
3078 /** \brief Reply for IPsec: Add/delete SPD from interface
3079     @param context - returned sender context, to match reply w/ request
3080     @param retval - return code
3081 */
3082
3083 define ipsec_interface_add_del_spd_reply
3084 {
3085   u32 context;
3086   i32 retval;
3087 };
3088
3089 /** \brief IPsec: Add/delete Security Policy Database entry
3090
3091     See RFC 4301, 4.4.1.1 on how to match packet to selectors
3092
3093     @param client_index - opaque cookie to identify the sender
3094     @param context - sender context, to match reply w/ request
3095     @param is_add - add SPD if non-zero, else delete
3096     @param spd_id - SPD instance id (control plane allocated)
3097     @param priority - priority of SPD entry (non-unique value).  Used to order SPD matching - higher priorities match before lower
3098     @param is_outbound - entry applies to outbound traffic if non-zero, otherwise applies to inbound traffic
3099     @param is_ipv6 - remote/local address are IPv6 if non-zero, else IPv4
3100     @param remote_address_start - start of remote address range to match
3101     @param remote_address_stop - end of remote address range to match
3102     @param local_address_start - start of local address range to match
3103     @param local_address_stop - end of local address range to match
3104     @param protocol - protocol type to match [0 means any]
3105     @param remote_port_start - start of remote port range to match ...
3106     @param remote_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3107     @param local_port_start - start of local port range to match ...
3108     @param local_port_stop - end of remote port range to match [0 to 65535 means ANY, 65535 to 0 means OPAQUE]
3109     @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)
3110     @param sa_id - SAD instance id (control plane allocated)
3111
3112 */
3113
3114 define ipsec_spd_add_del_entry
3115 {
3116   u32 client_index;
3117   u32 context;
3118   u8 is_add;
3119
3120   u32 spd_id;
3121   i32 priority;
3122   u8 is_outbound;
3123
3124   // Selector
3125   u8 is_ipv6;
3126   u8 is_ip_any;
3127   u8 remote_address_start[16];
3128   u8 remote_address_stop[16];
3129   u8 local_address_start[16];
3130   u8 local_address_stop[16];
3131
3132   u8 protocol;
3133
3134   u16 remote_port_start;
3135   u16 remote_port_stop;
3136   u16 local_port_start;
3137   u16 local_port_stop;
3138
3139   // Policy
3140   u8 policy;
3141   u32 sa_id;
3142 };
3143
3144 /** \brief Reply for IPsec: Add/delete Security Policy Database entry
3145     @param context - returned sender context, to match reply w/ request
3146     @param retval - return code
3147 */
3148
3149 define ipsec_spd_add_del_entry_reply
3150 {
3151   u32 context;
3152   i32 retval;
3153 };
3154
3155 /** \brief IPsec: Add/delete Security Association Database entry
3156     @param client_index - opaque cookie to identify the sender
3157     @param context - sender context, to match reply w/ request
3158     @param is_add - add SAD entry if non-zero, else delete
3159
3160     @param sad_id - sad id
3161
3162     @param spi - security parameter index
3163
3164     @param protocol - 0 = AH, 1 = ESP
3165
3166     @param crypto_algorithm - 0 = Null, 1 = AES-CBC-128, 2 = AES-CBC-192, 3 = AES-CBC-256, 4 = 3DES-CBC
3167     @param crypto_key_length - length of crypto_key in bytes
3168     @param crypto_key - crypto keying material
3169
3170     @param integrity_algorithm - 0 = None, 1 = MD5-96, 2 = SHA1-96, 3 = SHA-256, 4 = SHA-384, 5=SHA-512
3171     @param integrity_key_length - length of integrity_key in bytes
3172     @param integrity_key - integrity keying material
3173
3174     @param use_extended_sequence_number - use ESN when non-zero
3175
3176     @param is_tunnel - IPsec tunnel mode if non-zero, else transport mode
3177     @param is_tunnel_ipv6 - IPsec tunnel mode is IPv6 if non-zero, else IPv4 tunnel only valid if is_tunnel is non-zero
3178     @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
3179     @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
3180
3181     To be added:
3182      Anti-replay
3183      IPsec tunnel address copy mode (to support GDOI)
3184  */
3185
3186 define ipsec_sad_add_del_entry
3187 {
3188   u32 client_index;
3189   u32 context;
3190   u8 is_add;
3191
3192   u32 sad_id;
3193
3194   u32 spi;
3195
3196   u8 protocol;
3197
3198   u8 crypto_algorithm;
3199   u8 crypto_key_length;
3200   u8 crypto_key[128];
3201
3202   u8 integrity_algorithm;
3203   u8 integrity_key_length;
3204   u8 integrity_key[128];
3205
3206   u8 use_extended_sequence_number;
3207
3208   u8 is_tunnel;
3209   u8 is_tunnel_ipv6;
3210   u8 tunnel_src_address[16];
3211   u8 tunnel_dst_address[16];
3212 };
3213
3214 /** \brief Reply for IPsec: Add/delete Security Association Database entry
3215     @param context - returned sender context, to match reply w/ request
3216     @param retval - return code
3217 */
3218
3219 define ipsec_sad_add_del_entry_reply
3220 {
3221   u32 context;
3222   i32 retval;
3223 };
3224
3225 /** \brief IPsec: Update Security Association keys
3226     @param client_index - opaque cookie to identify the sender
3227     @param context - sender context, to match reply w/ request
3228
3229     @param sa_id - sa id
3230
3231     @param crypto_key_length - length of crypto_key in bytes
3232     @param crypto_key - crypto keying material
3233
3234     @param integrity_key_length - length of integrity_key in bytes
3235     @param integrity_key - integrity keying material
3236 */
3237
3238 define ipsec_sa_set_key
3239 {
3240   u32 client_index;
3241   u32 context;
3242
3243   u32 sa_id;
3244
3245   u8 crypto_key_length;
3246   u8 crypto_key[128];
3247
3248   u8 integrity_key_length;
3249   u8 integrity_key[128];
3250 };
3251
3252 /** \brief Reply for IPsec: Update Security Association keys
3253     @param context - returned sender context, to match reply w/ request
3254     @param retval - return code
3255 */
3256
3257 define ipsec_sa_set_key_reply
3258 {
3259   u32 context;
3260   i32 retval;
3261 };
3262
3263 /** \brief IKEv2: Add/delete profile
3264     @param client_index - opaque cookie to identify the sender
3265     @param context - sender context, to match reply w/ request
3266
3267     @param name - IKEv2 profile name
3268     @param is_add - Add IKEv2 profile if non-zero, else delete
3269 */
3270 define ikev2_profile_add_del
3271 {
3272   u32 client_index;
3273   u32 context;
3274
3275   u8 name[64];
3276   u8 is_add;
3277 };
3278
3279 /** \brief Reply for IKEv2: Add/delete profile
3280     @param context - returned sender context, to match reply w/ request
3281     @param retval - return code
3282 */
3283 define ikev2_profile_add_del_reply
3284 {
3285   u32 context;
3286   i32 retval;
3287 };
3288
3289 /** \brief IKEv2: Set IKEv2 profile authentication method
3290     @param client_index - opaque cookie to identify the sender
3291     @param context - sender context, to match reply w/ request
3292
3293     @param name - IKEv2 profile name
3294     @param auth_method - IKEv2 authentication method (shared-key-mic/rsa-sig)
3295     @param is_hex - Authentication data in hex format if non-zero, else string
3296     @param data_len - Authentication data length
3297     @param data - Authentication data (for rsa-sig cert file path)
3298 */
3299 define ikev2_profile_set_auth
3300 {
3301   u32 client_index;
3302   u32 context;
3303
3304   u8 name[64];
3305   u8 auth_method;
3306   u8 is_hex;
3307   u32 data_len;
3308   u8 data[0];
3309 };
3310
3311 /** \brief Reply for IKEv2: Set IKEv2 profile authentication method
3312     @param context - returned sender context, to match reply w/ request
3313     @param retval - return code
3314 */
3315 define ikev2_profile_set_auth_reply
3316 {
3317   u32 context;
3318   i32 retval;
3319 };
3320
3321 /** \brief IKEv2: Set IKEv2 profile local/remote identification
3322     @param client_index - opaque cookie to identify the sender
3323     @param context - sender context, to match reply w/ request
3324
3325     @param name - IKEv2 profile name
3326     @param is_local - Identification is local if non-zero, else remote
3327     @param id_type - Identification type
3328     @param data_len - Identification data length
3329     @param data - Identification data
3330 */
3331 define ikev2_profile_set_id
3332 {
3333   u32 client_index;
3334   u32 context;
3335
3336   u8 name[64];
3337   u8 is_local;
3338   u8 id_type;
3339   u32 data_len;
3340   u8 data[0];
3341 };
3342
3343 /** \brief Reply for IKEv2:
3344     @param context - returned sender context, to match reply w/ request
3345     @param retval - return code
3346 */
3347 define ikev2_profile_set_id_reply
3348 {
3349   u32 context;
3350   i32 retval;
3351 };
3352
3353 /** \brief IKEv2: Set IKEv2 profile traffic selector parameters
3354     @param client_index - opaque cookie to identify the sender
3355     @param context - sender context, to match reply w/ request
3356
3357     @param name - IKEv2 profile name
3358     @param is_local - Traffic selector is local if non-zero, else remote
3359     @param proto - Traffic selector IP protocol (if zero not relevant)
3360     @param start_port - The smallest port number allowed by traffic selector
3361     @param end_port - The largest port number allowed by traffic selector
3362     @param start_addr - The smallest address included in traffic selector
3363     @param end_addr - The largest address included in traffic selector
3364 */
3365 define ikev2_profile_set_ts
3366 {
3367   u32 client_index;
3368   u32 context;
3369
3370   u8 name[64];
3371   u8 is_local;
3372   u8 proto;
3373   u16 start_port;
3374   u16 end_port;
3375   u32 start_addr;
3376   u32 end_addr;
3377 };
3378
3379 /** \brief Reply for IKEv2: Set IKEv2 profile traffic selector parameters
3380     @param context - returned sender context, to match reply w/ request
3381     @param retval - return code
3382 */
3383 define ikev2_profile_set_ts_reply
3384 {
3385   u32 context;
3386   i32 retval;
3387 };
3388
3389 /** \brief IKEv2: Set IKEv2 local RSA private key
3390     @param client_index - opaque cookie to identify the sender
3391     @param context - sender context, to match reply w/ request
3392
3393     @param key_file - Key file absolute path
3394 */
3395 define ikev2_set_local_key
3396 {
3397   u32 client_index;
3398   u32 context;
3399
3400   u8 key_file[256];
3401 };
3402
3403 /** \brief Reply for IKEv2: Set IKEv2 local key
3404     @param context - returned sender context, to match reply w/ request
3405     @param retval - return code
3406 */
3407 define ikev2_set_local_key_reply
3408 {
3409   u32 context;
3410   i32 retval;
3411 };
3412
3413 /** \brief Tell client about a DHCP completion event
3414     @param client_index - opaque cookie to identify the sender
3415     @param pid - client pid registered to receive notification
3416     @param is_ipv6 - if non-zero the address is ipv6, else ipv4
3417     @param host_address - Host IP address
3418     @param router_address - Router IP address
3419     @param host_mac - Host MAC address
3420 */
3421 define dhcp_compl_event
3422 {
3423   u32 client_index;
3424   u32 pid;
3425   u8 hostname[64];
3426   u8 is_ipv6;
3427   u8 host_address[16];
3428   u8 router_address[16];
3429   u8 host_mac[6];
3430 };
3431
3432 /** \brief cop: enable/disable junk filtration features on an interface
3433     @param client_index - opaque cookie to identify the sender
3434     @param context - sender context, to match reply w/ request
3435     @param sw_if_inded - desired interface
3436     @param enable_disable - 1 => enable, 0 => disable
3437 */
3438
3439 define cop_interface_enable_disable
3440 {
3441   u32 client_index;
3442   u32 context;
3443   u32 sw_if_index;
3444   u8 enable_disable;
3445 };
3446
3447 /** \brief cop: interface enable/disable junk filtration reply
3448     @param context - returned sender context, to match reply w/ request
3449     @param retval - return code
3450 */
3451
3452 define cop_interface_enable_disable_reply
3453 {
3454   u32 context;
3455   i32 retval;
3456 };
3457
3458 /** \brief cop: enable/disable whitelist filtration features on an interface
3459     Note: the supplied fib_id must match in order to remove the feature!
3460     
3461     @param client_index - opaque cookie to identify the sender
3462     @param context - sender context, to match reply w/ request
3463     @param sw_if_index - interface handle, physical interfaces only
3464     @param fib_id - fib identifier for the whitelist / blacklist fib
3465     @param ip4 - 1 => enable ip4 filtration, 0=> disable ip4 filtration
3466     @param ip6 - 1 => enable ip6 filtration, 0=> disable ip6 filtration
3467     @param default_cop -  1 => enable non-ip4, non-ip6 filtration 0=> disable it
3468 */
3469
3470 define cop_whitelist_enable_disable
3471 {
3472   u32 client_index;
3473   u32 context;
3474   u32 sw_if_index;
3475   u32 fib_id;
3476   u8 ip4;
3477   u8 ip6;
3478   u8 default_cop;
3479 };
3480
3481 /** \brief cop: interface enable/disable junk filtration reply
3482     @param context - returned sender context, to match reply w/ request
3483     @param retval - return code
3484 */
3485
3486 define cop_whitelist_enable_disable_reply
3487 {
3488   u32 context;
3489   i32 retval;
3490 };
3491
3492 /** \brief get_node_graph - get a copy of the vpp node graph
3493     including the current set of graph arcs.
3494
3495     @param client_index - opaque cookie to identify the sender
3496     @param context - sender context, to match reply w/ request
3497 */
3498
3499 define get_node_graph
3500 {
3501   u32 client_index;
3502   u32 context;
3503 };
3504
3505 /** \brief get_node_graph_reply
3506     @param context - returned sender context, to match reply w/ request
3507     @param retval - return code
3508     @param reply_in_shmem - result from vlib_node_serialize, in shared
3509     memory. Process with vlib_node_unserialize, remember to switch
3510     heaps and free the result.
3511 */
3512
3513 define get_node_graph_reply
3514 {
3515   u32 context;
3516   i32 retval;
3517   u64 reply_in_shmem;
3518 };
3519
3520 /** \brief IOAM enable : Enable in-band OAM
3521     @param id - profile id
3522     @param seqno - To enable Seqno Processing
3523     @param analyse - Enabling analysis of iOAM at decap node 
3524     @param pow_enable - Proof of Work enabled or not flag
3525     @param trace_enable - iOAM Trace enabled or not flag
3526 */
3527 define ioam_enable
3528 {
3529   u32 client_index;
3530   u32 context;
3531   u16 id;
3532   u8 seqno;
3533   u8 analyse;
3534   u8 pot_enable;
3535   u8 trace_enable;
3536   u32 node_id;
3537 };
3538
3539 /** \brief iOAM Trace profile add / del response
3540     @param context - sender context, to match reply w/ request
3541     @param retval - return value for request
3542 */
3543 define ioam_enable_reply
3544 {
3545   u32 context;
3546   i32 retval;
3547 };
3548
3549 /** \brief iOAM disable
3550     @param client_index - opaque cookie to identify the sender
3551     @param context - sender context, to match reply w/ request
3552     @param index - MAP Domain index
3553 */
3554 define ioam_disable
3555 {
3556   u32 client_index;
3557   u32 context;
3558   u16 id;
3559 };
3560
3561 /** \brief iOAM disable response
3562     @param context - sender context, to match reply w/ request
3563     @param retval - return value for request
3564 */
3565 define ioam_disable_reply
3566 {
3567   u32 context;
3568   i32 retval;
3569 };
3570
3571 /** \brief Create host-interface
3572     @param client_index - opaque cookie to identify the sender
3573     @param context - sender context, to match reply w/ request
3574     @param host_if_name - interface name
3575     @param hw_addr - interface MAC
3576     @param use_random_hw_addr - use random generated MAC
3577 */
3578 define af_packet_create
3579 {
3580   u32 client_index;
3581   u32 context;
3582
3583   u8 host_if_name[64];
3584   u8 hw_addr[6];
3585   u8 use_random_hw_addr;
3586 };
3587
3588 /** \brief Create host-interface response
3589     @param context - sender context, to match reply w/ request
3590     @param retval - return value for request
3591 */
3592 define af_packet_create_reply
3593 {
3594   u32 context;
3595   i32 retval;
3596   u32 sw_if_index;
3597 };
3598
3599 /** \brief Delete host-interface
3600     @param client_index - opaque cookie to identify the sender
3601     @param context - sender context, to match reply w/ request
3602     @param host_if_name - interface name
3603 */
3604 define af_packet_delete
3605 {
3606   u32 client_index;
3607   u32 context;
3608
3609   u8 host_if_name[64];
3610 };
3611
3612 /** \brief Delete host-interface response
3613     @param context - sender context, to match reply w/ request
3614     @param retval - return value for request
3615 */
3616 define af_packet_delete_reply
3617 {
3618   u32 context;
3619   i32 retval;
3620 };
3621
3622 /** \brief Add/del policer
3623     @param client_index - opaque cookie to identify the sender
3624     @param context - sender context, to match reply w/ request
3625     @param is_add - add policer if non-zero, else delete
3626     @param name - policer name
3627     @param cir - CIR
3628     @param eir - EIR
3629     @param cb - Committed Burst
3630     @param eb - Excess or Peak Burst
3631     @param rate_type - rate type
3632     @param round_type - rounding type
3633     @param type - policer algorithm
3634     @param color_aware - 0=color-blind, 1=color-aware
3635     @param conform_action_type - conform action type
3636     @param conform_dscp - DSCP for conform mar-and-transmit action
3637     @param exceed_action_type - exceed action type
3638     @param exceed_dscp - DSCP for exceed mar-and-transmit action
3639     @param violate_action_type - violate action type
3640     @param violate_dscp - DSCP for violate mar-and-transmit action
3641 */
3642 define policer_add_del
3643 {
3644   u32 client_index;
3645   u32 context;
3646
3647   u8 is_add;
3648   u8 name[64];
3649   u32 cir;
3650   u32 eir;
3651   u64 cb;
3652   u64 eb;
3653   u8 rate_type;
3654   u8 round_type;
3655   u8 type;
3656   u8 color_aware;
3657   u8 conform_action_type;
3658   u8 conform_dscp;
3659   u8 exceed_action_type;
3660   u8 exceed_dscp;
3661   u8 violate_action_type;
3662   u8 violate_dscp;
3663 };
3664
3665 /** \brief Add/del policer response
3666     @param context - sender context, to match reply w/ request
3667     @param retval - return value for request
3668     @param policer_index - for add, returned index of the new policer
3669 */
3670 define policer_add_del_reply
3671 {
3672   u32 context;
3673   i32 retval;
3674   u32 policer_index;
3675 };
3676
3677 /** \brief Get list of policers
3678     @param client_index - opaque cookie to identify the sender
3679     @param context - sender context, to match reply w/ request
3680     @param match_name_valid - if 0 request all policers otherwise use match_name
3681     @param match_name - policer name
3682 */
3683 define policer_dump
3684 {
3685   u32 client_index;
3686   u32 context;
3687
3688   u8 match_name_valid;
3689   u8 match_name[64];
3690 };
3691
3692 /** \brief Policer operational state response.
3693     @param context - sender context, to match reply w/ request
3694     @param name - policer name
3695     @param cir - CIR
3696     @param eir - EIR
3697     @param cb - Committed Burst
3698     @param eb - Excess or Peak Burst
3699     @param rate_type - rate type
3700     @param round_type - rounding type
3701     @param type - policer algorithm
3702     @param conform_action_type - conform action type
3703     @param conform_dscp - DSCP for conform mar-and-transmit action
3704     @param exceed_action_type - exceed action type
3705     @param exceed_dscp - DSCP for exceed mar-and-transmit action
3706     @param violate_action_type - violate action type
3707     @param violate_dscp - DSCP for violate mar-and-transmit action
3708     @param single_rate - 1 = single rate policer, 0 = two rate policer
3709     @param color_aware - for hierarchical policing
3710     @param scale - power-of-2 shift amount for lower rates
3711     @param cir_tokens_per_period - number of tokens for each period
3712     @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
3713     @param current_limit - current limit
3714     @param current_bucket - current bucket
3715     @param extended_limit - extended limit
3716     @param extended_bucket - extended bucket
3717     @param last_update_time - last update time
3718 */
3719 define policer_details
3720 {
3721   u32 context;
3722
3723   u8 name[64];
3724   u32 cir;
3725   u32 eir;
3726   u64 cb;
3727   u64 eb;
3728   u8 rate_type;
3729   u8 round_type;
3730   u8 type;
3731   u8 conform_action_type;
3732   u8 conform_dscp;
3733   u8 exceed_action_type;
3734   u8 exceed_dscp;
3735   u8 violate_action_type;
3736   u8 violate_dscp;
3737   u8 single_rate;
3738   u8 color_aware;
3739   u32 scale;
3740   u32 cir_tokens_per_period;
3741   u32 pir_tokens_per_period;
3742   u32 current_limit;
3743   u32 current_bucket;
3744   u32 extended_limit;
3745   u32 extended_bucket;
3746   u64 last_update_time;
3747 };
3748
3749 /** \brief Set/unset policer classify interface
3750     @param client_index - opaque cookie to identify the sender
3751     @param context - sender context, to match reply w/ request
3752     @param sw_if_index - interface to set/unset policer classify
3753     @param ip4_table_index - ip4 classify table index (~0 for skip)
3754     @param ip6_table_index - ip6 classify table index (~0 for skip)
3755     @param l2_table_index  -  l2 classify table index (~0 for skip)
3756     @param is_add - Set if non-zero, else unset
3757     Note: User is recommeneded to use just one valid table_index per call.
3758           (ip4_table_index, ip6_table_index, or l2_table_index)
3759 */
3760 define policer_classify_set_interface
3761 {
3762   u32 client_index;
3763   u32 context;
3764   u32 sw_if_index;
3765   u32 ip4_table_index;
3766   u32 ip6_table_index;
3767   u32 l2_table_index;
3768   u8 is_add;
3769 };
3770
3771 /** \brief Set/unset policer classify interface response
3772     @param context - sender context, to match reply w/ request
3773     @param retval - return value for request
3774 */
3775 define policer_classify_set_interface_reply
3776 {
3777   u32 context;
3778   i32 retval;
3779 };
3780
3781 /** \brief Get list of policer classify interfaces and tables
3782     @param client_index - opaque cookie to identify the sender
3783     @param context - sender context, to match reply w/ request
3784     @param type - classify table type
3785 */
3786 define policer_classify_dump
3787 {
3788   u32 client_index;
3789   u32 context;
3790   u8 type;
3791 };
3792
3793 /** \brief Policer iclassify operational state response.
3794     @param context - sender context, to match reply w/ request
3795     @param sw_if_index - software interface index
3796     @param table_index - classify table index
3797 */
3798 define policer_classify_details
3799 {
3800   u32 context;
3801   u32 sw_if_index;
3802   u32 table_index;
3803 };
3804
3805 /** \brief Create netmap
3806     @param client_index - opaque cookie to identify the sender
3807     @param context - sender context, to match reply w/ request
3808     @param netmap_if_name - interface name
3809     @param hw_addr - interface MAC
3810     @param use_random_hw_addr - use random generated MAC
3811     @param is_pipe - is pipe
3812     @param is_master - 0=slave, 1=master
3813 */
3814 define netmap_create
3815 {
3816   u32 client_index;
3817   u32 context;
3818
3819   u8 netmap_if_name[64];
3820   u8 hw_addr[6];
3821   u8 use_random_hw_addr;
3822   u8 is_pipe;
3823   u8 is_master;
3824 };
3825
3826 /** \brief Create netmap response
3827     @param context - sender context, to match reply w/ request
3828     @param retval - return value for request
3829 */
3830 define netmap_create_reply
3831 {
3832   u32 context;
3833   i32 retval;
3834 };
3835
3836 /** \brief Delete netmap
3837     @param client_index - opaque cookie to identify the sender
3838     @param context - sender context, to match reply w/ request
3839     @param netmap_if_name - interface name
3840 */
3841 define netmap_delete
3842 {
3843   u32 client_index;
3844   u32 context;
3845
3846   u8 netmap_if_name[64];
3847 };
3848
3849 /** \brief Delete netmap response
3850     @param context - sender context, to match reply w/ request
3851     @param retval - return value for request
3852 */
3853 define netmap_delete_reply
3854 {
3855   u32 context;
3856   i32 retval;
3857 };
3858
3859 /** \brief Classify get table IDs request
3860     @param client_index - opaque cookie to identify the sender
3861     @param context - sender context, to match reply w/ request
3862 */
3863 define classify_table_ids
3864 {
3865   u32 client_index;
3866   u32 context;
3867 };
3868
3869 /** \brief Reply for classify get table IDs request
3870     @param context - sender context which was passed in the request
3871     @param count - number of ids returned in response
3872     @param ids - array of classify table ids
3873 */
3874 define classify_table_ids_reply
3875 {
3876   u32 context;
3877   i32 retval;
3878   u32 count;
3879   u32 ids[count];
3880 };
3881
3882 /** \brief Classify table ids by interface index request
3883     @param client_index - opaque cookie to identify the sender
3884     @param context - sender context, to match reply w/ request
3885     @param sw_if_index - index of the interface
3886 */
3887 define classify_table_by_interface
3888 {
3889   u32 client_index;
3890   u32 context;
3891   u32 sw_if_index;
3892 };
3893
3894 /** \brief Reply for classify table id by interface index request
3895     @param context - sender context which was passed in the request
3896     @param count - number of ids returned in response
3897     @param sw_if_index - index of the interface
3898     @param l2_table_id - l2 classify table index
3899     @param ip4_table_id - ip4 classify table index
3900     @param ip6_table_id - ip6 classify table index
3901 */
3902 define classify_table_by_interface_reply
3903 {
3904   u32 context;
3905   i32 retval;
3906   u32 sw_if_index;
3907   u32 l2_table_id;
3908   u32 ip4_table_id;
3909   u32 ip6_table_id;
3910 };
3911
3912 /** \brief Classify table info
3913     @param client_index - opaque cookie to identify the sender
3914     @param context - sender context, to match reply w/ request
3915     @param table_id - classify table index
3916 */
3917 define classify_table_info
3918 {
3919   u32 client_index;
3920   u32 context;
3921   u32 table_id;
3922 };
3923
3924 /** \brief Reply for classify table info request
3925     @param context - sender context which was passed in the request
3926     @param count - number of ids returned in response
3927     @param table_id - classify table index
3928     @param nbuckets - number of buckets when adding a table
3929     @param match_n_vectors - number of match vectors
3930     @param skip_n_vectors - number of skip_n_vectors
3931     @param active_sessions - number of sessions (active entries)
3932     @param next_table_index - index of next table
3933     @param miss_next_index - index of miss table
3934     @param mask[] - match mask
3935 */
3936 define classify_table_info_reply
3937 {
3938   u32 context;
3939   i32 retval;
3940   u32 table_id;
3941   u32 nbuckets;
3942   u32 match_n_vectors;
3943   u32 skip_n_vectors;
3944   u32 active_sessions;
3945   u32 next_table_index;
3946   u32 miss_next_index;
3947   u32 mask_length;
3948   u8 mask[mask_length];
3949 };
3950
3951 /** \brief Classify sessions dump request
3952     @param client_index - opaque cookie to identify the sender
3953     @param context - sender context, to match reply w/ request
3954     @param table_id - classify table index
3955 */
3956 define classify_session_dump
3957 {
3958   u32 client_index;
3959   u32 context;
3960   u32 table_id;
3961 };
3962
3963 /** \brief Reply for classify table session dump request
3964     @param context - sender context which was passed in the request
3965     @param count - number of ids returned in response
3966     @param table_id - classify table index
3967     @param hit_next_index - hit_next_index of session
3968     @param opaque_index - for add, opaque_index of session
3969     @param advance - advance value of session
3970     @param match[] - match value for session
3971 */
3972 define classify_session_details
3973 {
3974   u32 context;
3975   i32 retval;
3976   u32 table_id;
3977   u32 hit_next_index;
3978   i32 advance;
3979   u32 opaque_index;
3980   u32 match_length;
3981   u8 match[match_length];
3982 };
3983
3984 /** \brief Configure IPFIX exporter process request
3985     @param client_index - opaque cookie to identify the sender
3986     @param context - sender context, to match reply w/ request
3987     @param collector_address - address of IPFIX collector
3988     @param collector_port - port of IPFIX collector
3989     @param src_address - address of IPFIX exporter
3990     @param vrf_id - VRF / fib table ID
3991     @param path_mtu - Path MTU between exporter and collector
3992     @param template_interval - number of seconds after which to resend template
3993     @param udp_checksum - UDP checksum calculation enable flag
3994 */
3995 define set_ipfix_exporter
3996 {
3997   u32 client_index;
3998   u32 context;
3999   u8 collector_address[16];
4000   u16 collector_port;
4001   u8 src_address[16];
4002   u32 vrf_id;
4003   u32 path_mtu;
4004   u32 template_interval;
4005   u8 udp_checksum;
4006 };
4007
4008 /** \brief Reply to IPFIX exporter configure request
4009     @param context - sender context which was passed in the request
4010 */
4011 define set_ipfix_exporter_reply
4012 {
4013   u32 context;
4014   i32 retval;
4015 };
4016
4017 /** \brief IPFIX exporter dump request
4018     @param client_index - opaque cookie to identify the sender
4019     @param context - sender context, to match reply w/ request
4020 */
4021 define ipfix_exporter_dump
4022 {
4023   u32 client_index;
4024   u32 context;
4025 };
4026
4027 /** \brief Reply to IPFIX exporter dump request
4028     @param context - sender context which was passed in the request
4029     @param collector_address - address of IPFIX collector
4030     @param collector_port - port of IPFIX collector
4031     @param src_address - address of IPFIX exporter
4032     @param fib_index - fib table index
4033     @param path_mtu - Path MTU between exporter and collector
4034     @param template_interval - number of seconds after which to resend template
4035     @param udp_checksum - UDP checksum calculation enable flag
4036 */
4037 define ipfix_exporter_details
4038 {
4039   u32 context;
4040   u8 collector_address[16];
4041   u16 collector_port;
4042   u8 src_address[16];
4043   u32 vrf_id;
4044   u32 path_mtu;
4045   u32 template_interval;
4046   u8 udp_checksum;
4047 };
4048
4049 /** \brief IPFIX classify stream configure request
4050     @param client_index - opaque cookie to identify the sender
4051     @param context - sender context, to match reply w/ request
4052     @param domain_id - domain ID reported in IPFIX messages for classify stream
4053     @param src_port - source port of UDP session for classify stream
4054 */
4055 define set_ipfix_classify_stream {
4056     u32 client_index;
4057     u32 context;
4058     u32 domain_id;
4059     u16 src_port;
4060 };
4061
4062 /** \brief IPFIX classify stream configure response
4063     @param context - sender context, to match reply w/ request
4064     @param retval - return value for request
4065 */
4066 define set_ipfix_classify_stream_reply {
4067     u32 context;
4068     i32 retval;
4069 };
4070
4071 /** \brief IPFIX classify stream dump request
4072     @param client_index - opaque cookie to identify the sender
4073     @param context - sender context, to match reply w/ request
4074 */
4075 define ipfix_classify_stream_dump {
4076     u32 client_index;
4077     u32 context;
4078 };
4079
4080 /** \brief Reply to IPFIX classify stream dump request
4081     @param context - sender context, to match reply w/ request
4082     @param domain_id - domain ID reported in IPFIX messages for classify stream
4083     @param src_port - source port of UDP session for classify stream
4084 */
4085 define ipfix_classify_stream_details {
4086     u32 context;
4087     u32 domain_id;
4088     u16 src_port;
4089 };
4090
4091 /** \brief IPFIX add or delete classifier table request
4092     @param client_index - opaque cookie to identify the sender
4093     @param context - sender context, to match reply w/ request
4094     @param table_id - classifier table ID
4095     @param ip_version - version of IP used in the classifier table
4096     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4097 */
4098 define ipfix_classify_table_add_del {
4099     u32 client_index;
4100     u32 context;
4101     u32 table_id;
4102     u8 ip_version;
4103     u8 transport_protocol;
4104     u8 is_add;
4105 };
4106
4107 /** \brief IPFIX add classifier table response
4108     @param context - sender context which was passed in the request
4109 */
4110 define ipfix_classify_table_add_del_reply {
4111     u32 context;
4112     i32 retval;
4113 };
4114
4115 /** \brief IPFIX classify tables dump request
4116     @param client_index - opaque cookie to identify the sender
4117     @param context - sender context, to match reply w/ request
4118 */
4119 define ipfix_classify_table_dump {
4120     u32 client_index;
4121     u32 context;
4122 };
4123
4124 /** \brief Reply to IPFIX classify tables dump request
4125     @param context - sender context, to match reply w/ request
4126     @param table_id - classifier table ID
4127     @param ip_version - version of IP used in the classifier table
4128     @param transport_protocol - transport protocol used in the classifier table or 255 for unspecified
4129 */
4130 define ipfix_classify_table_details {
4131     u32 context;
4132     u32 table_id;
4133     u8 ip_version;
4134     u8 transport_protocol;
4135 };
4136
4137 /** \brief Set/unset flow classify interface
4138     @param client_index - opaque cookie to identify the sender
4139     @param context - sender context, to match reply w/ request
4140     @param sw_if_index - interface to set/unset flow classify
4141     @param ip4_table_index - ip4 classify table index (~0 for skip)
4142     @param ip6_table_index - ip6 classify table index (~0 for skip)
4143     @param l2_table_index  -  l2 classify table index (~0 for skip)
4144     @param is_add - Set if non-zero, else unset
4145     Note: User is recommeneded to use just one valid table_index per call.
4146           (ip4_table_index, ip6_table_index, or l2_table_index)
4147 */
4148 define flow_classify_set_interface {
4149     u32 client_index;
4150     u32 context;
4151     u32 sw_if_index;
4152     u32 ip4_table_index;
4153     u32 ip6_table_index;
4154     u8  is_add;
4155 };
4156
4157 /** \brief Set/unset flow classify interface response
4158     @param context - sender context, to match reply w/ request
4159     @param retval - return value for request
4160 */
4161 define flow_classify_set_interface_reply {
4162     u32 context;
4163     i32 retval;
4164 };
4165
4166 /** \brief Get list of flow classify interfaces and tables
4167     @param client_index - opaque cookie to identify the sender
4168     @param context - sender context, to match reply w/ request
4169     @param type - classify table type
4170 */
4171 define flow_classify_dump {
4172     u32 client_index;
4173     u32 context;
4174     u8 type;
4175 };
4176
4177 /** \brief Flow classify operational state response.
4178     @param context - sender context, to match reply w/ request
4179     @param sw_if_index - software interface index
4180     @param table_index - classify table index
4181 */
4182 define flow_classify_details {
4183     u32 context;
4184     u32 sw_if_index;
4185     u32 table_index;
4186 };
4187
4188 /** \brief Query relative index via node names
4189     @param client_index - opaque cookie to identify the sender
4190     @param context - sender context, to match reply w/ request
4191     @param node_name - name of node to find relative index from
4192     @param next_name - next node from node_name to find relative index of
4193 */
4194 define get_next_index
4195 {
4196   u32 client_index;
4197   u32 context;
4198   u8 node_name[64];
4199   u8 next_name[64];
4200 };
4201
4202 /** \brief Reply for get next node index
4203     @param context - sender context which was passed in the request
4204     @param retval - return value
4205     @param next_index - index of the next_node
4206 */
4207 define get_next_index_reply
4208 {
4209   u32 context;
4210   i32 retval;
4211   u32 next_index;
4212 };
4213
4214 /** \brief PacketGenerator create interface request
4215     @param client_index - opaque cookie to identify the sender
4216     @param context - sender context, to match reply w/ request
4217     @param interface_id - interface index
4218 */
4219 define pg_create_interface
4220 {
4221   u32 client_index;
4222   u32 context;
4223   u32 interface_id;
4224 };
4225
4226 /** \brief PacketGenerator create interface response
4227     @param context - sender context, to match reply w/ request
4228     @param retval - return value for request
4229 */
4230 define pg_create_interface_reply
4231 {
4232   u32 context;
4233   i32 retval;
4234   u32 sw_if_index;
4235 };
4236
4237 /** \brief PacketGenerator capture packets on given interface request
4238     @param client_index - opaque cookie to identify the sender
4239     @param context - sender context, to match reply w/ request
4240     @param interface_id - pg interface index
4241     @param is_enabled - 1 if enabling streams, 0 if disabling
4242     @param count - number of packets to be captured
4243     @param pcap_file - pacp file name to store captured packets
4244 */
4245 define pg_capture
4246 {
4247   u32 client_index;
4248   u32 context;
4249   u32 interface_id;
4250   u8 is_enabled;
4251   u32 count;
4252   u32 pcap_name_length;
4253   u8 pcap_file_name[pcap_name_length];
4254 };
4255
4256 /** \brief PacketGenerator capture packets response
4257     @param context - sender context, to match reply w/ request
4258     @param retval - return value for request
4259 */
4260 define pg_capture_reply
4261 {
4262   u32 context;
4263   i32 retval;
4264 };
4265
4266 /** \brief Enable / disable packet generator request
4267     @param client_index - opaque cookie to identify the sender
4268     @param context - sender context, to match reply w/ request
4269     @param is_enabled - 1 if enabling streams, 0 if disabling
4270     @param stream - stream name to be enable/disabled, if not specified handle all streams
4271 */
4272 define pg_enable_disable
4273 {
4274   u32 client_index;
4275   u32 context;
4276   u8 is_enabled;
4277   u32 stream_name_length;
4278   u8 stream_name[stream_name_length];
4279 };
4280
4281 /** \brief Reply for enable / disable packet generator
4282     @param context - returned sender context, to match reply w/ request
4283     @param retval - return code
4284 */
4285 define pg_enable_disable_reply
4286 {
4287   u32 context;
4288   i32 retval;
4289 };
4290
4291 /** \brief Configure IP source and L4 port-range check
4292     @param client_index - opaque cookie to identify the sender
4293     @param context - sender context, to match reply w/ request
4294     @param is_ip6 - 1 if source address type is IPv6
4295     @param is_add - 1 if add, 0 if delete
4296     @param mask_length - mask length for address entry
4297     @param address - array of address bytes
4298     @param number_of_ranges - length of low_port and high_port arrays (must match)
4299     @param low_ports[32] - up to 32 low end of port range entries (must have corresponding high_ports entry)
4300     @param high_ports[32] - up to 32 high end of port range entries (must have corresponding low_ports entry)
4301     @param vrf_id - fib table/vrf id to associate the source and port-range check with
4302     @note To specify a single port set low_port and high_port entry the same
4303 */
4304 define ip_source_and_port_range_check_add_del
4305 {
4306   u32 client_index;
4307   u32 context;
4308   u8 is_ipv6;
4309   u8 is_add;
4310   u8 mask_length;
4311   u8 address[16];
4312   u8 number_of_ranges;
4313   u16 low_ports[32];
4314   u16 high_ports[32];
4315   u32 vrf_id;
4316 };
4317
4318 /** \brief Configure IP source and L4 port-range check reply
4319     @param context - returned sender context, to match reply w/ request
4320     @param retval - return code
4321 */
4322 define ip_source_and_port_range_check_add_del_reply
4323 {
4324   u32 context;
4325   i32 retval;
4326 };
4327
4328 /** \brief Set interface source and L4 port-range request
4329     @param client_index - opaque cookie to identify the sender
4330     @param context - sender context, to match reply w/ request
4331     @param interface_id - interface index
4332     @param tcp_vrf_id - VRF associated with source and TCP port-range check
4333     @param udp_vrf_id - VRF associated with source and TCP port-range check
4334 */
4335 define ip_source_and_port_range_check_interface_add_del
4336 {
4337   u32 client_index;
4338   u32 context;
4339   u8 is_add;
4340   u32 sw_if_index;
4341   u32 tcp_in_vrf_id;
4342   u32 tcp_out_vrf_id;
4343   u32 udp_in_vrf_id;
4344   u32 udp_out_vrf_id;
4345 };
4346
4347 /** \brief Set interface source and L4 port-range response
4348     @param context - sender context, to match reply w/ request
4349     @param retval - return value for request
4350 */
4351 define ip_source_and_port_range_check_interface_add_del_reply
4352 {
4353   u32 context;
4354   i32 retval;
4355 };
4356
4357 /** \brief Add / del ipsec gre tunnel request
4358     @param client_index - opaque cookie to identify the sender
4359     @param context - sender context, to match reply w/ request
4360     @param local_sa_id - local SA id
4361     @param remote_sa_id - remote SA id
4362     @param is_add - 1 if adding the tunnel, 0 if deleting
4363     @param src_address - tunnel source address
4364     @param dst_address - tunnel destination address
4365 */
4366 define ipsec_gre_add_del_tunnel {
4367     u32 client_index;
4368     u32 context;
4369     u32 local_sa_id;
4370     u32 remote_sa_id;
4371     u8 is_add;
4372     u8 src_address[4];
4373     u8 dst_address[4];
4374 };
4375
4376 /** \brief Reply for add / del ipsec gre tunnel request
4377     @param context - returned sender context, to match reply w/ request
4378     @param retval - return code
4379     @param sw_if_index - software index of the new ipsec gre tunnel
4380 */
4381 define ipsec_gre_add_del_tunnel_reply {
4382     u32 context;
4383     i32 retval;
4384     u32 sw_if_index;
4385 };
4386
4387 /** \brief Dump ipsec gre tunnel table
4388     @param client_index - opaque cookie to identify the sender
4389     @param context - sender context, to match reply w/ request
4390     @param tunnel_index - gre tunnel identifier or -1 in case of all tunnels
4391 */
4392 define ipsec_gre_tunnel_dump {
4393     u32 client_index;
4394     u32 context;
4395     u32 sw_if_index;
4396 };
4397
4398 /** \brief mpls gre tunnel operational state response
4399     @param context - returned sender context, to match reply w/ request
4400     @param sw_if_index - software index of the ipsec gre tunnel
4401     @param local_sa_id - local SA id
4402     @param remote_sa_id - remote SA id
4403     @param src_address - tunnel source address
4404     @param dst_address - tunnel destination address
4405 */
4406 define ipsec_gre_tunnel_details {
4407     u32 context;
4408     u32 sw_if_index;
4409     u32 local_sa_id;
4410     u32 remote_sa_id;
4411     u8 src_address[4];
4412     u8 dst_address[4];
4413 };
4414
4415 /** \brief Delete sub interface request
4416     @param client_index - opaque cookie to identify the sender
4417     @param context - sender context, to match reply w/ request
4418     @param sw_if_index - sw index of the interface that was created by create_subif
4419 */
4420 define delete_subif {
4421   u32 client_index;
4422   u32 context;
4423   u32 sw_if_index;
4424 };
4425
4426 /** \brief Delete sub interface response
4427     @param context - sender context, to match reply w/ request
4428     @param retval - return code for the request
4429 */
4430 define delete_subif_reply {
4431   u32 context;
4432   i32 retval;
4433 };
4434
4435 /** \brief DPDK interface HQoS pipe profile set request
4436     @param client_index - opaque cookie to identify the sender
4437     @param context - sender context, to match reply w/ request
4438     @param sw_if_index - the interface
4439     @param subport - subport ID
4440     @param pipe - pipe ID within its subport
4441     @param profile - pipe profile ID
4442 */
4443 define sw_interface_set_dpdk_hqos_pipe {
4444     u32 client_index;
4445     u32 context;
4446     u32 sw_if_index;
4447     u32 subport;
4448     u32 pipe;
4449     u32 profile;
4450 };
4451
4452 /** \brief DPDK interface HQoS pipe profile set reply
4453     @param context - sender context, to match reply w/ request
4454     @param retval - request return code
4455 */
4456 define sw_interface_set_dpdk_hqos_pipe_reply {
4457     u32 context;
4458     i32 retval;
4459 };
4460
4461 /** \brief DPDK interface HQoS subport parameters set request
4462     @param client_index - opaque cookie to identify the sender
4463     @param context - sender context, to match reply w/ request
4464     @param sw_if_index - the interface
4465     @param subport - subport ID
4466     @param tb_rate - subport token bucket rate (measured in bytes/second)
4467     @param tb_size - subport token bucket size (measured in credits)
4468     @param tc_rate - subport traffic class 0 .. 3 rates (measured in bytes/second)
4469     @param tc_period - enforcement period for rates (measured in milliseconds)
4470 */
4471 define sw_interface_set_dpdk_hqos_subport {
4472     u32 client_index;
4473     u32 context;
4474     u32 sw_if_index;
4475     u32 subport;
4476     u32 tb_rate;
4477     u32 tb_size;
4478     u32 tc_rate[4];
4479     u32 tc_period;
4480 };
4481
4482 /** \brief DPDK interface HQoS subport parameters set reply
4483     @param context - sender context, to match reply w/ request
4484     @param retval - request return code
4485 */
4486 define sw_interface_set_dpdk_hqos_subport_reply {
4487     u32 context;
4488     i32 retval;
4489 };
4490
4491 /** \brief DPDK interface HQoS tctbl entry set request
4492     @param client_index - opaque cookie to identify the sender
4493     @param context - sender context, to match reply w/ request
4494     @param sw_if_index - the interface
4495     @param entry - entry index ID
4496     @param tc - traffic class (0 .. 3)
4497     @param queue - traffic class queue (0 .. 3)
4498 */
4499 define sw_interface_set_dpdk_hqos_tctbl {
4500     u32 client_index;
4501     u32 context;
4502     u32 sw_if_index;
4503     u32 entry;
4504     u32 tc;
4505     u32 queue;
4506 };
4507
4508 /** \brief DPDK interface HQoS tctbl entry set reply
4509     @param context - sender context, to match reply w/ request
4510     @param retval - request return code
4511 */
4512 define sw_interface_set_dpdk_hqos_tctbl_reply {
4513     u32 context;
4514     i32 retval;
4515 };
4516
4517 /** \brief L2 interface pbb tag rewrite configure request
4518     @param client_index - opaque cookie to identify the sender
4519     @param context - sender context, to match reply w/ request
4520     @param sw_if_index - interface the operation is applied to
4521     @param vtr_op - Choose from l2_vtr_op_t enum values
4522     @param inner_tag - needed for translate_qinq vtr op only
4523     @param outer_tag - needed for translate_qinq vtr op only 
4524     @param b_dmac - B-tag remote mac address, needed for any push or translate_qinq vtr op
4525     @param b_smac - B-tag local mac address, needed for any push or translate qinq vtr op
4526     @param b_vlanid - B-tag vlanid, needed for any push or translate qinq vtr op
4527     @param i_sid - I-tag service id, needed for any push or translate qinq vtr op
4528 */
4529 define l2_interface_pbb_tag_rewrite
4530 {
4531   u32 client_index;
4532   u32 context;
4533   u32 sw_if_index;
4534   u32 vtr_op;
4535   u16 outer_tag;
4536   u8  b_dmac[6];
4537   u8  b_smac[6];
4538   u16 b_vlanid;
4539   u32 i_sid;
4540 };
4541
4542 /** \brief L2 interface pbb tag rewrite response
4543     @param context - sender context, to match reply w/ request
4544     @param retval - return code for the request
4545 */
4546 define l2_interface_pbb_tag_rewrite_reply
4547 {
4548   u32 context;
4549   i32 retval;
4550 };
4551
4552 /** \brief Punt traffic to the host
4553     @param client_index - opaque cookie to identify the sender
4554     @param context - sender context, to match reply w/ request
4555     @param is_add - add punt if non-zero, else delete
4556     @param ipv - L3 protocol 4 - IPv4, 6 - IPv6, ~0 - All
4557     @param l4_protocol - L4 protocol to be punted, only UDP (0x11) is supported
4558     @param l4_port - TCP/UDP port to be punted
4559 */
4560 define punt {
4561     u32 client_index;
4562     u32 context;
4563     u8 is_add;
4564     u8 ipv;
4565     u8 l4_protocol;
4566     u16 l4_port;
4567 };
4568
4569 /** \brief Reply to the punt request
4570     @param context - sender context which was passed in the request
4571     @param retval - return code of punt request
4572 */
4573 define punt_reply
4574 {
4575     u32 context;
4576     i32 retval;
4577 };
4578
4579 /** \brief Dump ipsec policy database data
4580     @param client_index - opaque cookie to identify the sender
4581     @param context - sender context, to match reply w/ request
4582     @param spd_id - SPD instance id
4583     @param sa_id - SA id, optional, set to ~0 to see all policies in SPD
4584 */
4585 define ipsec_spd_dump {
4586     u32 client_index;
4587     u32 context;
4588     u32 spd_id;
4589     u32 sa_id;
4590 };
4591
4592 /** \brief IPsec policy database response
4593     @param context - sender context which was passed in the request
4594     @param spd_id - SPD instance id
4595     @param priority - numeric value to control policy evaluation order
4596     @param is_outbound - [1|0] to indicate if direction is [out|in]bound
4597     @param is_ipv6 - [1|0] to indicate if address family is ipv[6|4]
4598     @param local_start_addr - first address in local traffic selector range
4599     @param local_stop_addr - last address in local traffic selector range
4600     @param local_start_port - first port in local traffic selector range
4601     @param local_stop_port - last port in local traffic selector range
4602     @param remote_start_addr - first address in remote traffic selector range
4603     @param remote_stop_addr - last address in remote traffic selector range
4604     @param remote_start_port - first port in remote traffic selector range
4605     @param remote_stop_port - last port in remote traffic selector range
4606     @param protocol - traffic selector protocol
4607     @param policy - policy action
4608     @param sa_id - SA id
4609     @param bytes - byte count of packets matching this policy
4610     @param packets - count of packets matching this policy
4611 */
4612
4613 define ipsec_spd_details {
4614     u32 context;
4615     u32 spd_id;
4616     i32 priority;
4617     u8 is_outbound;
4618     u8 is_ipv6;
4619     u8 local_start_addr[16];
4620     u8 local_stop_addr[16];
4621     u16 local_start_port;
4622     u16 local_stop_port;
4623     u8 remote_start_addr[16];
4624     u8 remote_stop_addr[16];
4625     u16 remote_start_port;
4626     u16 remote_stop_port;
4627     u8 protocol;
4628     u8 policy;
4629     u32 sa_id;
4630     u64 bytes;
4631     u64 packets;
4632 };
4633
4634 /** \brief Feature path enable/disable request
4635     @param client_index - opaque cookie to identify the sender
4636     @param context - sender context, to match reply w/ request
4637     @param sw_if_index - the interface
4638     @param enable - 1 = on, 0 = off
4639 */
4640 define feature_enable_disable {
4641     u32 client_index;
4642     u32 context;
4643     u32 sw_if_index;
4644     u8 enable;
4645     u8 arc_name[64];
4646     u8 feature_name[64];
4647 };
4648
4649 /** \brief Reply to the eature path enable/disable request
4650     @param context - sender context which was passed in the request
4651     @param retval - return code for the request
4652 */
4653 define feature_enable_disable_reply
4654 {
4655     u32 context;
4656     i32 retval;
4657 };
4658
4659 /** \brief Configure BFD feature
4660     @param client_index - opaque cookie to identify the sender
4661     @param context - sender context, to match reply w/ request
4662     @param slow_timer - slow timer (seconds)
4663     @param min_tx - desired min tx interval
4664     @param min_rx - desired min rx interval
4665     @param detect_mult - desired detection multiplier
4666 */
4667 define bfd_set_config {
4668   u32 client_index;
4669   u32 context;
4670   u32 slow_timer;
4671   u32 min_tx;
4672   u32 min_rx;
4673   u8 detect_mult;
4674 };
4675
4676 /** \brief Configure BFD feature response
4677     @param context - sender context, to match reply w/ request
4678     @param retval - return code for the request
4679 */
4680 define bfd_set_config_reply {
4681   u32 context;
4682   i32 retval;
4683 };
4684
4685 /** \brief Get BFD configuration
4686 */
4687 define bfd_get_config {
4688   u32 client_index;
4689   u32 context;
4690 };
4691
4692 /** \brief Get BFD configuration response
4693     @param context - sender context, to match reply w/ request
4694     @param retval - return code for the request
4695     @param slow_timer - slow timer (seconds)
4696     @param min_tx - desired min tx interval
4697     @param min_rx - desired min rx interval
4698     @param detect_mult - desired detection multiplier
4699 */
4700 define bfd_get_config_reply {
4701   u32 client_index;
4702   u32 context;
4703   u32 slow_timer;
4704   u32 min_tx;
4705   u32 min_rx;
4706   u8 detect_mult;
4707 };
4708
4709 /** \brief Add UDP BFD session on interface
4710     @param client_index - opaque cookie to identify the sender
4711     @param context - sender context, to match reply w/ request
4712     @param sw_if_index - sw index of the interface
4713     @param desired_min_tx - desired min transmit interval (microseconds)
4714     @param required_min_rx - required min receive interval (microseconds)
4715     @param detect_mult - detect multiplier (# of packets missed between connection goes down)
4716     @param local_addr - local address
4717     @param peer_addr - peer address
4718     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
4719 */
4720 define bfd_udp_add {
4721   u32 client_index;
4722   u32 context;
4723   u32 sw_if_index;
4724   u32 desired_min_tx;
4725   u32 required_min_rx;
4726   u8 local_addr[16];
4727   u8 peer_addr[16];
4728   u8 is_ipv6;
4729   u8 detect_mult;
4730 };
4731
4732 /** \brief Add UDP BFD session response
4733     @param context - sender context, to match reply w/ request
4734     @param retval - return code for the request
4735     @param bs_index - index of the session created
4736 */
4737 define bfd_udp_add_reply {
4738   u32 context;
4739   i32 retval;
4740   u32 bs_index;
4741 };
4742
4743 /** \brief Delete UDP BFD session on interface
4744     @param client_index - opaque cookie to identify the sender
4745     @param context - sender context, to match reply w/ request
4746     @param sw_if_index - sw index of the interface
4747     @param local_addr - local address
4748     @param peer_addr - peer address
4749     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
4750 */
4751 define bfd_udp_del {
4752   u32 client_index;
4753   u32 context;
4754   u32 sw_if_index;
4755   u8 local_addr[16];
4756   u8 peer_addr[16];
4757   u8 is_ipv6;
4758 };
4759
4760 /** \brief Delete UDP BFD session response
4761     @param context - sender context, to match reply w/ request
4762     @param retval - return code for the request
4763 */
4764 define bfd_udp_del_reply {
4765   u32 context;
4766   i32 retval;
4767 };
4768
4769 /** \brief Get all BFD sessions
4770     @param client_index - opaque cookie to identify the sender
4771     @param context - sender context, to match reply w/ request
4772 */
4773 define bfd_udp_session_dump {
4774   u32 client_index;
4775   u32 context;
4776 };
4777
4778 /** \brief BFD session details structure
4779     @param context - sender context, to match reply w/ request
4780     @param bs_index - index of the session
4781     @param sw_if_index - sw index of the interface
4782     @param local_addr - local address
4783     @param peer_addr - peer address
4784     @param is_ipv6 - local_addr, peer_addr are IPv6 if non-zero, otherwise IPv4
4785     @param state - session state
4786 */
4787 define bfd_udp_session_details {
4788   u32 context;
4789   u32 bs_index; 
4790   u32 sw_if_index;
4791   u8 local_addr[16];
4792   u8 peer_addr[16];
4793   u8 is_ipv6;
4794   u8 state;
4795 };
4796
4797 /** \brief Set flags of BFD session
4798     @param client_index - opaque cookie to identify the sender
4799     @param context - sender context, to match reply w/ request
4800     @param bs_index - index of the bfd session to set flags on
4801     @param admin_up_down - set the admin state, 1 = up, 0 = down
4802 */
4803 define bfd_session_set_flags {
4804   u32 client_index;
4805   u32 context;
4806   u32 bs_index;
4807   u8 admin_up_down;
4808 };
4809
4810 /** \brief Reply to bfd_session_set_flags 
4811     @param context - sender context which was passed in the request
4812     @param retval - return code of the set flags request
4813 */
4814 define bfd_session_set_flags_reply
4815 {
4816   u32 context;
4817   i32 retval;
4818 };
4819
4820 /** \brief Register for BFD events
4821     @param client_index - opaque cookie to identify the sender
4822     @param context - sender context, to match reply w/ request
4823     @param enable_disable - 1 => register for events, 0 => cancel registration
4824     @param pid - sender's pid
4825 */
4826 define want_bfd_events
4827 {
4828   u32 client_index;
4829   u32 context;
4830   u32 enable_disable;
4831   u32 pid;
4832 };
4833
4834 /** \brief Reply for BFD events registration
4835     @param context - returned sender context, to match reply w/ request
4836     @param retval - return code
4837 */
4838 define want_bfd_events_reply
4839 {
4840   u32 context;
4841   i32 retval;
4842 };
4843
4844 /*
4845  * Local Variables:
4846  * eval: (c-set-style "gnu")
4847  * End:
4848  */