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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 option version = "4.0.0";
20 * @brief VPP control-plane API messages.
22 * This file defines VPP control-plane API messages which are generally
23 * called through a shared memory interface.
27 * Common NAT plugin APIs
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
34 define nat_control_ping
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
46 define nat_control_ping_reply
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
58 define nat_show_config
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
85 define nat_show_config_reply
89 u8 static_mapping_only;
90 u8 static_mapping_connection_tracking;
92 u8 endpoint_dependent;
94 u32 translation_buckets;
95 u32 translation_memory_size;
98 u32 max_translations_per_user;
102 u32 nat64_bib_buckets;
103 u32 nat64_bib_memory_size;
104 u32 nat64_st_buckets;
105 u32 nat64_st_memory_size;
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
113 autoreply define nat_set_workers {
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
123 define nat_worker_dump {
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
134 define nat_worker_details {
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
148 autoreply define nat_ipfix_enable_disable {
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
165 autoreply define nat_set_reass {
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
179 define nat_get_reass {
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
196 define nat_get_reass_reply {
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
213 define nat_reass_dump {
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
227 define nat_reass_details {
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)
245 autoreply define nat_set_timeouts {
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
258 define nat_get_timeouts {
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
271 define nat_get_timeouts_reply {
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
292 autoreply define nat_set_addr_and_port_alloc_alg {
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
307 define nat_get_addr_and_port_alloc_alg {
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
324 define nat_get_addr_and_port_alloc_alg_reply {
339 /** \brief Add/del NAT44 address range
340 @param client_index - opaque cookie to identify the sender
341 @param context - sender context, to match reply w/ request
342 @param first_ip_address - first IPv4 address
343 @param last_ip_address - last IPv4 address
344 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
345 @param twice_nat - twice NAT address range for extenal hosts
346 @param is_add - 1 if add, 0 if delete
348 autoreply define nat44_add_del_address_range {
351 u8 first_ip_address[4];
352 u8 last_ip_address[4];
358 /** \brief Dump NAT44 addresses
359 @param client_index - opaque cookie to identify the sender
360 @param context - sender context, to match reply w/ request
362 define nat44_address_dump {
367 /** \brief NAT44 address details response
368 @param context - sender context, to match reply w/ request
369 @param ip_address - IPv4 address
370 @param twice_nat - twice NAT address range for extenal hosts
371 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
373 define nat44_address_details {
380 /** \brief Enable/disable NAT44 feature on the interface
381 @param client_index - opaque cookie to identify the sender
382 @param context - sender context, to match reply w/ request
383 @param is_add - 1 if add, 0 if delete
384 @param is_inside - 1 if inside, 0 if outside
385 @param sw_if_index - software index of the interface
387 autoreply define nat44_interface_add_del_feature {
395 /** \brief Dump interfaces with NAT44 feature
396 @param client_index - opaque cookie to identify the sender
397 @param context - sender context, to match reply w/ request
399 define nat44_interface_dump {
404 /** \brief NAT44 interface details response
405 @param context - sender context, to match reply w/ request
406 @param is_inside - 1 if inside, 0 if outside, 2 if inside and outside
407 @param sw_if_index - software index of the interface
409 define nat44_interface_details {
415 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
417 @param client_index - opaque cookie to identify the sender
418 @param context - sender context, to match reply w/ request
419 @param is_add - 1 if add, 0 if delete
420 @param is_inside - 1 if inside, 0 if outside
421 @param sw_if_index - software index of the interface
423 autoreply define nat44_interface_add_del_output_feature {
431 /** \brief Dump interfaces with NAT44 output feature
432 @param client_index - opaque cookie to identify the sender
433 @param context - sender context, to match reply w/ request
435 define nat44_interface_output_feature_dump {
440 /** \brief NAT44 interface with output feature details response
441 @param context - sender context, to match reply w/ request
442 @param is_inside - 1 if inside, 0 if outside
443 @param sw_if_index - software index of the interface
445 define nat44_interface_output_feature_details {
451 /** \brief Add/delete NAT44 static mapping
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 addr_only - 1 if address only mapping
456 @param local_ip_address - local IPv4 address
457 @param external_ip_address - external IPv4 address
458 @param protocol - IP protocol, used only if addr_only=0
459 @param local_port - local port number, used only if addr_only=0
460 @param external_port - external port number, used only if addr_only=0
461 @param external_sw_if_index - external interface (if set
462 external_ip_address is ignored, ~0 means not
464 @param vfr_id - VRF ID
465 @param twice_nat - if 1 translate external host address and port, only for
466 1:1 NAPT (addr_only must be 0)
467 @param self_twice_nat - if 1 translate external host address and port
468 whenever external host address equals
469 local address of internal host
470 @param out2in_only - if 1 rule match only out2in direction
471 @param tag - opaque string tag
473 autoreply define nat44_add_del_static_mapping {
478 u8 local_ip_address[4];
479 u8 external_ip_address[4];
483 u32 external_sw_if_index;
491 /** \brief Dump NAT44 static mappings
492 @param client_index - opaque cookie to identify the sender
493 @param context - sender context, to match reply w/ request
495 define nat44_static_mapping_dump {
500 /** \brief NAT44 static mapping details response
501 @param context - sender context, to match reply w/ request
502 @param addr_only - 1 if address only mapping
503 @param local_ip_address - local IPv4 address
504 @param external_ip_address - external IPv4 address
505 @param protocol - IP protocol, valid only if addr_only=0
506 @param local_port - local port number, valid only if addr_only=0
507 @param external_port - external port number, valid only if addr_only=0
508 @param external_sw_if_index - external interface
509 @param vfr_id - VRF ID
510 @param twice_nat - if 1 translate external host address and port
511 @param self_twice_nat - if 1 translate external host address and port
512 whenever external host address equals
513 local address of internal host
514 @param out2in_only - if 1 rule match only out2in direction
515 @param tag - opaque string tag
517 define nat44_static_mapping_details {
520 u8 local_ip_address[4];
521 u8 external_ip_address[4];
525 u32 external_sw_if_index;
533 /** \brief Add/delete NAT44 identity mapping
534 @param client_index - opaque cookie to identify the sender
535 @param context - sender context, to match reply w/ request
536 @param is_add - 1 if add, 0 if delete
537 @param addr_only - 1 if address only mapping
538 @param ip_address - IPv4 address
539 @param protocol - IP protocol
540 @param port - port number
541 @param sw_if_index - interface (if set ip_address is ignored, ~0 means not
543 @param vfr_id - VRF ID (if ~0 use default VRF)
544 @param tag - opaque string tag
546 autoreply define nat44_add_del_identity_mapping {
559 /** \brief Dump NAT44 identity mappings
560 @param client_index - opaque cookie to identify the sender
561 @param context - sender context, to match reply w/ request
563 define nat44_identity_mapping_dump {
568 /** \brief NAT44 identity mapping details response
569 @param context - sender context, to match reply w/ request
570 @param addr_only - 1 if address only mapping
571 @param ip_address - IPv4 address
572 @param protocol - IP protocol
573 @param port - port number
574 @param sw_if_index - interface
575 @param vfr_id - VRF ID
576 @param tag - opaque string tag
578 define nat44_identity_mapping_details {
589 /** \brief Add/delete NAT44 pool address from specific interfce
590 @param client_index - opaque cookie to identify the sender
591 @param context - sender context, to match reply w/ request
592 @param is_add - 1 if add, 0 if delete
593 @param twice_nat - twice NAT address for extenal hosts
594 @param sw_if_index - software index of the interface
596 autoreply define nat44_add_del_interface_addr {
604 /** \brief Dump NAT44 pool addresses interfaces
605 @param client_index - opaque cookie to identify the sender
606 @param context - sender context, to match reply w/ request
608 define nat44_interface_addr_dump {
613 /** \brief NAT44 pool addresses interfaces details response
614 @param context - sender context, to match reply w/ request
615 @param sw_if_index - software index of the interface
616 @param twice_nat - twice NAT address for extenal hosts
618 define nat44_interface_addr_details {
624 /** \brief Dump NAT44 users
625 @param client_index - opaque cookie to identify the sender
626 @param context - sender context, to match reply w/ request
628 define nat44_user_dump {
633 /** \brief NAT44 users response
634 @param context - sender context, to match reply w/ request
636 @param ip_adress - IPv4 address
637 @param nsessions - number of dynamic sessions
638 @param nstaticsessions - number of static sessions
640 define nat44_user_details {
648 /** \brief NAT44 user's sessions
649 @param client_index - opaque cookie to identify the sender
650 @param context - sender context, to match reply w/ request
651 @param is_ip4 - 1 if address type is IPv4
652 @param user_ip - IP address of the user to dump
653 @param vrf_id - VRF_ID
655 define nat44_user_session_dump {
662 /** \brief NAT44 user's sessions response
663 @param context - sender context, to match reply w/ request
664 @param outside_ip_address - outside IPv4 address
665 @param outside_port - outside port
666 @param inside_ip_address - inside IPv4 address
667 @param inside_port - inside port
668 @param protocol - protocol
669 @param is_static - 1 if session is static
670 @param last_heard - last heard timer
671 @param total_bytes - count of bytes sent through session
672 @param total_pkts - count of pakets sent through session
673 @param is_twicenat - 1 if session is twice-nat
674 @param ext_host_valid - 1 if external host address and port are valid
675 @param ext_host_address - external host IPv4 address
676 @param ext_host_port - external host port
677 @param ext_host_nat_address - post-NAT external host IPv4 address (valid
678 only if twice-nat session)
679 @param ext_host_nat_port - post-NAT external host port (valid only if
682 define nat44_user_session_details {
684 u8 outside_ip_address[4];
686 u8 inside_ip_address[4];
695 u8 ext_host_address[4];
697 u8 ext_host_nat_address[4];
698 u16 ext_host_nat_port;
701 /** \brief NAT44 load-balancing address and port pair
702 @param addr - IPv4 address of the internal node
703 @param port - L4 port number of the internal node
704 @param probability - probability of the internal node to be randomly matched
706 typeonly manual_endian define nat44_lb_addr_port {
713 /** \brief Add/delete NAT44 load-balancing static mapping rule
714 @param client_index - opaque cookie to identify the sender
715 @param context - sender context, to match reply w/ request
716 @param is_add - 1 if add, 0 if delete
717 @param external_addr - external IPv4 address of the service
718 @param external_port - external L4 port number of the service
719 @param protocol - IP protocol number of the service
720 @param twice_nat - if 1 translate external host address and port
721 @param self_twice_nat - if 1 translate external host address and port
722 whenever external host address equals
723 local address of internal host
724 @param out2in_only - if 1 rule match only out2in direction
725 @param tag - opaque string tag
726 @param affinity - if 0 disabled, otherwise client IP affinity sticky time
728 @param local_num - number of local network nodes
729 @param locals - local network nodes
731 autoreply manual_endian define nat44_add_del_lb_static_mapping {
744 vl_api_nat44_lb_addr_port_t locals[local_num];
747 /** \brief Dump NAT44 load-balancing static mapping rules
748 @param client_index - opaque cookie to identify the sender
749 @param context - sender context, to match reply w/ request
751 define nat44_lb_static_mapping_dump {
756 /** \brief NAT44 load-balancing static mapping rule details response
757 @param context - sender context, to match reply w/ request
758 @param is_add - 1 if add, 0 if delete
759 @param external_addr - external IPv4 address of the service
760 @param external_port - external L4 port number of the service
761 @param protocol - IP protocol number of the service
762 @param twice_nat - if 1 translate external host address and port
763 @param self_twice_nat - if 1 translate external host address and port
764 whenever external host address equals
765 local address of internal host
766 @param out2in_only - if 1 rule match only out2in direction
767 @param tag - opaque string tag
768 @param affinity - if 0 disabled, otherwise client IP affinity sticky time
770 @param local_num - number of local network nodes
771 @param locals - local network nodes
773 manual_endian define nat44_lb_static_mapping_details {
784 vl_api_nat44_lb_addr_port_t locals[local_num];
787 /** \brief Delete NAT44 session
788 @param client_index - opaque cookie to identify the sender
789 @param context - sender context, to match reply w/ request
790 @param is_in - 1 if inside network addres and port pari, 0 if outside
791 @param ip_address - IPv4 address
792 @param protocol - IP protocol
793 @param port - port number
794 @param vfr_id - VRF ID
795 @param ext_host_valid - 1 if external host address and port are valid
796 @param ext_host_address - external host IPv4 address
797 @param ext_host_port - external host port
799 autoreply define nat44_del_session {
808 u8 ext_host_address[4];
812 /** \brief Enable/disable forwarding for NAT44
813 Forward packets which don't match existing translation
814 or static mapping instead of dropping them.
815 @param client_index - opaque cookie to identify the sender
816 @param context - sender context, to match reply w/ request
817 @param enable - 0 for enable, 1 for disable
819 autoreply define nat44_forwarding_enable_disable {
825 /** \brief Check if forwarding is enabled or disabled
826 @param client_index - opaque cookie to identify the sender
827 @param context - sender context, to match reply w/ request
829 define nat44_forwarding_is_enabled {
834 /** \brief Response to check if forwarding is enabled or disabled
835 @param context - sender context, to match reply w/ request
836 @param enabled - 1 if enabled, 0 if disabled
838 define nat44_forwarding_is_enabled_reply {
845 * Deterministic NAT (CGN) APIs
848 /** \brief Add/delete NAT deterministic mapping
849 @param client_index - opaque cookie to identify the sender
850 @param context - sender context, to match reply w/ request
851 @param is_add - 1 if add, 0 if delete
852 @param is_nat44 - 1 if NAT44
853 @param in_addr - inside IP address
854 @param in_plen - inside IP address prefix length
855 @param out_addr - outside IPv4 address
856 @param out_addr - outside IPv4 address prefix length
858 autoreply define nat_det_add_del_map {
870 /** \brief Get outside address and port range from inside address
871 @param client_index - opaque cookie to identify the sender
872 @param context - sender context, to match reply w/ request
873 @param is_nat44 - 1 if NAT44
874 @param in_addr - inside IP address
876 define nat_det_forward {
883 /** \brief Get outside address and port range from inside address
884 @param context - sender context, to match reply w/ request
885 @param retval - return code
886 @param out_port_lo - outside port range start
887 @param out_port_hi - outside port range end
888 @param out_addr - outside IPv4 address
890 define nat_det_forward_reply {
898 /** \brief Get inside address from outside address and port
899 @param client_index - opaque cookie to identify the sender
900 @param context - sender context, to match reply w/ request
901 @param out_port - outside port
902 @param out_addr - outside IPv4 address
904 define nat_det_reverse {
911 /** \brief Get inside address from outside address and port reply
912 @param context - sender context, to match reply w/ request
913 @param retval - return code
914 @param is_nat44 - 1 if NAT44
915 @param in_addr - inside IP address
917 define nat_det_reverse_reply {
924 /** \brief Dump NAT deterministic mappings
925 @param client_index - opaque cookie to identify the sender
926 @param context - sender context, to match reply w/ request
928 define nat_det_map_dump {
933 /** \brief NAT users response
934 @param context - sender context, to match reply w/ request
935 @param is_nat44 - 1 if NAT44
936 @param in_addr - inside IP address
937 @param in_plen - inside IP address prefix length
938 @param out_addr - outside IPv4 address
939 @param out_plen - outside IPv4 address prefix length
940 @param sharing_ratio - outside to inside address sharing ratio
941 @param ports_per_host - number of ports available to a host
942 @param ses_num - number of sessions belonging to this mapping
944 define nat_det_map_details {
956 /** \brief Close deterministic NAT session by outside address and port
957 @param client_index - opaque cookie to identify the sender
958 @param context - sender context, to match reply w/ request
959 @param out_addr - outside IPv4 address
960 @param out_port - outside port
961 @param ext_addr - external host IPv4 address
962 @param ext_port - external host port
964 autoreply define nat_det_close_session_out {
973 /** \brief Close deterministic NAT session by inside address and port
974 @param client_index - opaque cookie to identify the sender
975 @param context - sender context, to match reply w/ request
976 @param is_nat44 - 1 if NAT44
977 @param in_addr - inside IP address
978 @param in_port - inside port
979 @param ext_addr - external host IP address
980 @param ext_port - external host port
982 autoreply define nat_det_close_session_in {
992 /** \brief Dump determinstic NAT sessions
993 @param client_index - opaque cookie to identify the sender
994 @param context - sender context, to match reply w/ request
995 @param is_nat44 - 1 if NAT44
996 @param user_addr - address of an inside user whose sessions to dump
998 define nat_det_session_dump {
1005 /** \brief Deterministic NAT sessions reply
1006 @param context - sender context, to match reply w/ request
1007 @param in_port - inside port
1008 @param ext_addr - external host address
1009 @param ext_port - external host port
1010 @param out_port - outside NAT port
1011 @param state - session state
1012 @param expire - session expiration timestamp
1014 define nat_det_session_details {
1028 /** \brief Add/delete address range to NAT64 pool
1029 @param client_index - opaque cookie to identify the sender
1030 @param context - sender context, to match reply w/ request
1031 @param start_addr - start address of the range
1032 @param end_addr - end address of the range
1033 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
1034 @param is_add - 1 if add, 0 if delete
1036 autoreply define nat64_add_del_pool_addr_range {
1045 /** \brief Dump NAT64 pool addresses
1046 @param client_index - opaque cookie to identify the sender
1047 @param context - sender context, to match reply w/ request
1049 define nat64_pool_addr_dump {
1054 /** \brief NAT64 pool address details response
1055 @param context - sender context, to match reply w/ request
1056 @param address - IPv4 address
1057 @param vfr_id - VRF id of tenant, ~0 means independent of VRF
1059 define nat64_pool_addr_details {
1065 /** \brief Enable/disable NAT64 feature on the interface
1066 @param client_index - opaque cookie to identify the sender
1067 @param context - sender context, to match reply w/ request
1068 @param sw_if_index - index of the interface
1069 @param is_inside - 1 if inside, 0 if outside
1070 @param is_add - 1 if add, 0 if delete
1072 autoreply define nat64_add_del_interface {
1080 /** \brief Dump interfaces with NAT64 feature
1081 @param client_index - opaque cookie to identify the sender
1082 @param context - sender context, to match reply w/ request
1084 define nat64_interface_dump {
1089 /** \brief NAT64 interface details response
1090 @param context - sender context, to match reply w/ request
1091 @param is_inside - 1 if inside, 0 if outside
1092 @param sw_if_index - index of the interface
1094 define nat64_interface_details {
1100 /** \brief Add/delete NAT64 static BIB entry
1101 @param client_index - opaque cookie to identify the sender
1102 @param context - sender context, to match reply w/ request
1103 @param i_addr - inside IPv6 address
1104 @param o_addr - outside IPv4 address
1105 @param i_port - inside port number
1106 @param o_port - outside port number
1107 @param vrf_id - VRF id of tenant
1108 @param proto - protocol number
1109 @param is_add - 1 if add, 0 if delete
1111 autoreply define nat64_add_del_static_bib {
1123 /** \brief Dump NAT64 BIB
1124 @param client_index - opaque cookie to identify the sender
1125 @param context - sender context, to match reply w/ request
1126 @param proto - protocol of the BIB: 255 - all BIBs
1130 otherwise - "unknown" protocol BIB
1132 define nat64_bib_dump {
1138 /** \brief NAT64 BIB details response
1139 @param context - sender context, to match reply w/ request
1140 @param i_addr - inside IPv6 address
1141 @param o_addr - outside IPv4 address
1142 @param i_port - inside port number
1143 @param o_port - outside port number
1144 @param vrf_id - VRF id of tenant
1145 @param proto - protocol number
1146 @param is_static - 1 if static BIB entry, 0 if dynamic
1147 @param ses_num - number of sessions associated with the BIB entry
1149 define nat64_bib_details {
1161 /** \brief Dump NAT64 session table
1162 @param client_index - opaque cookie to identify the sender
1163 @param context - sender context, to match reply w/ request
1164 @param proto - protocol of the session table: 255 - all STs
1168 otherwise - "unknown" proto ST
1170 define nat64_st_dump {
1176 /** \brief NAT64 session table details response
1177 @param context - sender context, to match reply w/ request
1178 @param il_addr - inside IPv6 address of the local host
1179 @param ol_addr - outside IPv4 address of the local host
1180 @param il_port - inside port number id of the local host/inside ICMP id
1181 @param ol_port - outside port number of the local host/outside ICMP id
1182 @param il_addr - inside IPv6 address of the remote host
1183 @param ol_addr - outside IPv4 address of the remote host
1184 @param l_port - port number of the remote host (not used for ICMP)
1185 @param vrf_id - VRF id of tenant
1186 @param proto - protocol number
1188 define nat64_st_details {
1201 /** \brief Add/del NAT64 prefix
1202 @param client_index - opaque cookie to identify the sender
1203 @param context - sender context, to match reply w/ request
1204 @param prefix - NAT64 prefix
1205 @param prefix - NAT64 prefix length
1206 @param vrf_id - VRF id of tenant
1207 @param is_add - 1 if add, 0 if delete
1209 autoreply define nat64_add_del_prefix {
1218 /** \brief Dump NAT64 prefix
1219 @param client_index - opaque cookie to identify the sender
1220 @param context - sender context, to match reply w/ request
1222 define nat64_prefix_dump {
1227 /** \brief Dump NAT64 prefix details response
1228 @param context - sender context, to match reply w/ request
1229 @param prefix - NAT64 prefix
1230 @param prefix - NAT64 prefix length
1231 @param vrf_id - VRF id of tenant
1233 define nat64_prefix_details {
1240 /** \brief Add/delete NAT64 pool address from specific interfce
1241 @param client_index - opaque cookie to identify the sender
1242 @param context - sender context, to match reply w/ request
1243 @param is_add - 1 if add, 0 if delete
1244 @param sw_if_index - software index of the interface
1246 autoreply define nat64_add_del_interface_addr {
1259 /** \brief Add/delete address range to DS-Lite pool
1260 @param client_index - opaque cookie to identify the sender
1261 @param context - sender context, to match reply w/ request
1262 @param start_addr - start address of the range
1263 @param end_addr - end address of the range
1264 @param is_add - 1 if add, 0 if delete
1266 autoreply define dslite_add_del_pool_addr_range {
1274 /** \brief Dump DS-Lite addresses
1275 @param client_index - opaque cookie to identify the sender
1276 @param context - sender context, to match reply w/ request
1278 define dslite_address_dump {
1283 /** \brief DS-Lite address details response
1284 @param context - sender context, to match reply w/ request
1285 @param ip_address - IPv4 address
1287 define dslite_address_details {
1292 /** \brief Set AFTR IPv6 and IPv4 addresses
1293 @param client_index - opaque cookie to identify the sender
1294 @param context - sender context, to match reply w/ request
1295 @param ip4_addr - IPv4 address
1296 @param ip6_addr - IP64 address
1298 autoreply define dslite_set_aftr_addr {
1305 /** \brief Get AFTR IPv6 and IPv4 addresses
1306 @param client_index - opaque cookie to identify the sender
1307 @param context - sender context, to match reply w/ request
1309 define dslite_get_aftr_addr {
1314 /** \brief Response to get AFTR IPv6 and IPv4 addresses
1315 @param context - sender context, to match reply w/ request
1316 @param retval - return code
1317 @param ip4_addr - IPv4 address
1318 @param ip6_addr - IP64 address
1320 define dslite_get_aftr_addr_reply {
1327 /** \brief Set B4 IPv6 and IPv4 addresses
1328 @param client_index - opaque cookie to identify the sender
1329 @param context - sender context, to match reply w/ request
1330 @param ip4_addr - IPv4 address
1331 @param ip6_addr - IP64 address
1333 autoreply define dslite_set_b4_addr {
1340 /** \brief Get B4 IPv6 and IPv4 addresses
1341 @param client_index - opaque cookie to identify the sender
1342 @param context - sender context, to match reply w/ request
1344 define dslite_get_b4_addr {
1349 /** \brief Response to get B4 IPv6 and IPv4 addresses
1350 @param context - sender context, to match reply w/ request
1351 @param retval - return code
1352 @param ip4_addr - IPv4 address
1353 @param ip6_addr - IP64 address
1355 define dslite_get_b4_addr_reply {
1365 /** \brief Enable/disable NAT66 feature on the interface
1366 @param client_index - opaque cookie to identify the sender
1367 @param context - sender context, to match reply w/ request
1368 @param is_add - 1 if add, 0 if delete
1369 @param is_inside - 1 if inside, 0 if outside
1370 @param sw_if_index - software index of the interface
1372 autoreply define nat66_add_del_interface {
1380 /** \brief Dump interfaces with NAT66 feature
1381 @param client_index - opaque cookie to identify the sender
1382 @param context - sender context, to match reply w/ request
1384 define nat66_interface_dump {
1389 /** \brief NAT66 interface details response
1390 @param context - sender context, to match reply w/ request
1391 @param is_inside - 1 if inside, 0 if outside
1392 @param sw_if_index - software index of the interface
1394 define nat66_interface_details {
1400 /** \brief Add/delete 1:1 NAT66
1401 @param client_index - opaque cookie to identify the sender
1402 @param context - sender context, to match reply w/ request
1403 @param is_add - 1 if add, 0 if delete
1404 @param local_ip_address - local IPv6 address
1405 @param external_ip_address - external IPv6 address
1406 @param vrf_id - VRF id of tenant
1408 autoreply define nat66_add_del_static_mapping {
1412 u8 local_ip_address[16];
1413 u8 external_ip_address[16];
1417 /** \brief Dump NAT66 static mappings
1418 @param client_index - opaque cookie to identify the sender
1419 @param context - sender context, to match reply w/ request
1421 define nat66_static_mapping_dump {
1426 /** \brief NAT66 static mapping details response
1427 @param context - sender context, to match reply w/ request
1428 @param local_ip_address - local IPv6 address
1429 @param external_ip_address - external IPv6 address
1430 @param vrf_id - VRF id of tenant
1431 @param total_bytes - count of bytes sent through static mapping
1432 @param total_pkts - count of pakets sent through static mapping
1434 define nat66_static_mapping_details {
1436 u8 local_ip_address[16];
1437 u8 external_ip_address[16];