62c9605847a265ad04687f6e69706589018b379e
[vpp.git] / src / plugins / snat / snat.api
1 /*
2  * Copyright (c) 2016 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 /**
16  * @file snat.api
17  * @brief VPP control-plane API messages.
18  *
19  * This file defines VPP control-plane API messages which are generally
20  * called through a shared memory interface.
21  */
22
23 /** \brief Add/del S-NAT address range
24     @param client_index - opaque cookie to identify the sender
25     @param context - sender context, to match reply w/ request
26     @param is_ip4 - 1 if address type is IPv4
27     @param first_ip_address - first IP address
28     @param last_ip_address - last IP address
29     @param vrf_id - VRF id of tenant, ~0 means independent of VRF
30     @param is_add - 1 if add, 0 if delete
31 */
32 autoreply define snat_add_address_range {
33   u32 client_index;
34   u32 context;
35   u8 is_ip4;
36   u8 first_ip_address[16];
37   u8 last_ip_address[16];
38   u32 vrf_id;
39   u8 is_add;
40 };
41
42 /** \brief Dump S-NAT addresses
43     @param client_index - opaque cookie to identify the sender
44     @param context - sender context, to match reply w/ request
45 */
46 define snat_address_dump {
47   u32 client_index;
48   u32 context;
49 };
50
51 /** \brief S-NAT address details response
52     @param context - sender context, to match reply w/ request
53     @param is_ip4 - 1 if address type is IPv4
54     @param ip_address - IP address
55     @param vrf_id - VRF id of tenant, ~0 means independent of VRF
56 */
57 define snat_address_details {
58   u32 context;
59   u8 is_ip4;
60   u8 ip_address[16];
61   u32 vrf_id;
62 };
63
64 /** \brief Enable/disable S-NAT feature on the interface
65     @param client_index - opaque cookie to identify the sender
66     @param context - sender context, to match reply w/ request
67     @param is_add - 1 if add, 0 if delete
68     @param is_inside - 1 if inside, 0 if outside
69     @param sw_if_index - software index of the interface
70 */
71 autoreply define snat_interface_add_del_feature {
72   u32 client_index;
73   u32 context;
74   u8 is_add;
75   u8 is_inside;
76   u32 sw_if_index;
77 };
78
79 /** \brief Dump interfaces with S-NAT feature
80     @param client_index - opaque cookie to identify the sender
81     @param context - sender context, to match reply w/ request
82 */
83 define snat_interface_dump {
84   u32 client_index;
85   u32 context;
86 };
87
88 /** \brief S-NAT interface details response
89     @param context - sender context, to match reply w/ request
90     @param is_inside - 1 if inside, 0 if outside
91     @param sw_if_index - software index of the interface
92 */
93 define snat_interface_details {
94   u32 context;
95   u8 is_inside;
96   u32 sw_if_index;
97 };
98
99 /** \brief Add/delete S-NAT static mapping
100     @param client_index - opaque cookie to identify the sender
101     @param context - sender context, to match reply w/ request
102     @param is_add - 1 if add, 0 if delete
103     @param is_ip4 - 1 if address type is IPv4
104     @param addr_only - 1 if address only mapping
105     @param local_ip_address - local IP address
106     @param external_ip_address - external IP address
107     @param protocol - IP protocol
108     @param local_port - local port number
109     @param external_port - external port number
110     @param external_sw_if_index - external interface (if set
111                                   external_ip_address is ignored, ~0 means not
112                                   used)
113     @param vfr_id - VRF ID
114 */
115 autoreply define snat_add_static_mapping {
116   u32 client_index;
117   u32 context;
118   u8 is_add;
119   u8 is_ip4;
120   u8 addr_only;
121   u8 local_ip_address[16];
122   u8 external_ip_address[16];
123   u8 protocol;
124   u16 local_port;
125   u16 external_port;
126   u32 external_sw_if_index;
127   u32 vrf_id;
128 };
129
130 /** \brief Dump S-NAT static mappings
131     @param client_index - opaque cookie to identify the sender
132     @param context - sender context, to match reply w/ request
133 */
134 define snat_static_mapping_dump {
135   u32 client_index;
136   u32 context;
137 };
138
139 /** \brief S-NAT static mapping details response
140     @param context - sender context, to match reply w/ request
141     @param is_ip4 - 1 if address type is IPv4
142     @param addr_only - 1 if address only mapping
143     @param local_ip_address - local IP address
144     @param external_ip_address - external IP address
145     @param protocol - IP protocol
146     @param local_port - local port number
147     @param external_port - external port number
148     @param external_sw_if_index - external interface
149     @param vfr_id - VRF ID
150 */
151 define snat_static_mapping_details {
152   u32 context;
153   u8 is_ip4;
154   u8 addr_only;
155   u8 local_ip_address[16];
156   u8 external_ip_address[16];
157   u8 protocol;
158   u16 local_port;
159   u16 external_port;
160   u32 external_sw_if_index;
161   u32 vrf_id;
162 };
163
164 /** \brief Control ping from client to api server request
165     @param client_index - opaque cookie to identify the sender
166     @param context - sender context, to match reply w/ request
167 */
168 define snat_control_ping
169 {
170   u32 client_index;
171   u32 context;
172 };
173
174 /** \brief Control ping from the client to the server response
175     @param client_index - opaque cookie to identify the sender
176     @param context - sender context, to match reply w/ request
177     @param retval - return code for the request
178     @param vpe_pid - the pid of the vpe, returned by the server
179 */
180 define snat_control_ping_reply
181 {
182   u32 context;
183   i32 retval;
184   u32 client_index;
185   u32 vpe_pid;
186 };
187
188 /** \brief Show S-NAT plugin startup config
189     @param client_index - opaque cookie to identify the sender
190     @param context - sender context, to match reply w/ request
191 */
192 define snat_show_config
193 {
194   u32 client_index;
195   u32 context;
196 };
197
198 /** \brief Show S-NAT plugin startup config reply
199     @param context - sender context, to match reply w/ request
200     @param retval - return code for the request
201     @param static_mapping_only - if 1 dynamic translations disabled
202     @param static_mapping_connection_tracking - if 1 create session data
203     @param deterministic - if 1 deterministic mapping
204     @param translation_buckets - number of translation hash buckets
205     @param translation_memory_size - translation hash memory size
206     @param user_buckets - number of user hash buckets
207     @param user_memory_size - user hash memory size
208     @param max_translations_per_user - maximum number of translations per user
209     @param outside_vrf_id - outside VRF id
210     @param inside_vrf_id - default inside VRF id
211 */
212 define snat_show_config_reply
213 {
214   u32 context;
215   i32 retval;
216   u8 static_mapping_only;
217   u8 static_mapping_connection_tracking;
218   u8 deterministic;
219   u32 translation_buckets;
220   u32 translation_memory_size;
221   u32 user_buckets;
222   u32 user_memory_size;
223   u32 max_translations_per_user;
224   u32 outside_vrf_id;
225   u32 inside_vrf_id;
226 };
227
228 /** \brief Set S-NAT workers
229     @param client_index - opaque cookie to identify the sender
230     @param context - sender context, to match reply w/ request
231     @param worker_mask - S-NAT workers mask
232 */
233 autoreply define snat_set_workers {
234   u32 client_index;
235   u32 context;
236   u64 worker_mask;
237 };
238
239 /** \brief Dump S-NAT workers
240     @param client_index - opaque cookie to identify the sender
241     @param context - sender context, to match reply w/ request
242 */
243 define snat_worker_dump {
244   u32 client_index;
245   u32 context;
246 };
247
248 /** \brief S-NAT workers details response
249     @param context - sender context, to match reply w/ request
250     @param worker_index - worker index
251     @param lcore_id - lcore ID
252     @param name - worker name
253 */
254 define snat_worker_details {
255   u32 context;
256   u32 worker_index;
257   u32 lcore_id;
258   u8 name[64];
259 };
260
261 /** \brief Add/delete S-NAT pool address from specific interfce
262     @param client_index - opaque cookie to identify the sender
263     @param context - sender context, to match reply w/ request
264     @param is_add - 1 if add, 0 if delete
265     @param sw_if_index - software index of the interface
266 */
267 autoreply define snat_add_del_interface_addr {
268   u32 client_index;
269   u32 context;
270   u8 is_add;
271   u8 is_inside;
272   u32 sw_if_index;
273 };
274
275 /** \brief Dump S-NAT pool addresses interfaces
276     @param client_index - opaque cookie to identify the sender
277     @param context - sender context, to match reply w/ request
278 */
279 define snat_interface_addr_dump {
280   u32 client_index;
281   u32 context;
282 };
283
284 /** \brief S-NAT pool addresses interfaces details response
285     @param context - sender context, to match reply w/ request
286     @param sw_if_index - software index of the interface
287 */
288 define snat_interface_addr_details {
289   u32 context;
290   u32 sw_if_index;
291 };
292
293 /** \brief Enable/disable S-NAT IPFIX logging
294     @param client_index - opaque cookie to identify the sender
295     @param context - sender context, to match reply w/ request
296     @param domain_id - observation domain ID
297     @param src_port - source port number
298     @param enable - 1 if enable, 0 if disable
299 */
300 autoreply define snat_ipfix_enable_disable {
301   u32 client_index;
302   u32 context;
303   u32 domain_id;
304   u16 src_port;
305   u8 enable;
306 };
307
308 /** \brief Dump S-NAT users
309     @param client_index - opaque cookie to identify the sender
310     @param context - sender context, to match reply w/ request
311 */
312 define snat_user_dump {
313   u32 client_index;
314   u32 context;
315 };
316
317 /** \brief S-NAT users response
318     @param context - sender context, to match reply w/ request
319     @vrf_id - VRF ID
320     @param is_ip4 - 1 if address type is IPv4
321     @param ip_adress - IP address
322     @param nsessions - number of dynamic sessions
323     @param nstaticsessions - number of static sessions
324 */
325 define snat_user_details {
326   u32 context;
327   u32 vrf_id;
328   u8 is_ip4;
329   u8 ip_address[16];
330   u32 nsessions;
331   u32 nstaticsessions;
332 };
333
334 /** \brief S-NAT user's sessions
335     @param client_index - opaque cookie to identify the sender
336     @param context - sender context, to match reply w/ request
337     @param is_ip4 - 1 if address type is IPv4
338     @param user_ip - IP address of the user to dump
339     @param vrf_id - VRF_ID
340 */
341 define snat_user_session_dump {
342   u32 client_index;
343   u32 context;
344   u8 is_ip4;
345   u8 ip_address[16];
346   u32 vrf_id;
347 };
348
349 /** \brief S-NAT user's sessions response
350     @param context - sender context, to match reply w/ request
351     @param is_ip4 - 1 if address type is IPv4
352     @param outside_ip_address - outside IP address
353     @param outside_port - outside port
354     @param inside_ip_address - inside IP address
355     @param inside_port - inside port
356     @param protocol - protocol
357     @param is_static - 1 if session is static
358     @param last_heard - last heard timer
359     @param total_bytes - count of bytes sent through session
360     @param total_pkts - count of pakets sent through session
361 */
362 define snat_user_session_details {
363   u32 context;
364   u8 is_ip4;
365   u8 outside_ip_address[16];
366   u16 outside_port;
367   u8 inside_ip_address[16];
368   u16 inside_port;
369   u16 protocol;
370   u8 is_static;
371   u64 last_heard;
372   u64 total_bytes;
373   u32 total_pkts;
374 };
375
376 /** \brief Add/delete S-NAT deterministic mapping
377     @param client_index - opaque cookie to identify the sender
378     @param context - sender context, to match reply w/ request
379     @param is_add - 1 if add, 0 if delete
380     @param is_ip4 - 1 if address type is IPv4
381     @param in_addr - inside IP address
382     @param in_plen - inside IP address prefix length
383     @param out_addr - outside IP address
384     @param out_addr - outside IP address prefix length
385 */
386 autoreply define snat_add_det_map {
387   u32 client_index;
388   u32 context;
389   u8 is_add;
390   u8 is_ip4;
391   u8 addr_only;
392   u8 in_addr[16];
393   u8 in_plen;
394   u8 out_addr[16];
395   u8 out_plen;
396 };
397
398 /** \brief Get outside address and port range from inside address
399     @param client_index - opaque cookie to identify the sender
400     @param context - sender context, to match reply w/ request
401     @param is_ip4 - 1 if address type is IPv4
402     @param in_addr - inside IP address
403 */
404 define snat_det_forward {
405   u32 client_index;
406   u32 context;
407   u8 is_ip4;
408   u8 in_addr[16];
409 };
410
411 /** \brief Get outside address and port range from inside address
412     @param context - sender context, to match reply w/ request
413     @param retval - return code
414     @param out_port_lo - outside port range start
415     @param out_port_hi - outside port range end
416     @param is_ip4 - 1 if address type is IPv4
417     @param out_addr - outside IP address
418 */
419 define snat_det_forward_reply {
420   u32 context;
421   i32 retval;
422   u16 out_port_lo;
423   u16 out_port_hi;
424   u8 is_ip4;
425   u8 out_addr[16];
426 };
427
428 /** \brief Get inside address from outside address and port
429     @param client_index - opaque cookie to identify the sender
430     @param context - sender context, to match reply w/ request
431     @param out_port - outside port
432     @param is_ip4 - 1 if address type is IPv4
433     @param out_addr - outside IP address
434 */
435 define snat_det_reverse {
436   u32 client_index;
437   u32 context;
438   u16 out_port;
439   u8 is_ip4;
440   u8 out_addr[16];
441 };
442
443 /** \brief Get inside address from outside address and port reply
444     @param context - sender context, to match reply w/ request
445     @param retval - return code
446     @param is_ip4 - 1 if address type is IPv4
447     @param in_addr - inside IP address
448 */
449 define snat_det_reverse_reply {
450   u32 context;
451   i32 retval;
452   u8 is_ip4;
453   u8 in_addr[16];
454 };
455
456 /** \brief Dump S-NAT deterministic mappings
457     @param client_index - opaque cookie to identify the sender
458     @param context - sender context, to match reply w/ request
459 */
460 define snat_det_map_dump {
461   u32 client_index;
462   u32 context;
463 };
464
465 /** \brief S-NAT users response
466     @param context - sender context, to match reply w/ request
467     @param is_ip4 - 1 if address type is IPv4
468     @param in_addr - inside IP address
469     @param in_plen - inside IP address prefix length
470     @param out_addr - outside IP address
471     @param out_plen - outside IP address prefix length
472     @param sharing_ratio - outside to inside address sharing ratio
473     @param ports_per_host - number of ports available to a host
474     @param ses_num - number of sessions belonging to this mapping
475 */
476 define snat_det_map_details {
477   u32 context;
478   u8 is_ip4;
479   u8 in_addr[16];
480   u8 in_plen;
481   u8 out_addr[16];
482   u8 out_plen;
483   u32 sharing_ratio;
484   u16 ports_per_host;
485   u32 ses_num;
486 };
487
488 /** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
489     @param client_index - opaque cookie to identify the sender
490     @param context - sender context, to match reply w/ request
491     @param udp - UDP timeout (default 300sec)
492     @param tcp_established - TCP established timeout (default 7440sec)
493     @param tcp_transitory - TCP transitory timeout (default 240sec)
494     @param icmp - ICMP timeout (default 60sec)
495 */
496 autoreply define snat_det_set_timeouts {
497   u32 client_index;
498   u32 context;
499   u32 udp;
500   u32 tcp_established;
501   u32 tcp_transitory;
502   u32 icmp;
503 };
504
505 /** \brief Get values of timeouts for deterministic NAT (seconds)
506     @param client_index - opaque cookie to identify the sender
507     @param context - sender context, to match reply w/ request
508 */
509 define snat_det_get_timeouts {
510   u32 client_index;
511   u32 context;
512 };
513
514 /** \brief Get values of timeouts for deterministic NAT reply
515     @param context - sender context, to match reply w/ request
516     @param retval - return code
517     @param udp - UDP timeout (default 300sec)
518     @param tcp_established - TCP established timeout (default 7440sec)
519     @param tcp_transitory - TCP transitory timeout (default 240sec)
520     @param icmp - ICMP timeout (default 60sec)
521 */
522 define snat_det_get_timeouts_reply {
523   u32 context;
524   i32 retval;
525   u32 udp;
526   u32 tcp_established;
527   u32 tcp_transitory;
528   u32 icmp;
529 };
530
531 /** \brief Close CGNAT session by outside address and port
532     @param client_index - opaque cookie to identify the sender
533     @param context - sender context, to match reply w/ request
534     @param is_ip4 - 1 if address type is IPv4
535     @param out_addr - outside IP address
536     @param out_port - outside port
537     @param ext_addr - external host address
538     @param ext_port - external host port
539 */
540 autoreply define snat_det_close_session_out {
541   u32 client_index;
542   u32 context;
543   u8 is_ip4;
544   u8 out_addr[16];
545   u16 out_port;
546   u8 ext_addr[16];
547   u16 ext_port;
548 };
549
550 /** \brief Close CGNAT session by inside address and port
551     @param client_index - opaque cookie to identify the sender
552     @param context - sender context, to match reply w/ request
553     @param is_ip4 - 1 if address type is IPv4
554     @param in_addr - inside IP address
555     @param in_port - inside port
556     @param ext_addr - external host address
557     @param ext_port - external host port
558 */
559 autoreply define snat_det_close_session_in {
560   u32 client_index;
561   u32 context;
562   u8 is_ip4;
563   u8 in_addr[16];
564   u16 in_port;
565   u8 ext_addr[16];
566   u16 ext_port;
567 };
568
569 /** \brief Dump S-NAT deterministic sessions
570     @param client_index - opaque cookie to identify the sender
571     @param context - sender context, to match reply w/ request
572     @param is_ip4 - 1 if address type is IPv4
573     @param user_addr - address of an inside user whose sessions to dump
574 */
575 define snat_det_session_dump {
576   u32 client_index;
577   u32 context;
578   u8 is_ip4;
579   u8 user_addr[16];
580 };
581
582 /** \brief S-NAT deterministic sessions reply
583     @param context - sender context, to match reply w/ request
584     @param is_ip4 - 1 if address type is IPv4
585     @param in_port - inside port
586     @param ext_addr - external host address
587     @param ext_port - external host port
588     @param out_port - outside NAT port
589     @param state - session state
590     @param expire - session expiration timestamp
591 */
592 define snat_det_session_details {
593   u32 client_index;
594   u32 context;
595   u8 is_ip4;
596   u16 in_port;
597   u8 ext_addr[16];
598   u16 ext_port;
599   u16 out_port;
600   u8 state;
601   u32 expire;
602 };
603
604 /** \brief Add/delete address range to NAT64 pool
605     @param client_index - opaque cookie to identify the sender
606     @param context - sender context, to match reply w/ request
607     @param start_addr - start address of the range
608     @param end_addr - end address of the range
609     @param vrf_id - VRF id of tenant, ~0 means independent of VRF
610     @param is_add - 1 if add, 0 if delete
611 */
612 autoreply define nat64_add_del_pool_addr_range {
613   u32 client_index;
614   u32 context;
615   u8 start_addr[4];
616   u8 end_addr[4];
617   u32 vrf_id;
618   u8 is_add;
619 };
620
621 /** \brief Dump NAT64 pool addresses
622     @param client_index - opaque cookie to identify the sender
623     @param context - sender context, to match reply w/ request
624 */
625 define nat64_pool_addr_dump {
626   u32 client_index;
627   u32 context;
628 };
629
630 /** \brief NAT64 pool address details response
631     @param context - sender context, to match reply w/ request
632     @param address - IPv4 address
633     @param vfr_id - VRF id of tenant, ~0 means independent of VRF
634 */
635 define nat64_pool_addr_details {
636   u32 context;
637   u8 address[4];
638   u32 vrf_id;
639 };
640
641 /** \brief Enable/disable NAT64 feature on the interface
642     @param client_index - opaque cookie to identify the sender
643     @param context - sender context, to match reply w/ request
644     @param sw_if_index - index of the interface
645     @param is_inside - 1 if inside, 0 if outside
646     @param is_add - 1 if add, 0 if delete
647 */
648 autoreply define nat64_add_del_interface {
649   u32 client_index;
650   u32 context;
651   u32 sw_if_index;
652   u8 is_inside;
653   u8 is_add;
654 };
655
656 /** \brief Dump interfaces with NAT64 feature
657     @param client_index - opaque cookie to identify the sender
658     @param context - sender context, to match reply w/ request
659 */
660 define nat64_interface_dump {
661   u32 client_index;
662   u32 context;
663 };
664
665 /** \brief NAT64 interface details response
666     @param context - sender context, to match reply w/ request
667     @param is_inside - 1 if inside, 0 if outside
668     @param sw_if_index - index of the interface
669 */
670 define nat64_interface_details {
671   u32 context;
672   u8 is_inside;
673   u32 sw_if_index;
674 };
675
676 /** \brief Add/delete NAT64 static BIB entry
677     @param client_index - opaque cookie to identify the sender
678     @param context - sender context, to match reply w/ request
679     @param i_addr - inside IPv6 address
680     @param o_addr - outside IPv4 address
681     @param i_port - inside port number
682     @param o_port - outside port number
683     @param vrf_id - VRF id of tenant
684     @param proto - protocol number
685     @param is_add - 1 if add, 0 if delete
686 */
687  autoreply define nat64_add_del_static_bib {
688   u32 client_index;
689   u32 context;
690   u8 i_addr[16];
691   u8 o_addr[4];
692   u16 i_port;
693   u16 o_port;
694   u32 vrf_id;
695   u8 proto;
696   u8 is_add;
697 };
698
699 /** \brief Dump NAT64 BIB
700     @param client_index - opaque cookie to identify the sender
701     @param context - sender context, to match reply w/ request
702     @param proto - protocol of the BIB
703 */
704 define nat64_bib_dump {
705   u32 client_index;
706   u32 context;
707   u8 proto;
708 };
709
710 /** \brief NAT64 BIB details response
711     @param context - sender context, to match reply w/ request
712     @param i_addr - inside IPv6 address
713     @param o_addr - outside IPv4 address
714     @param i_port - inside port number
715     @param o_port - outside port number
716     @param vrf_id - VRF id of tenant
717     @param proto - protocol number
718     @param is_static - 1 if static BIB entry, 0 if dynamic
719     @param ses_num - number of sessions associated with the BIB entry
720 */
721 define nat64_bib_details {
722   u32 context;
723   u8 i_addr[16];
724   u8 o_addr[4];
725   u16 i_port;
726   u16 o_port;
727   u32 vrf_id;
728   u8 proto;
729   u8 is_static;
730   u32 ses_num;
731 };
732
733 /** \brief Set values of timeouts for NAT64 (seconds, 0 = default)
734     @param client_index - opaque cookie to identify the sender
735     @param context - sender context, to match reply w/ request
736     @param udp - UDP timeout (default 300sec)
737     @param icmp - ICMP timeout (default 60sec)
738     @param tcp_trans - TCP transitory timeout (default 240sec)
739     @param tcp_est - TCP established timeout (default 7440sec)
740     @param tcp_incoming_syn - TCP incoming SYN timeout (default 6sec)
741 */
742 autoreply define nat64_set_timeouts {
743   u32 client_index;
744   u32 context;
745   u32 udp;
746   u32 icmp;
747   u32 tcp_trans;
748   u32 tcp_est;
749   u32 tcp_incoming_syn;
750 };
751
752 /** \brief Get values of timeouts for NAT64 (seconds)
753     @param client_index - opaque cookie to identify the sender
754     @param context - sender context, to match reply w/ request
755 */
756 define nat64_get_timeouts {
757   u32 client_index;
758   u32 context;
759 };
760
761 /** \brief Get values of timeouts for NAT64 reply
762     @param context - sender context, to match reply w/ request
763     @param retval - return code
764     @param udp - UDP timeout
765     @param icmp - ICMP timeout
766     @param tcp_trans - TCP transitory timeout
767     @param tcp_est - TCP established timeout
768     @param tcp_incoming_syn - TCP incoming SYN timeout
769 */
770 define nat64_get_timeouts_reply {
771   u32 context;
772   i32 retval;
773   u32 udp;
774   u32 icmp;
775   u32 tcp_trans;
776   u32 tcp_est;
777   u32 tcp_incoming_syn;
778 };
779
780 /** \brief Dump NAT64 session table
781     @param client_index - opaque cookie to identify the sender
782     @param context - sender context, to match reply w/ request
783     @param proto - protocol of the session table
784 */
785 define nat64_st_dump {
786   u32 client_index;
787   u32 context;
788   u8 proto;
789 };
790
791 /** \brief NAT64 session table details response
792     @param context - sender context, to match reply w/ request
793     @param il_addr - inside IPv6 address of the local host
794     @param ol_addr - outside IPv4 address of the local host
795     @param il_port - inside port number id of the local host/inside ICMP id
796     @param ol_port - outside port number of the local host/outside ICMP id
797     @param il_addr - inside IPv6 address of the remote host
798     @param ol_addr - outside IPv4 address of the remote host
799     @param l_port - port number of the remote host (not used for ICMP)
800     @param vrf_id - VRF id of tenant
801     @param proto - protocol number
802 */
803 define nat64_st_details {
804   u32 context;
805   u8 il_addr[16];
806   u8 ol_addr[4];
807   u16 il_port;
808   u16 ol_port;
809   u8 ir_addr[16];
810   u8 or_addr[4];
811   u16 r_port;
812   u32 vrf_id;
813   u8 proto;
814 };
815
816 /** \brief Add/del NAT64 prefix
817     @param client_index - opaque cookie to identify the sender
818     @param context - sender context, to match reply w/ request
819     @param prefix - NAT64 prefix
820     @param prefix - NAT64 prefix length
821     @param vrf_id - VRF id of tenant
822     @param is_add - 1 if add, 0 if delete
823 */
824 autoreply define nat64_add_del_prefix {
825   u32 client_index;
826   u32 context;
827   u8 prefix[16];
828   u8 prefix_len;
829   u32 vrf_id;
830   u8 is_add;
831 };
832
833 /** \brief Dump NAT64 prefix
834     @param client_index - opaque cookie to identify the sender
835     @param context - sender context, to match reply w/ request
836 */
837 define nat64_prefix_dump {
838   u32 client_index;
839   u32 context;
840 };
841
842 /** \brief Dump NAT64 prefix details response
843     @param context - sender context, to match reply w/ request
844     @param prefix - NAT64 prefix
845     @param prefix - NAT64 prefix length
846     @param vrf_id - VRF id of tenant
847 */
848 define nat64_prefix_details {
849   u32 context;
850   u8 prefix[16];
851   u8 prefix_len;
852   u32 vrf_id;
853 };