vppapigen: support per-file (major,minor,patch) version stamps
[vpp.git] / src / plugins / nat / nat.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 vl_api_version 1.0.0
17
18 /**
19  * @file nat.api
20  * @brief VPP control-plane API messages.
21  *
22  * This file defines VPP control-plane API messages which are generally
23  * called through a shared memory interface.
24  */
25
26 /*
27  * Old "snat" APIs, will be deprecated after 17.10
28  */
29
30 /** \brief Add/del NAT44 address range
31     @param client_index - opaque cookie to identify the sender
32     @param context - sender context, to match reply w/ request
33     @param is_ip4 - 1 if address type is IPv4
34     @param first_ip_address - first IP address
35     @param last_ip_address - last IP address
36     @param vrf_id - VRF id of tenant, ~0 means independent of VRF
37     @param is_add - 1 if add, 0 if delete
38 */
39 autoreply define snat_add_address_range {
40   u32 client_index;
41   u32 context;
42   u8 is_ip4;
43   u8 first_ip_address[16];
44   u8 last_ip_address[16];
45   u32 vrf_id;
46   u8 is_add;
47 };
48
49 /** \brief Dump NAT44 addresses
50     @param client_index - opaque cookie to identify the sender
51     @param context - sender context, to match reply w/ request
52 */
53 define snat_address_dump {
54   u32 client_index;
55   u32 context;
56 };
57
58 /** \brief NAT44 address details response
59     @param context - sender context, to match reply w/ request
60     @param is_ip4 - 1 if address type is IPv4
61     @param ip_address - IP address
62     @param vrf_id - VRF id of tenant, ~0 means independent of VRF
63 */
64 define snat_address_details {
65   u32 context;
66   u8 is_ip4;
67   u8 ip_address[16];
68   u32 vrf_id;
69 };
70
71 /** \brief Enable/disable NAT44 feature on the interface
72     @param client_index - opaque cookie to identify the sender
73     @param context - sender context, to match reply w/ request
74     @param is_add - 1 if add, 0 if delete
75     @param is_inside - 1 if inside, 0 if outside
76     @param sw_if_index - software index of the interface
77 */
78 autoreply define snat_interface_add_del_feature {
79   u32 client_index;
80   u32 context;
81   u8 is_add;
82   u8 is_inside;
83   u32 sw_if_index;
84 };
85
86 /** \brief Dump interfaces with NAT44 feature
87     @param client_index - opaque cookie to identify the sender
88     @param context - sender context, to match reply w/ request
89 */
90 define snat_interface_dump {
91   u32 client_index;
92   u32 context;
93 };
94
95 /** \brief NAT44 interface details response
96     @param context - sender context, to match reply w/ request
97     @param is_inside - 1 if inside, 0 if outside
98     @param sw_if_index - software index of the interface
99 */
100 define snat_interface_details {
101   u32 context;
102   u8 is_inside;
103   u32 sw_if_index;
104 };
105
106 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
107            in2out translation)
108     @param client_index - opaque cookie to identify the sender
109     @param context - sender context, to match reply w/ request
110     @param is_add - 1 if add, 0 if delete
111     @param is_inside - 1 if inside, 0 if outside
112     @param sw_if_index - software index of the interface
113 */
114 autoreply define snat_interface_add_del_output_feature {
115   u32 client_index;
116   u32 context;
117   u8 is_add;
118   u8 is_inside;
119   u32 sw_if_index;
120 };
121
122 /** \brief Dump interfaces with NAT44 output feature
123     @param client_index - opaque cookie to identify the sender
124     @param context - sender context, to match reply w/ request
125 */
126 define snat_interface_output_feature_dump {
127   u32 client_index;
128   u32 context;
129 };
130
131 /** \brief NAT44 interface with output feature details response
132     @param context - sender context, to match reply w/ request
133     @param is_inside - 1 if inside, 0 if outside
134     @param sw_if_index - software index of the interface
135 */
136 define snat_interface_output_feature_details {
137   u32 context;
138   u8 is_inside;
139   u32 sw_if_index;
140 };
141
142 /** \brief Add/delete NAT44 static mapping
143     @param client_index - opaque cookie to identify the sender
144     @param context - sender context, to match reply w/ request
145     @param is_add - 1 if add, 0 if delete
146     @param is_ip4 - 1 if address type is IPv4
147     @param addr_only - 1 if address only mapping
148     @param local_ip_address - local IP address
149     @param external_ip_address - external IP address
150     @param protocol - IP protocol
151     @param local_port - local port number
152     @param external_port - external port number
153     @param external_sw_if_index - external interface (if set
154                                   external_ip_address is ignored, ~0 means not
155                                   used)
156     @param vfr_id - VRF ID
157 */
158 autoreply define snat_add_static_mapping {
159   u32 client_index;
160   u32 context;
161   u8 is_add;
162   u8 is_ip4;
163   u8 addr_only;
164   u8 local_ip_address[16];
165   u8 external_ip_address[16];
166   u8 protocol;
167   u16 local_port;
168   u16 external_port;
169   u32 external_sw_if_index;
170   u32 vrf_id;
171 };
172
173 /** \brief Dump NAT44 static mappings
174     @param client_index - opaque cookie to identify the sender
175     @param context - sender context, to match reply w/ request
176 */
177 define snat_static_mapping_dump {
178   u32 client_index;
179   u32 context;
180 };
181
182 /** \brief NAT44 static mapping details response
183     @param context - sender context, to match reply w/ request
184     @param is_ip4 - 1 if address type is IPv4
185     @param addr_only - 1 if address only mapping
186     @param local_ip_address - local IP address
187     @param external_ip_address - external IP address
188     @param protocol - IP protocol
189     @param local_port - local port number
190     @param external_port - external port number
191     @param external_sw_if_index - external interface
192     @param vfr_id - VRF ID
193 */
194 define snat_static_mapping_details {
195   u32 context;
196   u8 is_ip4;
197   u8 addr_only;
198   u8 local_ip_address[16];
199   u8 external_ip_address[16];
200   u8 protocol;
201   u16 local_port;
202   u16 external_port;
203   u32 external_sw_if_index;
204   u32 vrf_id;
205 };
206
207 /** \brief Control ping from client to api server request
208     @param client_index - opaque cookie to identify the sender
209     @param context - sender context, to match reply w/ request
210 */
211 define snat_control_ping
212 {
213   u32 client_index;
214   u32 context;
215 };
216
217 /** \brief Control ping from the client to the server response
218     @param client_index - opaque cookie to identify the sender
219     @param context - sender context, to match reply w/ request
220     @param retval - return code for the request
221     @param vpe_pid - the pid of the vpe, returned by the server
222 */
223 define snat_control_ping_reply
224 {
225   u32 context;
226   i32 retval;
227   u32 client_index;
228   u32 vpe_pid;
229 };
230
231 /** \brief Show NAT plugin startup config
232     @param client_index - opaque cookie to identify the sender
233     @param context - sender context, to match reply w/ request
234 */
235 define snat_show_config
236 {
237   u32 client_index;
238   u32 context;
239 };
240
241 /** \brief Show NAT plugin startup config reply
242     @param context - sender context, to match reply w/ request
243     @param retval - return code for the request
244     @param static_mapping_only - if 1 dynamic translations disabled
245     @param static_mapping_connection_tracking - if 1 create session data
246     @param deterministic - if 1 deterministic mapping
247     @param translation_buckets - number of translation hash buckets
248     @param translation_memory_size - translation hash memory size
249     @param user_buckets - number of user hash buckets
250     @param user_memory_size - user hash memory size
251     @param max_translations_per_user - maximum number of translations per user
252     @param outside_vrf_id - outside VRF id
253     @param inside_vrf_id - default inside VRF id
254 */
255 define snat_show_config_reply
256 {
257   u32 context;
258   i32 retval;
259   u8 static_mapping_only;
260   u8 static_mapping_connection_tracking;
261   u8 deterministic;
262   u32 translation_buckets;
263   u32 translation_memory_size;
264   u32 user_buckets;
265   u32 user_memory_size;
266   u32 max_translations_per_user;
267   u32 outside_vrf_id;
268   u32 inside_vrf_id;
269 };
270
271 /** \brief Set NAT workers
272     @param client_index - opaque cookie to identify the sender
273     @param context - sender context, to match reply w/ request
274     @param worker_mask - NAT workers mask
275 */
276 autoreply define snat_set_workers {
277   u32 client_index;
278   u32 context;
279   u64 worker_mask;
280 };
281
282 /** \brief Dump NAT workers
283     @param client_index - opaque cookie to identify the sender
284     @param context - sender context, to match reply w/ request
285 */
286 define snat_worker_dump {
287   u32 client_index;
288   u32 context;
289 };
290
291 /** \brief NAT workers details response
292     @param context - sender context, to match reply w/ request
293     @param worker_index - worker index
294     @param lcore_id - lcore ID
295     @param name - worker name
296 */
297 define snat_worker_details {
298   u32 context;
299   u32 worker_index;
300   u32 lcore_id;
301   u8 name[64];
302 };
303
304 /** \brief Add/delete NAT44 pool address from specific interfce
305     @param client_index - opaque cookie to identify the sender
306     @param context - sender context, to match reply w/ request
307     @param is_add - 1 if add, 0 if delete
308     @param sw_if_index - software index of the interface
309 */
310 autoreply define snat_add_del_interface_addr {
311   u32 client_index;
312   u32 context;
313   u8 is_add;
314   u8 is_inside;
315   u32 sw_if_index;
316 };
317
318 /** \brief Dump NAT44 pool addresses interfaces
319     @param client_index - opaque cookie to identify the sender
320     @param context - sender context, to match reply w/ request
321 */
322 define snat_interface_addr_dump {
323   u32 client_index;
324   u32 context;
325 };
326
327 /** \brief NAT44 pool addresses interfaces details response
328     @param context - sender context, to match reply w/ request
329     @param sw_if_index - software index of the interface
330 */
331 define snat_interface_addr_details {
332   u32 context;
333   u32 sw_if_index;
334 };
335
336 /** \brief Enable/disable NAT IPFIX logging
337     @param client_index - opaque cookie to identify the sender
338     @param context - sender context, to match reply w/ request
339     @param domain_id - observation domain ID
340     @param src_port - source port number
341     @param enable - 1 if enable, 0 if disable
342 */
343 autoreply define snat_ipfix_enable_disable {
344   u32 client_index;
345   u32 context;
346   u32 domain_id;
347   u16 src_port;
348   u8 enable;
349 };
350
351 /** \brief Dump NAT44 users
352     @param client_index - opaque cookie to identify the sender
353     @param context - sender context, to match reply w/ request
354 */
355 define snat_user_dump {
356   u32 client_index;
357   u32 context;
358 };
359
360 /** \brief NAT44 users response
361     @param context - sender context, to match reply w/ request
362     @vrf_id - VRF ID
363     @param is_ip4 - 1 if address type is IPv4
364     @param ip_adress - IP address
365     @param nsessions - number of dynamic sessions
366     @param nstaticsessions - number of static sessions
367 */
368 define snat_user_details {
369   u32 context;
370   u32 vrf_id;
371   u8 is_ip4;
372   u8 ip_address[16];
373   u32 nsessions;
374   u32 nstaticsessions;
375 };
376
377 /** \brief NAT44 user's sessions
378     @param client_index - opaque cookie to identify the sender
379     @param context - sender context, to match reply w/ request
380     @param is_ip4 - 1 if address type is IPv4
381     @param user_ip - IP address of the user to dump
382     @param vrf_id - VRF_ID
383 */
384 define snat_user_session_dump {
385   u32 client_index;
386   u32 context;
387   u8 is_ip4;
388   u8 ip_address[16];
389   u32 vrf_id;
390 };
391
392 /** \brief NAT44 user's sessions response
393     @param context - sender context, to match reply w/ request
394     @param is_ip4 - 1 if address type is IPv4
395     @param outside_ip_address - outside IP address
396     @param outside_port - outside port
397     @param inside_ip_address - inside IP address
398     @param inside_port - inside port
399     @param protocol - protocol
400     @param is_static - 1 if session is static
401     @param last_heard - last heard timer
402     @param total_bytes - count of bytes sent through session
403     @param total_pkts - count of pakets sent through session
404 */
405 define snat_user_session_details {
406   u32 context;
407   u8 is_ip4;
408   u8 outside_ip_address[16];
409   u16 outside_port;
410   u8 inside_ip_address[16];
411   u16 inside_port;
412   u16 protocol;
413   u8 is_static;
414   u64 last_heard;
415   u64 total_bytes;
416   u32 total_pkts;
417 };
418
419 /** \brief Add/delete NAT deterministic mapping
420     @param client_index - opaque cookie to identify the sender
421     @param context - sender context, to match reply w/ request
422     @param is_add - 1 if add, 0 if delete
423     @param is_ip4 - 1 if address type is IPv4
424     @param in_addr - inside IP address
425     @param in_plen - inside IP address prefix length
426     @param out_addr - outside IP address
427     @param out_addr - outside IP address prefix length
428 */
429 autoreply define snat_add_det_map {
430   u32 client_index;
431   u32 context;
432   u8 is_add;
433   u8 is_ip4;
434   u8 addr_only;
435   u8 in_addr[16];
436   u8 in_plen;
437   u8 out_addr[16];
438   u8 out_plen;
439 };
440
441 /** \brief Get outside address and port range from inside address
442     @param client_index - opaque cookie to identify the sender
443     @param context - sender context, to match reply w/ request
444     @param is_ip4 - 1 if address type is IPv4
445     @param in_addr - inside IP address
446 */
447 define snat_det_forward {
448   u32 client_index;
449   u32 context;
450   u8 is_ip4;
451   u8 in_addr[16];
452 };
453
454 /** \brief Get outside address and port range from inside address
455     @param context - sender context, to match reply w/ request
456     @param retval - return code
457     @param out_port_lo - outside port range start
458     @param out_port_hi - outside port range end
459     @param is_ip4 - 1 if address type is IPv4
460     @param out_addr - outside IP address
461 */
462 define snat_det_forward_reply {
463   u32 context;
464   i32 retval;
465   u16 out_port_lo;
466   u16 out_port_hi;
467   u8 is_ip4;
468   u8 out_addr[16];
469 };
470
471 /** \brief Get inside address from outside address and port
472     @param client_index - opaque cookie to identify the sender
473     @param context - sender context, to match reply w/ request
474     @param out_port - outside port
475     @param is_ip4 - 1 if address type is IPv4
476     @param out_addr - outside IP address
477 */
478 define snat_det_reverse {
479   u32 client_index;
480   u32 context;
481   u16 out_port;
482   u8 is_ip4;
483   u8 out_addr[16];
484 };
485
486 /** \brief Get inside address from outside address and port reply
487     @param context - sender context, to match reply w/ request
488     @param retval - return code
489     @param is_ip4 - 1 if address type is IPv4
490     @param in_addr - inside IP address
491 */
492 define snat_det_reverse_reply {
493   u32 context;
494   i32 retval;
495   u8 is_ip4;
496   u8 in_addr[16];
497 };
498
499 /** \brief Dump NAT deterministic mappings
500     @param client_index - opaque cookie to identify the sender
501     @param context - sender context, to match reply w/ request
502 */
503 define snat_det_map_dump {
504   u32 client_index;
505   u32 context;
506 };
507
508 /** \brief NAT users response
509     @param context - sender context, to match reply w/ request
510     @param is_ip4 - 1 if address type is IPv4
511     @param in_addr - inside IP address
512     @param in_plen - inside IP address prefix length
513     @param out_addr - outside IP address
514     @param out_plen - outside IP address prefix length
515     @param sharing_ratio - outside to inside address sharing ratio
516     @param ports_per_host - number of ports available to a host
517     @param ses_num - number of sessions belonging to this mapping
518 */
519 define snat_det_map_details {
520   u32 context;
521   u8 is_ip4;
522   u8 in_addr[16];
523   u8 in_plen;
524   u8 out_addr[16];
525   u8 out_plen;
526   u32 sharing_ratio;
527   u16 ports_per_host;
528   u32 ses_num;
529 };
530
531 /** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
532     @param client_index - opaque cookie to identify the sender
533     @param context - sender context, to match reply w/ request
534     @param udp - UDP timeout (default 300sec)
535     @param tcp_established - TCP established timeout (default 7440sec)
536     @param tcp_transitory - TCP transitory timeout (default 240sec)
537     @param icmp - ICMP timeout (default 60sec)
538 */
539 autoreply define snat_det_set_timeouts {
540   u32 client_index;
541   u32 context;
542   u32 udp;
543   u32 tcp_established;
544   u32 tcp_transitory;
545   u32 icmp;
546 };
547
548 /** \brief Get values of timeouts for deterministic NAT (seconds)
549     @param client_index - opaque cookie to identify the sender
550     @param context - sender context, to match reply w/ request
551 */
552 define snat_det_get_timeouts {
553   u32 client_index;
554   u32 context;
555 };
556
557 /** \brief Get values of timeouts for deterministic NAT reply
558     @param context - sender context, to match reply w/ request
559     @param retval - return code
560     @param udp - UDP timeout (default 300sec)
561     @param tcp_established - TCP established timeout (default 7440sec)
562     @param tcp_transitory - TCP transitory timeout (default 240sec)
563     @param icmp - ICMP timeout (default 60sec)
564 */
565 define snat_det_get_timeouts_reply {
566   u32 context;
567   i32 retval;
568   u32 udp;
569   u32 tcp_established;
570   u32 tcp_transitory;
571   u32 icmp;
572 };
573
574 /** \brief Close deterministic NAT session by outside address and port
575     @param client_index - opaque cookie to identify the sender
576     @param context - sender context, to match reply w/ request
577     @param is_ip4 - 1 if address type is IPv4
578     @param out_addr - outside IP address
579     @param out_port - outside port
580     @param ext_addr - external host address
581     @param ext_port - external host port
582 */
583 autoreply define snat_det_close_session_out {
584   u32 client_index;
585   u32 context;
586   u8 is_ip4;
587   u8 out_addr[16];
588   u16 out_port;
589   u8 ext_addr[16];
590   u16 ext_port;
591 };
592
593 /** \brief Close deterministic NAT session by inside address and port
594     @param client_index - opaque cookie to identify the sender
595     @param context - sender context, to match reply w/ request
596     @param is_ip4 - 1 if address type is IPv4
597     @param in_addr - inside IP address
598     @param in_port - inside port
599     @param ext_addr - external host address
600     @param ext_port - external host port
601 */
602 autoreply define snat_det_close_session_in {
603   u32 client_index;
604   u32 context;
605   u8 is_ip4;
606   u8 in_addr[16];
607   u16 in_port;
608   u8 ext_addr[16];
609   u16 ext_port;
610 };
611
612 /** \brief Dump determinstic NAT sessions
613     @param client_index - opaque cookie to identify the sender
614     @param context - sender context, to match reply w/ request
615     @param is_ip4 - 1 if address type is IPv4
616     @param user_addr - address of an inside user whose sessions to dump
617 */
618 define snat_det_session_dump {
619   u32 client_index;
620   u32 context;
621   u8 is_ip4;
622   u8 user_addr[16];
623 };
624
625 /** \brief Deterministic NAT sessions reply
626     @param context - sender context, to match reply w/ request
627     @param is_ip4 - 1 if address type is IPv4
628     @param in_port - inside port
629     @param ext_addr - external host address
630     @param ext_port - external host port
631     @param out_port - outside NAT port
632     @param state - session state
633     @param expire - session expiration timestamp
634 */
635 define snat_det_session_details {
636   u32 client_index;
637   u32 context;
638   u8 is_ip4;
639   u16 in_port;
640   u8 ext_addr[16];
641   u16 ext_port;
642   u16 out_port;
643   u8 state;
644   u32 expire;
645 };
646
647 /*
648  * Common NAT plugin APIs
649  */
650
651 /** \brief Control ping from client to api server request
652     @param client_index - opaque cookie to identify the sender
653     @param context - sender context, to match reply w/ request
654 */
655 define nat_control_ping
656 {
657   u32 client_index;
658   u32 context;
659 };
660
661 /** \brief Control ping from the client to the server response
662     @param client_index - opaque cookie to identify the sender
663     @param context - sender context, to match reply w/ request
664     @param retval - return code for the request
665     @param vpe_pid - the pid of the vpe, returned by the server
666 */
667 define nat_control_ping_reply
668 {
669   u32 context;
670   i32 retval;
671   u32 client_index;
672   u32 vpe_pid;
673 };
674
675 /** \brief Show NAT plugin startup config
676     @param client_index - opaque cookie to identify the sender
677     @param context - sender context, to match reply w/ request
678 */
679 define nat_show_config
680 {
681   u32 client_index;
682   u32 context;
683 };
684
685 /** \brief Show NAT plugin startup config reply
686     @param context - sender context, to match reply w/ request
687     @param retval - return code for the request
688     @param static_mapping_only - if 1 dynamic translations disabled
689     @param static_mapping_connection_tracking - if 1 create session data
690     @param deterministic - if 1 deterministic mapping
691     @param translation_buckets - number of translation hash buckets
692     @param translation_memory_size - translation hash memory size
693     @param user_buckets - number of user hash buckets
694     @param user_memory_size - user hash memory size
695     @param max_translations_per_user - maximum number of translations per user
696     @param outside_vrf_id - outside VRF id
697     @param inside_vrf_id - default inside VRF id
698 */
699 define nat_show_config_reply
700 {
701   u32 context;
702   i32 retval;
703   u8 static_mapping_only;
704   u8 static_mapping_connection_tracking;
705   u8 deterministic;
706   u32 translation_buckets;
707   u32 translation_memory_size;
708   u32 user_buckets;
709   u32 user_memory_size;
710   u32 max_translations_per_user;
711   u32 outside_vrf_id;
712   u32 inside_vrf_id;
713 };
714
715 /** \brief Set NAT workers
716     @param client_index - opaque cookie to identify the sender
717     @param context - sender context, to match reply w/ request
718     @param worker_mask - NAT workers mask
719 */
720 autoreply define nat_set_workers {
721   u32 client_index;
722   u32 context;
723   u64 worker_mask;
724 };
725
726 /** \brief Dump NAT workers
727     @param client_index - opaque cookie to identify the sender
728     @param context - sender context, to match reply w/ request
729 */
730 define nat_worker_dump {
731   u32 client_index;
732   u32 context;
733 };
734
735 /** \brief NAT workers details response
736     @param context - sender context, to match reply w/ request
737     @param worker_index - worker index
738     @param lcore_id - lcore ID
739     @param name - worker name
740 */
741 define nat_worker_details {
742   u32 context;
743   u32 worker_index;
744   u32 lcore_id;
745   u8 name[64];
746 };
747
748 /** \brief Enable/disable NAT IPFIX logging
749     @param client_index - opaque cookie to identify the sender
750     @param context - sender context, to match reply w/ request
751     @param domain_id - observation domain ID
752     @param src_port - source port number
753     @param enable - 1 if enable, 0 if disable
754 */
755 autoreply define nat_ipfix_enable_disable {
756   u32 client_index;
757   u32 context;
758   u32 domain_id;
759   u16 src_port;
760   u8 enable;
761 };
762
763 /*
764  * NAT44 APIs
765  */
766
767 /** \brief Add/del NAT44 address range
768     @param client_index - opaque cookie to identify the sender
769     @param context - sender context, to match reply w/ request
770     @param first_ip_address - first IPv4 address
771     @param last_ip_address - last IPv4 address
772     @param vrf_id - VRF id of tenant, ~0 means independent of VRF
773     @param is_add - 1 if add, 0 if delete
774 */
775 autoreply define nat44_add_del_address_range {
776   u32 client_index;
777   u32 context;
778   u8 first_ip_address[4];
779   u8 last_ip_address[4];
780   u32 vrf_id;
781   u8 is_add;
782 };
783
784 /** \brief Dump NAT44 addresses
785     @param client_index - opaque cookie to identify the sender
786     @param context - sender context, to match reply w/ request
787 */
788 define nat44_address_dump {
789   u32 client_index;
790   u32 context;
791 };
792
793 /** \brief NAT44 address details response
794     @param context - sender context, to match reply w/ request
795     @param ip_address - IPv4 address
796     @param vrf_id - VRF id of tenant, ~0 means independent of VRF
797 */
798 define nat44_address_details {
799   u32 context;
800   u8 ip_address[4];
801   u32 vrf_id;
802 };
803
804 /** \brief Enable/disable NAT44 feature on the interface
805     @param client_index - opaque cookie to identify the sender
806     @param context - sender context, to match reply w/ request
807     @param is_add - 1 if add, 0 if delete
808     @param is_inside - 1 if inside, 0 if outside
809     @param sw_if_index - software index of the interface
810 */
811 autoreply define nat44_interface_add_del_feature {
812   u32 client_index;
813   u32 context;
814   u8 is_add;
815   u8 is_inside;
816   u32 sw_if_index;
817 };
818
819 /** \brief Dump interfaces with NAT44 feature
820     @param client_index - opaque cookie to identify the sender
821     @param context - sender context, to match reply w/ request
822 */
823 define nat44_interface_dump {
824   u32 client_index;
825   u32 context;
826 };
827
828 /** \brief NAT44 interface details response
829     @param context - sender context, to match reply w/ request
830     @param is_inside - 1 if inside, 0 if outside
831     @param sw_if_index - software index of the interface
832 */
833 define nat44_interface_details {
834   u32 context;
835   u8 is_inside;
836   u32 sw_if_index;
837 };
838
839 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
840            in2out translation)
841     @param client_index - opaque cookie to identify the sender
842     @param context - sender context, to match reply w/ request
843     @param is_add - 1 if add, 0 if delete
844     @param is_inside - 1 if inside, 0 if outside
845     @param sw_if_index - software index of the interface
846 */
847 autoreply define nat44_interface_add_del_output_feature {
848   u32 client_index;
849   u32 context;
850   u8 is_add;
851   u8 is_inside;
852   u32 sw_if_index;
853 };
854
855 /** \brief Dump interfaces with NAT44 output feature
856     @param client_index - opaque cookie to identify the sender
857     @param context - sender context, to match reply w/ request
858 */
859 define nat44_interface_output_feature_dump {
860   u32 client_index;
861   u32 context;
862 };
863
864 /** \brief NAT44 interface with output feature details response
865     @param context - sender context, to match reply w/ request
866     @param is_inside - 1 if inside, 0 if outside
867     @param sw_if_index - software index of the interface
868 */
869 define nat44_interface_output_feature_details {
870   u32 context;
871   u8 is_inside;
872   u32 sw_if_index;
873 };
874
875 /** \brief Add/delete NAT44 static mapping
876     @param client_index - opaque cookie to identify the sender
877     @param context - sender context, to match reply w/ request
878     @param is_add - 1 if add, 0 if delete
879     @param addr_only - 1 if address only mapping
880     @param local_ip_address - local IPv4 address
881     @param external_ip_address - external IPv4 address
882     @param protocol - IP protocol
883     @param local_port - local port number
884     @param external_port - external port number
885     @param external_sw_if_index - external interface (if set
886                                   external_ip_address is ignored, ~0 means not
887                                   used)
888     @param vfr_id - VRF ID
889 */
890 autoreply define nat44_add_del_static_mapping {
891   u32 client_index;
892   u32 context;
893   u8 is_add;
894   u8 addr_only;
895   u8 local_ip_address[4];
896   u8 external_ip_address[4];
897   u8 protocol;
898   u16 local_port;
899   u16 external_port;
900   u32 external_sw_if_index;
901   u32 vrf_id;
902 };
903
904 /** \brief Dump NAT44 static mappings
905     @param client_index - opaque cookie to identify the sender
906     @param context - sender context, to match reply w/ request
907 */
908 define nat44_static_mapping_dump {
909   u32 client_index;
910   u32 context;
911 };
912
913 /** \brief NAT44 static mapping details response
914     @param context - sender context, to match reply w/ request
915     @param addr_only - 1 if address only mapping
916     @param local_ip_address - local IPv4 address
917     @param external_ip_address - external IPv4 address
918     @param protocol - IP protocol
919     @param local_port - local port number
920     @param external_port - external port number
921     @param external_sw_if_index - external interface
922     @param vfr_id - VRF ID
923 */
924 define nat44_static_mapping_details {
925   u32 context;
926   u8 addr_only;
927   u8 local_ip_address[4];
928   u8 external_ip_address[4];
929   u8 protocol;
930   u16 local_port;
931   u16 external_port;
932   u32 external_sw_if_index;
933   u32 vrf_id;
934 };
935
936 /** \brief Add/delete NAT44 pool address from specific interfce
937     @param client_index - opaque cookie to identify the sender
938     @param context - sender context, to match reply w/ request
939     @param is_add - 1 if add, 0 if delete
940     @param sw_if_index - software index of the interface
941 */
942 autoreply define nat44_add_del_interface_addr {
943   u32 client_index;
944   u32 context;
945   u8 is_add;
946   u8 is_inside;
947   u32 sw_if_index;
948 };
949
950 /** \brief Dump NAT44 pool addresses interfaces
951     @param client_index - opaque cookie to identify the sender
952     @param context - sender context, to match reply w/ request
953 */
954 define nat44_interface_addr_dump {
955   u32 client_index;
956   u32 context;
957 };
958
959 /** \brief NAT44 pool addresses interfaces details response
960     @param context - sender context, to match reply w/ request
961     @param sw_if_index - software index of the interface
962 */
963 define nat44_interface_addr_details {
964   u32 context;
965   u32 sw_if_index;
966 };
967
968 /** \brief Dump NAT44 users
969     @param client_index - opaque cookie to identify the sender
970     @param context - sender context, to match reply w/ request
971 */
972 define nat44_user_dump {
973   u32 client_index;
974   u32 context;
975 };
976
977 /** \brief NAT44 users response
978     @param context - sender context, to match reply w/ request
979     @vrf_id - VRF ID
980     @param ip_adress - IPv4 address
981     @param nsessions - number of dynamic sessions
982     @param nstaticsessions - number of static sessions
983 */
984 define nat44_user_details {
985   u32 context;
986   u32 vrf_id;
987   u8 ip_address[4];
988   u32 nsessions;
989   u32 nstaticsessions;
990 };
991
992 /** \brief NAT44 user's sessions
993     @param client_index - opaque cookie to identify the sender
994     @param context - sender context, to match reply w/ request
995     @param is_ip4 - 1 if address type is IPv4
996     @param user_ip - IP address of the user to dump
997     @param vrf_id - VRF_ID
998 */
999 define nat44_user_session_dump {
1000   u32 client_index;
1001   u32 context;
1002   u8 ip_address[4];
1003   u32 vrf_id;
1004 };
1005
1006 /** \brief NAT44 user's sessions response
1007     @param context - sender context, to match reply w/ request
1008     @param outside_ip_address - outside IPv4 address
1009     @param outside_port - outside port
1010     @param inside_ip_address - inside IPv4 address
1011     @param inside_port - inside port
1012     @param protocol - protocol
1013     @param is_static - 1 if session is static
1014     @param last_heard - last heard timer
1015     @param total_bytes - count of bytes sent through session
1016     @param total_pkts - count of pakets sent through session
1017 */
1018 define nat44_user_session_details {
1019   u32 context;
1020   u8 outside_ip_address[4];
1021   u16 outside_port;
1022   u8 inside_ip_address[4];
1023   u16 inside_port;
1024   u16 protocol;
1025   u8 is_static;
1026   u64 last_heard;
1027   u64 total_bytes;
1028   u32 total_pkts;
1029 };
1030
1031 typeonly manual_endian define nat44_lb_addr_port {
1032   u8 addr[4];
1033   u16 port;
1034   u8 probability;
1035 };
1036
1037 autoreply manual_endian define nat44_add_del_lb_static_mapping {
1038   u32 client_index;
1039   u32 context;
1040   u8 is_add;
1041   u8 external_addr[4];
1042   u16 external_port;
1043   u8 protocol;
1044   u32 vrf_id;
1045   u8 local_num;
1046   vl_api_nat44_lb_addr_port_t locals[local_num];
1047 };
1048
1049 define nat44_lb_static_mapping_dump {
1050   u32 client_index;
1051   u32 context;
1052 };
1053
1054 manual_endian define nat44_lb_static_mapping_details {
1055   u32 context;
1056   u8 external_addr[4];
1057   u16 external_port;
1058   u8 protocol;
1059   u32 vrf_id;
1060   u8 local_num;
1061   vl_api_nat44_lb_addr_port_t locals[local_num];
1062 };
1063
1064 /*
1065  * Deterministic NAT (CGN) APIs
1066  */
1067
1068 /** \brief Add/delete NAT deterministic mapping
1069     @param client_index - opaque cookie to identify the sender
1070     @param context - sender context, to match reply w/ request
1071     @param is_add - 1 if add, 0 if delete
1072     @param is_nat44 - 1 if NAT44
1073     @param in_addr - inside IP address
1074     @param in_plen - inside IP address prefix length
1075     @param out_addr - outside IPv4 address
1076     @param out_addr - outside IPv4 address prefix length
1077 */
1078 autoreply define nat_det_add_del_map {
1079   u32 client_index;
1080   u32 context;
1081   u8 is_add;
1082   u8 is_nat44;
1083   u8 addr_only;
1084   u8 in_addr[16];
1085   u8 in_plen;
1086   u8 out_addr[4];
1087   u8 out_plen;
1088 };
1089
1090 /** \brief Get outside address and port range from inside address
1091     @param client_index - opaque cookie to identify the sender
1092     @param context - sender context, to match reply w/ request
1093     @param is_nat44 - 1 if NAT44
1094     @param in_addr - inside IP address
1095 */
1096 define nat_det_forward {
1097   u32 client_index;
1098   u32 context;
1099   u8 is_nat44;
1100   u8 in_addr[16];
1101 };
1102
1103 /** \brief Get outside address and port range from inside address
1104     @param context - sender context, to match reply w/ request
1105     @param retval - return code
1106     @param out_port_lo - outside port range start
1107     @param out_port_hi - outside port range end
1108     @param out_addr - outside IPv4 address
1109 */
1110 define nat_det_forward_reply {
1111   u32 context;
1112   i32 retval;
1113   u16 out_port_lo;
1114   u16 out_port_hi;
1115   u8 out_addr[4];
1116 };
1117
1118 /** \brief Get inside address from outside address and port
1119     @param client_index - opaque cookie to identify the sender
1120     @param context - sender context, to match reply w/ request
1121     @param out_port - outside port
1122     @param out_addr - outside IPv4 address
1123 */
1124 define nat_det_reverse {
1125   u32 client_index;
1126   u32 context;
1127   u16 out_port;
1128   u8 out_addr[4];
1129 };
1130
1131 /** \brief Get inside address from outside address and port reply
1132     @param context - sender context, to match reply w/ request
1133     @param retval - return code
1134     @param is_nat44 - 1 if NAT44
1135     @param in_addr - inside IP address
1136 */
1137 define nat_det_reverse_reply {
1138   u32 context;
1139   i32 retval;
1140   u8 is_nat44;
1141   u8 in_addr[16];
1142 };
1143
1144 /** \brief Dump NAT deterministic mappings
1145     @param client_index - opaque cookie to identify the sender
1146     @param context - sender context, to match reply w/ request
1147 */
1148 define nat_det_map_dump {
1149   u32 client_index;
1150   u32 context;
1151 };
1152
1153 /** \brief NAT users response
1154     @param context - sender context, to match reply w/ request
1155     @param is_nat44 - 1 if NAT44
1156     @param in_addr - inside IP address
1157     @param in_plen - inside IP address prefix length
1158     @param out_addr - outside IPv4 address
1159     @param out_plen - outside IPv4 address prefix length
1160     @param sharing_ratio - outside to inside address sharing ratio
1161     @param ports_per_host - number of ports available to a host
1162     @param ses_num - number of sessions belonging to this mapping
1163 */
1164 define nat_det_map_details {
1165   u32 context;
1166   u8 is_nat44;
1167   u8 in_addr[16];
1168   u8 in_plen;
1169   u8 out_addr[4];
1170   u8 out_plen;
1171   u32 sharing_ratio;
1172   u16 ports_per_host;
1173   u32 ses_num;
1174 };
1175
1176 /** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
1177     @param client_index - opaque cookie to identify the sender
1178     @param context - sender context, to match reply w/ request
1179     @param udp - UDP timeout (default 300sec)
1180     @param tcp_established - TCP established timeout (default 7440sec)
1181     @param tcp_transitory - TCP transitory timeout (default 240sec)
1182     @param icmp - ICMP timeout (default 60sec)
1183 */
1184 autoreply define nat_det_set_timeouts {
1185   u32 client_index;
1186   u32 context;
1187   u32 udp;
1188   u32 tcp_established;
1189   u32 tcp_transitory;
1190   u32 icmp;
1191 };
1192
1193 /** \brief Get values of timeouts for deterministic NAT (seconds)
1194     @param client_index - opaque cookie to identify the sender
1195     @param context - sender context, to match reply w/ request
1196 */
1197 define nat_det_get_timeouts {
1198   u32 client_index;
1199   u32 context;
1200 };
1201
1202 /** \brief Get values of timeouts for deterministic NAT reply
1203     @param context - sender context, to match reply w/ request
1204     @param retval - return code
1205     @param udp - UDP timeout (default 300sec)
1206     @param tcp_established - TCP established timeout (default 7440sec)
1207     @param tcp_transitory - TCP transitory timeout (default 240sec)
1208     @param icmp - ICMP timeout (default 60sec)
1209 */
1210 define nat_det_get_timeouts_reply {
1211   u32 context;
1212   i32 retval;
1213   u32 udp;
1214   u32 tcp_established;
1215   u32 tcp_transitory;
1216   u32 icmp;
1217 };
1218
1219 /** \brief Close deterministic NAT session by outside address and port
1220     @param client_index - opaque cookie to identify the sender
1221     @param context - sender context, to match reply w/ request
1222     @param out_addr - outside IPv4 address
1223     @param out_port - outside port
1224     @param ext_addr - external host IPv4 address
1225     @param ext_port - external host port
1226 */
1227 autoreply define nat_det_close_session_out {
1228   u32 client_index;
1229   u32 context;
1230   u8 out_addr[4];
1231   u16 out_port;
1232   u8 ext_addr[4];
1233   u16 ext_port;
1234 };
1235
1236 /** \brief Close deterministic NAT session by inside address and port
1237     @param client_index - opaque cookie to identify the sender
1238     @param context - sender context, to match reply w/ request
1239     @param is_nat44 - 1 if NAT44
1240     @param in_addr - inside IP address
1241     @param in_port - inside port
1242     @param ext_addr - external host IP address
1243     @param ext_port - external host port
1244 */
1245 autoreply define nat_det_close_session_in {
1246   u32 client_index;
1247   u32 context;
1248   u8 is_nat44;
1249   u8 in_addr[16];
1250   u16 in_port;
1251   u8 ext_addr[16];
1252   u16 ext_port;
1253 };
1254
1255 /** \brief Dump determinstic NAT sessions
1256     @param client_index - opaque cookie to identify the sender
1257     @param context - sender context, to match reply w/ request
1258     @param is_nat44 - 1 if NAT44
1259     @param user_addr - address of an inside user whose sessions to dump
1260 */
1261 define nat_det_session_dump {
1262   u32 client_index;
1263   u32 context;
1264   u8 is_nat44;
1265   u8 user_addr[16];
1266 };
1267
1268 /** \brief Deterministic NAT sessions reply
1269     @param context - sender context, to match reply w/ request
1270     @param in_port - inside port
1271     @param ext_addr - external host address
1272     @param ext_port - external host port
1273     @param out_port - outside NAT port
1274     @param state - session state
1275     @param expire - session expiration timestamp
1276 */
1277 define nat_det_session_details {
1278   u32 client_index;
1279   u32 context;
1280   u16 in_port;
1281   u8 ext_addr[4];
1282   u16 ext_port;
1283   u16 out_port;
1284   u8 state;
1285   u32 expire;
1286 };
1287
1288 /*
1289  * NAT64 APIs
1290  */
1291
1292 /** \brief Add/delete address range to NAT64 pool
1293     @param client_index - opaque cookie to identify the sender
1294     @param context - sender context, to match reply w/ request
1295     @param start_addr - start address of the range
1296     @param end_addr - end address of the range
1297     @param vrf_id - VRF id of tenant, ~0 means independent of VRF
1298     @param is_add - 1 if add, 0 if delete
1299 */
1300 autoreply define nat64_add_del_pool_addr_range {
1301   u32 client_index;
1302   u32 context;
1303   u8 start_addr[4];
1304   u8 end_addr[4];
1305   u32 vrf_id;
1306   u8 is_add;
1307 };
1308
1309 /** \brief Dump NAT64 pool addresses
1310     @param client_index - opaque cookie to identify the sender
1311     @param context - sender context, to match reply w/ request
1312 */
1313 define nat64_pool_addr_dump {
1314   u32 client_index;
1315   u32 context;
1316 };
1317
1318 /** \brief NAT64 pool address details response
1319     @param context - sender context, to match reply w/ request
1320     @param address - IPv4 address
1321     @param vfr_id - VRF id of tenant, ~0 means independent of VRF
1322 */
1323 define nat64_pool_addr_details {
1324   u32 context;
1325   u8 address[4];
1326   u32 vrf_id;
1327 };
1328
1329 /** \brief Enable/disable NAT64 feature on the interface
1330     @param client_index - opaque cookie to identify the sender
1331     @param context - sender context, to match reply w/ request
1332     @param sw_if_index - index of the interface
1333     @param is_inside - 1 if inside, 0 if outside
1334     @param is_add - 1 if add, 0 if delete
1335 */
1336 autoreply define nat64_add_del_interface {
1337   u32 client_index;
1338   u32 context;
1339   u32 sw_if_index;
1340   u8 is_inside;
1341   u8 is_add;
1342 };
1343
1344 /** \brief Dump interfaces with NAT64 feature
1345     @param client_index - opaque cookie to identify the sender
1346     @param context - sender context, to match reply w/ request
1347 */
1348 define nat64_interface_dump {
1349   u32 client_index;
1350   u32 context;
1351 };
1352
1353 /** \brief NAT64 interface details response
1354     @param context - sender context, to match reply w/ request
1355     @param is_inside - 1 if inside, 0 if outside
1356     @param sw_if_index - index of the interface
1357 */
1358 define nat64_interface_details {
1359   u32 context;
1360   u8 is_inside;
1361   u32 sw_if_index;
1362 };
1363
1364 /** \brief Add/delete NAT64 static BIB entry
1365     @param client_index - opaque cookie to identify the sender
1366     @param context - sender context, to match reply w/ request
1367     @param i_addr - inside IPv6 address
1368     @param o_addr - outside IPv4 address
1369     @param i_port - inside port number
1370     @param o_port - outside port number
1371     @param vrf_id - VRF id of tenant
1372     @param proto - protocol number
1373     @param is_add - 1 if add, 0 if delete
1374 */
1375  autoreply define nat64_add_del_static_bib {
1376   u32 client_index;
1377   u32 context;
1378   u8 i_addr[16];
1379   u8 o_addr[4];
1380   u16 i_port;
1381   u16 o_port;
1382   u32 vrf_id;
1383   u8 proto;
1384   u8 is_add;
1385 };
1386
1387 /** \brief Dump NAT64 BIB
1388     @param client_index - opaque cookie to identify the sender
1389     @param context - sender context, to match reply w/ request
1390     @param proto - protocol of the BIB: 255 - all BIBs
1391                                         6 - TCP BIB
1392                                         17 - UDP BIB
1393                                         1/58 - ICMP BIB
1394                                         otherwise - "unknown" protocol BIB
1395 */
1396 define nat64_bib_dump {
1397   u32 client_index;
1398   u32 context;
1399   u8 proto;
1400 };
1401
1402 /** \brief NAT64 BIB details response
1403     @param context - sender context, to match reply w/ request
1404     @param i_addr - inside IPv6 address
1405     @param o_addr - outside IPv4 address
1406     @param i_port - inside port number
1407     @param o_port - outside port number
1408     @param vrf_id - VRF id of tenant
1409     @param proto - protocol number
1410     @param is_static - 1 if static BIB entry, 0 if dynamic
1411     @param ses_num - number of sessions associated with the BIB entry
1412 */
1413 define nat64_bib_details {
1414   u32 context;
1415   u8 i_addr[16];
1416   u8 o_addr[4];
1417   u16 i_port;
1418   u16 o_port;
1419   u32 vrf_id;
1420   u8 proto;
1421   u8 is_static;
1422   u32 ses_num;
1423 };
1424
1425 /** \brief Set values of timeouts for NAT64 (seconds, 0 = default)
1426     @param client_index - opaque cookie to identify the sender
1427     @param context - sender context, to match reply w/ request
1428     @param udp - UDP timeout (default 300sec)
1429     @param icmp - ICMP timeout (default 60sec)
1430     @param tcp_trans - TCP transitory timeout (default 240sec)
1431     @param tcp_est - TCP established timeout (default 7440sec)
1432     @param tcp_incoming_syn - TCP incoming SYN timeout (default 6sec)
1433 */
1434 autoreply define nat64_set_timeouts {
1435   u32 client_index;
1436   u32 context;
1437   u32 udp;
1438   u32 icmp;
1439   u32 tcp_trans;
1440   u32 tcp_est;
1441   u32 tcp_incoming_syn;
1442 };
1443
1444 /** \brief Get values of timeouts for NAT64 (seconds)
1445     @param client_index - opaque cookie to identify the sender
1446     @param context - sender context, to match reply w/ request
1447 */
1448 define nat64_get_timeouts {
1449   u32 client_index;
1450   u32 context;
1451 };
1452
1453 /** \brief Get values of timeouts for NAT64 reply
1454     @param context - sender context, to match reply w/ request
1455     @param retval - return code
1456     @param udp - UDP timeout
1457     @param icmp - ICMP timeout
1458     @param tcp_trans - TCP transitory timeout
1459     @param tcp_est - TCP established timeout
1460     @param tcp_incoming_syn - TCP incoming SYN timeout
1461 */
1462 define nat64_get_timeouts_reply {
1463   u32 context;
1464   i32 retval;
1465   u32 udp;
1466   u32 icmp;
1467   u32 tcp_trans;
1468   u32 tcp_est;
1469   u32 tcp_incoming_syn;
1470 };
1471
1472 /** \brief Dump NAT64 session table
1473     @param client_index - opaque cookie to identify the sender
1474     @param context - sender context, to match reply w/ request
1475     @param proto - protocol of the session table: 255 - all STs
1476                                                   6 - TCP ST
1477                                                   17 - UDP ST
1478                                                   1/58 - ICMP ST
1479                                                   otherwise - "unknown" proto ST
1480 */
1481 define nat64_st_dump {
1482   u32 client_index;
1483   u32 context;
1484   u8 proto;
1485 };
1486
1487 /** \brief NAT64 session table details response
1488     @param context - sender context, to match reply w/ request
1489     @param il_addr - inside IPv6 address of the local host
1490     @param ol_addr - outside IPv4 address of the local host
1491     @param il_port - inside port number id of the local host/inside ICMP id
1492     @param ol_port - outside port number of the local host/outside ICMP id
1493     @param il_addr - inside IPv6 address of the remote host
1494     @param ol_addr - outside IPv4 address of the remote host
1495     @param l_port - port number of the remote host (not used for ICMP)
1496     @param vrf_id - VRF id of tenant
1497     @param proto - protocol number
1498 */
1499 define nat64_st_details {
1500   u32 context;
1501   u8 il_addr[16];
1502   u8 ol_addr[4];
1503   u16 il_port;
1504   u16 ol_port;
1505   u8 ir_addr[16];
1506   u8 or_addr[4];
1507   u16 r_port;
1508   u32 vrf_id;
1509   u8 proto;
1510 };
1511
1512 /** \brief Add/del NAT64 prefix
1513     @param client_index - opaque cookie to identify the sender
1514     @param context - sender context, to match reply w/ request
1515     @param prefix - NAT64 prefix
1516     @param prefix - NAT64 prefix length
1517     @param vrf_id - VRF id of tenant
1518     @param is_add - 1 if add, 0 if delete
1519 */
1520 autoreply define nat64_add_del_prefix {
1521   u32 client_index;
1522   u32 context;
1523   u8 prefix[16];
1524   u8 prefix_len;
1525   u32 vrf_id;
1526   u8 is_add;
1527 };
1528
1529 /** \brief Dump NAT64 prefix
1530     @param client_index - opaque cookie to identify the sender
1531     @param context - sender context, to match reply w/ request
1532 */
1533 define nat64_prefix_dump {
1534   u32 client_index;
1535   u32 context;
1536 };
1537
1538 /** \brief Dump NAT64 prefix details response
1539     @param context - sender context, to match reply w/ request
1540     @param prefix - NAT64 prefix
1541     @param prefix - NAT64 prefix length
1542     @param vrf_id - VRF id of tenant
1543 */
1544 define nat64_prefix_details {
1545   u32 context;
1546   u8 prefix[16];
1547   u8 prefix_len;
1548   u32 vrf_id;
1549 };