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