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.
17 * @brief VPP control-plane API messages.
19 * This file defines VPP control-plane API messages which are generally
20 * called through a shared memory interface.
24 * Old "snat" APIs, will be deprecated after 17.10
27 /** \brief Add/del NAT44 address range
28 @param client_index - opaque cookie to identify the sender
29 @param context - sender context, to match reply w/ request
30 @param is_ip4 - 1 if address type is IPv4
31 @param first_ip_address - first IP address
32 @param last_ip_address - last IP address
33 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
34 @param is_add - 1 if add, 0 if delete
36 autoreply define snat_add_address_range {
40 u8 first_ip_address[16];
41 u8 last_ip_address[16];
46 /** \brief Dump NAT44 addresses
47 @param client_index - opaque cookie to identify the sender
48 @param context - sender context, to match reply w/ request
50 define snat_address_dump {
55 /** \brief NAT44 address details response
56 @param context - sender context, to match reply w/ request
57 @param is_ip4 - 1 if address type is IPv4
58 @param ip_address - IP address
59 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
61 define snat_address_details {
68 /** \brief Enable/disable NAT44 feature on the interface
69 @param client_index - opaque cookie to identify the sender
70 @param context - sender context, to match reply w/ request
71 @param is_add - 1 if add, 0 if delete
72 @param is_inside - 1 if inside, 0 if outside
73 @param sw_if_index - software index of the interface
75 autoreply define snat_interface_add_del_feature {
83 /** \brief Dump interfaces with NAT44 feature
84 @param client_index - opaque cookie to identify the sender
85 @param context - sender context, to match reply w/ request
87 define snat_interface_dump {
92 /** \brief NAT44 interface details response
93 @param context - sender context, to match reply w/ request
94 @param is_inside - 1 if inside, 0 if outside
95 @param sw_if_index - software index of the interface
97 define snat_interface_details {
103 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
105 @param client_index - opaque cookie to identify the sender
106 @param context - sender context, to match reply w/ request
107 @param is_add - 1 if add, 0 if delete
108 @param is_inside - 1 if inside, 0 if outside
109 @param sw_if_index - software index of the interface
111 autoreply define snat_interface_add_del_output_feature {
119 /** \brief Dump interfaces with NAT44 output feature
120 @param client_index - opaque cookie to identify the sender
121 @param context - sender context, to match reply w/ request
123 define snat_interface_output_feature_dump {
128 /** \brief NAT44 interface with output feature details response
129 @param context - sender context, to match reply w/ request
130 @param is_inside - 1 if inside, 0 if outside
131 @param sw_if_index - software index of the interface
133 define snat_interface_output_feature_details {
139 /** \brief Add/delete NAT44 static mapping
140 @param client_index - opaque cookie to identify the sender
141 @param context - sender context, to match reply w/ request
142 @param is_add - 1 if add, 0 if delete
143 @param is_ip4 - 1 if address type is IPv4
144 @param addr_only - 1 if address only mapping
145 @param local_ip_address - local IP address
146 @param external_ip_address - external IP address
147 @param protocol - IP protocol
148 @param local_port - local port number
149 @param external_port - external port number
150 @param external_sw_if_index - external interface (if set
151 external_ip_address is ignored, ~0 means not
153 @param vfr_id - VRF ID
155 autoreply define snat_add_static_mapping {
161 u8 local_ip_address[16];
162 u8 external_ip_address[16];
166 u32 external_sw_if_index;
170 /** \brief Dump NAT44 static mappings
171 @param client_index - opaque cookie to identify the sender
172 @param context - sender context, to match reply w/ request
174 define snat_static_mapping_dump {
179 /** \brief NAT44 static mapping details response
180 @param context - sender context, to match reply w/ request
181 @param is_ip4 - 1 if address type is IPv4
182 @param addr_only - 1 if address only mapping
183 @param local_ip_address - local IP address
184 @param external_ip_address - external IP address
185 @param protocol - IP protocol
186 @param local_port - local port number
187 @param external_port - external port number
188 @param external_sw_if_index - external interface
189 @param vfr_id - VRF ID
191 define snat_static_mapping_details {
195 u8 local_ip_address[16];
196 u8 external_ip_address[16];
200 u32 external_sw_if_index;
204 /** \brief Control ping from client to api server request
205 @param client_index - opaque cookie to identify the sender
206 @param context - sender context, to match reply w/ request
208 define snat_control_ping
214 /** \brief Control ping from the client to the server response
215 @param client_index - opaque cookie to identify the sender
216 @param context - sender context, to match reply w/ request
217 @param retval - return code for the request
218 @param vpe_pid - the pid of the vpe, returned by the server
220 define snat_control_ping_reply
228 /** \brief Show NAT plugin startup config
229 @param client_index - opaque cookie to identify the sender
230 @param context - sender context, to match reply w/ request
232 define snat_show_config
238 /** \brief Show NAT plugin startup config reply
239 @param context - sender context, to match reply w/ request
240 @param retval - return code for the request
241 @param static_mapping_only - if 1 dynamic translations disabled
242 @param static_mapping_connection_tracking - if 1 create session data
243 @param deterministic - if 1 deterministic mapping
244 @param translation_buckets - number of translation hash buckets
245 @param translation_memory_size - translation hash memory size
246 @param user_buckets - number of user hash buckets
247 @param user_memory_size - user hash memory size
248 @param max_translations_per_user - maximum number of translations per user
249 @param outside_vrf_id - outside VRF id
250 @param inside_vrf_id - default inside VRF id
252 define snat_show_config_reply
256 u8 static_mapping_only;
257 u8 static_mapping_connection_tracking;
259 u32 translation_buckets;
260 u32 translation_memory_size;
262 u32 user_memory_size;
263 u32 max_translations_per_user;
268 /** \brief Set NAT workers
269 @param client_index - opaque cookie to identify the sender
270 @param context - sender context, to match reply w/ request
271 @param worker_mask - NAT workers mask
273 autoreply define snat_set_workers {
279 /** \brief Dump NAT workers
280 @param client_index - opaque cookie to identify the sender
281 @param context - sender context, to match reply w/ request
283 define snat_worker_dump {
288 /** \brief NAT workers details response
289 @param context - sender context, to match reply w/ request
290 @param worker_index - worker index
291 @param lcore_id - lcore ID
292 @param name - worker name
294 define snat_worker_details {
301 /** \brief Add/delete NAT44 pool address from specific interfce
302 @param client_index - opaque cookie to identify the sender
303 @param context - sender context, to match reply w/ request
304 @param is_add - 1 if add, 0 if delete
305 @param sw_if_index - software index of the interface
307 autoreply define snat_add_del_interface_addr {
315 /** \brief Dump NAT44 pool addresses interfaces
316 @param client_index - opaque cookie to identify the sender
317 @param context - sender context, to match reply w/ request
319 define snat_interface_addr_dump {
324 /** \brief NAT44 pool addresses interfaces details response
325 @param context - sender context, to match reply w/ request
326 @param sw_if_index - software index of the interface
328 define snat_interface_addr_details {
333 /** \brief Enable/disable NAT IPFIX logging
334 @param client_index - opaque cookie to identify the sender
335 @param context - sender context, to match reply w/ request
336 @param domain_id - observation domain ID
337 @param src_port - source port number
338 @param enable - 1 if enable, 0 if disable
340 autoreply define snat_ipfix_enable_disable {
348 /** \brief Dump NAT44 users
349 @param client_index - opaque cookie to identify the sender
350 @param context - sender context, to match reply w/ request
352 define snat_user_dump {
357 /** \brief NAT44 users response
358 @param context - sender context, to match reply w/ request
360 @param is_ip4 - 1 if address type is IPv4
361 @param ip_adress - IP address
362 @param nsessions - number of dynamic sessions
363 @param nstaticsessions - number of static sessions
365 define snat_user_details {
374 /** \brief NAT44 user's sessions
375 @param client_index - opaque cookie to identify the sender
376 @param context - sender context, to match reply w/ request
377 @param is_ip4 - 1 if address type is IPv4
378 @param user_ip - IP address of the user to dump
379 @param vrf_id - VRF_ID
381 define snat_user_session_dump {
389 /** \brief NAT44 user's sessions response
390 @param context - sender context, to match reply w/ request
391 @param is_ip4 - 1 if address type is IPv4
392 @param outside_ip_address - outside IP address
393 @param outside_port - outside port
394 @param inside_ip_address - inside IP address
395 @param inside_port - inside port
396 @param protocol - protocol
397 @param is_static - 1 if session is static
398 @param last_heard - last heard timer
399 @param total_bytes - count of bytes sent through session
400 @param total_pkts - count of pakets sent through session
402 define snat_user_session_details {
405 u8 outside_ip_address[16];
407 u8 inside_ip_address[16];
416 /** \brief Add/delete NAT deterministic mapping
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_ip4 - 1 if address type is IPv4
421 @param in_addr - inside IP address
422 @param in_plen - inside IP address prefix length
423 @param out_addr - outside IP address
424 @param out_addr - outside IP address prefix length
426 autoreply define snat_add_det_map {
438 /** \brief Get outside address and port range from inside address
439 @param client_index - opaque cookie to identify the sender
440 @param context - sender context, to match reply w/ request
441 @param is_ip4 - 1 if address type is IPv4
442 @param in_addr - inside IP address
444 define snat_det_forward {
451 /** \brief Get outside address and port range from inside address
452 @param context - sender context, to match reply w/ request
453 @param retval - return code
454 @param out_port_lo - outside port range start
455 @param out_port_hi - outside port range end
456 @param is_ip4 - 1 if address type is IPv4
457 @param out_addr - outside IP address
459 define snat_det_forward_reply {
468 /** \brief Get inside address from outside address and port
469 @param client_index - opaque cookie to identify the sender
470 @param context - sender context, to match reply w/ request
471 @param out_port - outside port
472 @param is_ip4 - 1 if address type is IPv4
473 @param out_addr - outside IP address
475 define snat_det_reverse {
483 /** \brief Get inside address from outside address and port reply
484 @param context - sender context, to match reply w/ request
485 @param retval - return code
486 @param is_ip4 - 1 if address type is IPv4
487 @param in_addr - inside IP address
489 define snat_det_reverse_reply {
496 /** \brief Dump NAT deterministic mappings
497 @param client_index - opaque cookie to identify the sender
498 @param context - sender context, to match reply w/ request
500 define snat_det_map_dump {
505 /** \brief NAT users response
506 @param context - sender context, to match reply w/ request
507 @param is_ip4 - 1 if address type is IPv4
508 @param in_addr - inside IP address
509 @param in_plen - inside IP address prefix length
510 @param out_addr - outside IP address
511 @param out_plen - outside IP address prefix length
512 @param sharing_ratio - outside to inside address sharing ratio
513 @param ports_per_host - number of ports available to a host
514 @param ses_num - number of sessions belonging to this mapping
516 define snat_det_map_details {
528 /** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
529 @param client_index - opaque cookie to identify the sender
530 @param context - sender context, to match reply w/ request
531 @param udp - UDP timeout (default 300sec)
532 @param tcp_established - TCP established timeout (default 7440sec)
533 @param tcp_transitory - TCP transitory timeout (default 240sec)
534 @param icmp - ICMP timeout (default 60sec)
536 autoreply define snat_det_set_timeouts {
545 /** \brief Get values of timeouts for deterministic NAT (seconds)
546 @param client_index - opaque cookie to identify the sender
547 @param context - sender context, to match reply w/ request
549 define snat_det_get_timeouts {
554 /** \brief Get values of timeouts for deterministic NAT reply
555 @param context - sender context, to match reply w/ request
556 @param retval - return code
557 @param udp - UDP timeout (default 300sec)
558 @param tcp_established - TCP established timeout (default 7440sec)
559 @param tcp_transitory - TCP transitory timeout (default 240sec)
560 @param icmp - ICMP timeout (default 60sec)
562 define snat_det_get_timeouts_reply {
571 /** \brief Close deterministic NAT session by outside address and port
572 @param client_index - opaque cookie to identify the sender
573 @param context - sender context, to match reply w/ request
574 @param is_ip4 - 1 if address type is IPv4
575 @param out_addr - outside IP address
576 @param out_port - outside port
577 @param ext_addr - external host address
578 @param ext_port - external host port
580 autoreply define snat_det_close_session_out {
590 /** \brief Close deterministic NAT session by inside address and port
591 @param client_index - opaque cookie to identify the sender
592 @param context - sender context, to match reply w/ request
593 @param is_ip4 - 1 if address type is IPv4
594 @param in_addr - inside IP address
595 @param in_port - inside port
596 @param ext_addr - external host address
597 @param ext_port - external host port
599 autoreply define snat_det_close_session_in {
609 /** \brief Dump determinstic NAT sessions
610 @param client_index - opaque cookie to identify the sender
611 @param context - sender context, to match reply w/ request
612 @param is_ip4 - 1 if address type is IPv4
613 @param user_addr - address of an inside user whose sessions to dump
615 define snat_det_session_dump {
622 /** \brief Deterministic NAT sessions reply
623 @param context - sender context, to match reply w/ request
624 @param is_ip4 - 1 if address type is IPv4
625 @param in_port - inside port
626 @param ext_addr - external host address
627 @param ext_port - external host port
628 @param out_port - outside NAT port
629 @param state - session state
630 @param expire - session expiration timestamp
632 define snat_det_session_details {
645 * Common NAT plugin APIs
648 /** \brief Control ping from client to api server request
649 @param client_index - opaque cookie to identify the sender
650 @param context - sender context, to match reply w/ request
652 define nat_control_ping
658 /** \brief Control ping from the client to the server response
659 @param client_index - opaque cookie to identify the sender
660 @param context - sender context, to match reply w/ request
661 @param retval - return code for the request
662 @param vpe_pid - the pid of the vpe, returned by the server
664 define nat_control_ping_reply
672 /** \brief Show NAT plugin startup config
673 @param client_index - opaque cookie to identify the sender
674 @param context - sender context, to match reply w/ request
676 define nat_show_config
682 /** \brief Show NAT plugin startup config reply
683 @param context - sender context, to match reply w/ request
684 @param retval - return code for the request
685 @param static_mapping_only - if 1 dynamic translations disabled
686 @param static_mapping_connection_tracking - if 1 create session data
687 @param deterministic - if 1 deterministic mapping
688 @param translation_buckets - number of translation hash buckets
689 @param translation_memory_size - translation hash memory size
690 @param user_buckets - number of user hash buckets
691 @param user_memory_size - user hash memory size
692 @param max_translations_per_user - maximum number of translations per user
693 @param outside_vrf_id - outside VRF id
694 @param inside_vrf_id - default inside VRF id
696 define nat_show_config_reply
700 u8 static_mapping_only;
701 u8 static_mapping_connection_tracking;
703 u32 translation_buckets;
704 u32 translation_memory_size;
706 u32 user_memory_size;
707 u32 max_translations_per_user;
712 /** \brief Set NAT workers
713 @param client_index - opaque cookie to identify the sender
714 @param context - sender context, to match reply w/ request
715 @param worker_mask - NAT workers mask
717 autoreply define nat_set_workers {
723 /** \brief Dump NAT workers
724 @param client_index - opaque cookie to identify the sender
725 @param context - sender context, to match reply w/ request
727 define nat_worker_dump {
732 /** \brief NAT workers details response
733 @param context - sender context, to match reply w/ request
734 @param worker_index - worker index
735 @param lcore_id - lcore ID
736 @param name - worker name
738 define nat_worker_details {
745 /** \brief Enable/disable NAT IPFIX logging
746 @param client_index - opaque cookie to identify the sender
747 @param context - sender context, to match reply w/ request
748 @param domain_id - observation domain ID
749 @param src_port - source port number
750 @param enable - 1 if enable, 0 if disable
752 autoreply define nat_ipfix_enable_disable {
764 /** \brief Add/del NAT44 address range
765 @param client_index - opaque cookie to identify the sender
766 @param context - sender context, to match reply w/ request
767 @param first_ip_address - first IPv4 address
768 @param last_ip_address - last IPv4 address
769 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
770 @param is_add - 1 if add, 0 if delete
772 autoreply define nat44_add_del_address_range {
775 u8 first_ip_address[4];
776 u8 last_ip_address[4];
781 /** \brief Dump NAT44 addresses
782 @param client_index - opaque cookie to identify the sender
783 @param context - sender context, to match reply w/ request
785 define nat44_address_dump {
790 /** \brief NAT44 address details response
791 @param context - sender context, to match reply w/ request
792 @param ip_address - IPv4 address
793 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
795 define nat44_address_details {
801 /** \brief Enable/disable NAT44 feature on the interface
802 @param client_index - opaque cookie to identify the sender
803 @param context - sender context, to match reply w/ request
804 @param is_add - 1 if add, 0 if delete
805 @param is_inside - 1 if inside, 0 if outside
806 @param sw_if_index - software index of the interface
808 autoreply define nat44_interface_add_del_feature {
816 /** \brief Dump interfaces with NAT44 feature
817 @param client_index - opaque cookie to identify the sender
818 @param context - sender context, to match reply w/ request
820 define nat44_interface_dump {
825 /** \brief NAT44 interface details response
826 @param context - sender context, to match reply w/ request
827 @param is_inside - 1 if inside, 0 if outside
828 @param sw_if_index - software index of the interface
830 define nat44_interface_details {
836 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
838 @param client_index - opaque cookie to identify the sender
839 @param context - sender context, to match reply w/ request
840 @param is_add - 1 if add, 0 if delete
841 @param is_inside - 1 if inside, 0 if outside
842 @param sw_if_index - software index of the interface
844 autoreply define nat44_interface_add_del_output_feature {
852 /** \brief Dump interfaces with NAT44 output feature
853 @param client_index - opaque cookie to identify the sender
854 @param context - sender context, to match reply w/ request
856 define nat44_interface_output_feature_dump {
861 /** \brief NAT44 interface with output feature details response
862 @param context - sender context, to match reply w/ request
863 @param is_inside - 1 if inside, 0 if outside
864 @param sw_if_index - software index of the interface
866 define nat44_interface_output_feature_details {
872 /** \brief Add/delete NAT44 static mapping
873 @param client_index - opaque cookie to identify the sender
874 @param context - sender context, to match reply w/ request
875 @param is_add - 1 if add, 0 if delete
876 @param addr_only - 1 if address only mapping
877 @param local_ip_address - local IPv4 address
878 @param external_ip_address - external IPv4 address
879 @param protocol - IP protocol
880 @param local_port - local port number
881 @param external_port - external port number
882 @param external_sw_if_index - external interface (if set
883 external_ip_address is ignored, ~0 means not
885 @param vfr_id - VRF ID
887 autoreply define nat44_add_del_static_mapping {
892 u8 local_ip_address[4];
893 u8 external_ip_address[4];
897 u32 external_sw_if_index;
901 /** \brief Dump NAT44 static mappings
902 @param client_index - opaque cookie to identify the sender
903 @param context - sender context, to match reply w/ request
905 define nat44_static_mapping_dump {
910 /** \brief NAT44 static mapping details response
911 @param context - sender context, to match reply w/ request
912 @param addr_only - 1 if address only mapping
913 @param local_ip_address - local IPv4 address
914 @param external_ip_address - external IPv4 address
915 @param protocol - IP protocol
916 @param local_port - local port number
917 @param external_port - external port number
918 @param external_sw_if_index - external interface
919 @param vfr_id - VRF ID
921 define nat44_static_mapping_details {
924 u8 local_ip_address[4];
925 u8 external_ip_address[4];
929 u32 external_sw_if_index;
933 /** \brief Add/delete NAT44 pool address from specific interfce
934 @param client_index - opaque cookie to identify the sender
935 @param context - sender context, to match reply w/ request
936 @param is_add - 1 if add, 0 if delete
937 @param sw_if_index - software index of the interface
939 autoreply define nat44_add_del_interface_addr {
947 /** \brief Dump NAT44 pool addresses interfaces
948 @param client_index - opaque cookie to identify the sender
949 @param context - sender context, to match reply w/ request
951 define nat44_interface_addr_dump {
956 /** \brief NAT44 pool addresses interfaces details response
957 @param context - sender context, to match reply w/ request
958 @param sw_if_index - software index of the interface
960 define nat44_interface_addr_details {
965 /** \brief Dump NAT44 users
966 @param client_index - opaque cookie to identify the sender
967 @param context - sender context, to match reply w/ request
969 define nat44_user_dump {
974 /** \brief NAT44 users response
975 @param context - sender context, to match reply w/ request
977 @param ip_adress - IPv4 address
978 @param nsessions - number of dynamic sessions
979 @param nstaticsessions - number of static sessions
981 define nat44_user_details {
989 /** \brief NAT44 user's sessions
990 @param client_index - opaque cookie to identify the sender
991 @param context - sender context, to match reply w/ request
992 @param is_ip4 - 1 if address type is IPv4
993 @param user_ip - IP address of the user to dump
994 @param vrf_id - VRF_ID
996 define nat44_user_session_dump {
1003 /** \brief NAT44 user's sessions response
1004 @param context - sender context, to match reply w/ request
1005 @param outside_ip_address - outside IPv4 address
1006 @param outside_port - outside port
1007 @param inside_ip_address - inside IPv4 address
1008 @param inside_port - inside port
1009 @param protocol - protocol
1010 @param is_static - 1 if session is static
1011 @param last_heard - last heard timer
1012 @param total_bytes - count of bytes sent through session
1013 @param total_pkts - count of pakets sent through session
1015 define nat44_user_session_details {
1017 u8 outside_ip_address[4];
1019 u8 inside_ip_address[4];
1029 * Deterministic NAT (CGN) APIs
1032 /** \brief Add/delete NAT deterministic mapping
1033 @param client_index - opaque cookie to identify the sender
1034 @param context - sender context, to match reply w/ request
1035 @param is_add - 1 if add, 0 if delete
1036 @param is_nat44 - 1 if NAT44
1037 @param in_addr - inside IP address
1038 @param in_plen - inside IP address prefix length
1039 @param out_addr - outside IPv4 address
1040 @param out_addr - outside IPv4 address prefix length
1042 autoreply define nat_det_add_del_map {
1054 /** \brief Get outside address and port range from inside address
1055 @param client_index - opaque cookie to identify the sender
1056 @param context - sender context, to match reply w/ request
1057 @param is_nat44 - 1 if NAT44
1058 @param in_addr - inside IP address
1060 define nat_det_forward {
1067 /** \brief Get outside address and port range from inside address
1068 @param context - sender context, to match reply w/ request
1069 @param retval - return code
1070 @param out_port_lo - outside port range start
1071 @param out_port_hi - outside port range end
1072 @param out_addr - outside IPv4 address
1074 define nat_det_forward_reply {
1082 /** \brief Get inside address from outside address and port
1083 @param client_index - opaque cookie to identify the sender
1084 @param context - sender context, to match reply w/ request
1085 @param out_port - outside port
1086 @param out_addr - outside IPv4 address
1088 define nat_det_reverse {
1095 /** \brief Get inside address from outside address and port reply
1096 @param context - sender context, to match reply w/ request
1097 @param retval - return code
1098 @param is_nat44 - 1 if NAT44
1099 @param in_addr - inside IP address
1101 define nat_det_reverse_reply {
1108 /** \brief Dump NAT deterministic mappings
1109 @param client_index - opaque cookie to identify the sender
1110 @param context - sender context, to match reply w/ request
1112 define nat_det_map_dump {
1117 /** \brief NAT users response
1118 @param context - sender context, to match reply w/ request
1119 @param is_nat44 - 1 if NAT44
1120 @param in_addr - inside IP address
1121 @param in_plen - inside IP address prefix length
1122 @param out_addr - outside IPv4 address
1123 @param out_plen - outside IPv4 address prefix length
1124 @param sharing_ratio - outside to inside address sharing ratio
1125 @param ports_per_host - number of ports available to a host
1126 @param ses_num - number of sessions belonging to this mapping
1128 define nat_det_map_details {
1140 /** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
1141 @param client_index - opaque cookie to identify the sender
1142 @param context - sender context, to match reply w/ request
1143 @param udp - UDP timeout (default 300sec)
1144 @param tcp_established - TCP established timeout (default 7440sec)
1145 @param tcp_transitory - TCP transitory timeout (default 240sec)
1146 @param icmp - ICMP timeout (default 60sec)
1148 autoreply define nat_det_set_timeouts {
1152 u32 tcp_established;
1157 /** \brief Get values of timeouts for deterministic NAT (seconds)
1158 @param client_index - opaque cookie to identify the sender
1159 @param context - sender context, to match reply w/ request
1161 define nat_det_get_timeouts {
1166 /** \brief Get values of timeouts for deterministic NAT reply
1167 @param context - sender context, to match reply w/ request
1168 @param retval - return code
1169 @param udp - UDP timeout (default 300sec)
1170 @param tcp_established - TCP established timeout (default 7440sec)
1171 @param tcp_transitory - TCP transitory timeout (default 240sec)
1172 @param icmp - ICMP timeout (default 60sec)
1174 define nat_det_get_timeouts_reply {
1178 u32 tcp_established;
1183 /** \brief Close deterministic NAT session by outside address and port
1184 @param client_index - opaque cookie to identify the sender
1185 @param context - sender context, to match reply w/ request
1186 @param out_addr - outside IPv4 address
1187 @param out_port - outside port
1188 @param ext_addr - external host IPv4 address
1189 @param ext_port - external host port
1191 autoreply define nat_det_close_session_out {
1200 /** \brief Close deterministic NAT session by inside address and port
1201 @param client_index - opaque cookie to identify the sender
1202 @param context - sender context, to match reply w/ request
1203 @param is_nat44 - 1 if NAT44
1204 @param in_addr - inside IP address
1205 @param in_port - inside port
1206 @param ext_addr - external host IP address
1207 @param ext_port - external host port
1209 autoreply define nat_det_close_session_in {
1219 /** \brief Dump determinstic NAT sessions
1220 @param client_index - opaque cookie to identify the sender
1221 @param context - sender context, to match reply w/ request
1222 @param is_nat44 - 1 if NAT44
1223 @param user_addr - address of an inside user whose sessions to dump
1225 define nat_det_session_dump {
1232 /** \brief Deterministic NAT sessions reply
1233 @param context - sender context, to match reply w/ request
1234 @param in_port - inside port
1235 @param ext_addr - external host address
1236 @param ext_port - external host port
1237 @param out_port - outside NAT port
1238 @param state - session state
1239 @param expire - session expiration timestamp
1241 define nat_det_session_details {
1256 /** \brief Add/delete address range to NAT64 pool
1257 @param client_index - opaque cookie to identify the sender
1258 @param context - sender context, to match reply w/ request
1259 @param start_addr - start address of the range
1260 @param end_addr - end address of the range
1261 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
1262 @param is_add - 1 if add, 0 if delete
1264 autoreply define nat64_add_del_pool_addr_range {
1273 /** \brief Dump NAT64 pool addresses
1274 @param client_index - opaque cookie to identify the sender
1275 @param context - sender context, to match reply w/ request
1277 define nat64_pool_addr_dump {
1282 /** \brief NAT64 pool address details response
1283 @param context - sender context, to match reply w/ request
1284 @param address - IPv4 address
1285 @param vfr_id - VRF id of tenant, ~0 means independent of VRF
1287 define nat64_pool_addr_details {
1293 /** \brief Enable/disable NAT64 feature on the interface
1294 @param client_index - opaque cookie to identify the sender
1295 @param context - sender context, to match reply w/ request
1296 @param sw_if_index - index of the interface
1297 @param is_inside - 1 if inside, 0 if outside
1298 @param is_add - 1 if add, 0 if delete
1300 autoreply define nat64_add_del_interface {
1308 /** \brief Dump interfaces with NAT64 feature
1309 @param client_index - opaque cookie to identify the sender
1310 @param context - sender context, to match reply w/ request
1312 define nat64_interface_dump {
1317 /** \brief NAT64 interface details response
1318 @param context - sender context, to match reply w/ request
1319 @param is_inside - 1 if inside, 0 if outside
1320 @param sw_if_index - index of the interface
1322 define nat64_interface_details {
1328 /** \brief Add/delete NAT64 static BIB entry
1329 @param client_index - opaque cookie to identify the sender
1330 @param context - sender context, to match reply w/ request
1331 @param i_addr - inside IPv6 address
1332 @param o_addr - outside IPv4 address
1333 @param i_port - inside port number
1334 @param o_port - outside port number
1335 @param vrf_id - VRF id of tenant
1336 @param proto - protocol number
1337 @param is_add - 1 if add, 0 if delete
1339 autoreply define nat64_add_del_static_bib {
1351 /** \brief Dump NAT64 BIB
1352 @param client_index - opaque cookie to identify the sender
1353 @param context - sender context, to match reply w/ request
1354 @param proto - protocol of the BIB: 255 - all BIBs
1358 otherwise - "unknown" protocol BIB
1360 define nat64_bib_dump {
1366 /** \brief NAT64 BIB details response
1367 @param context - sender context, to match reply w/ request
1368 @param i_addr - inside IPv6 address
1369 @param o_addr - outside IPv4 address
1370 @param i_port - inside port number
1371 @param o_port - outside port number
1372 @param vrf_id - VRF id of tenant
1373 @param proto - protocol number
1374 @param is_static - 1 if static BIB entry, 0 if dynamic
1375 @param ses_num - number of sessions associated with the BIB entry
1377 define nat64_bib_details {
1389 /** \brief Set values of timeouts for NAT64 (seconds, 0 = default)
1390 @param client_index - opaque cookie to identify the sender
1391 @param context - sender context, to match reply w/ request
1392 @param udp - UDP timeout (default 300sec)
1393 @param icmp - ICMP timeout (default 60sec)
1394 @param tcp_trans - TCP transitory timeout (default 240sec)
1395 @param tcp_est - TCP established timeout (default 7440sec)
1396 @param tcp_incoming_syn - TCP incoming SYN timeout (default 6sec)
1398 autoreply define nat64_set_timeouts {
1405 u32 tcp_incoming_syn;
1408 /** \brief Get values of timeouts for NAT64 (seconds)
1409 @param client_index - opaque cookie to identify the sender
1410 @param context - sender context, to match reply w/ request
1412 define nat64_get_timeouts {
1417 /** \brief Get values of timeouts for NAT64 reply
1418 @param context - sender context, to match reply w/ request
1419 @param retval - return code
1420 @param udp - UDP timeout
1421 @param icmp - ICMP timeout
1422 @param tcp_trans - TCP transitory timeout
1423 @param tcp_est - TCP established timeout
1424 @param tcp_incoming_syn - TCP incoming SYN timeout
1426 define nat64_get_timeouts_reply {
1433 u32 tcp_incoming_syn;
1436 /** \brief Dump NAT64 session table
1437 @param client_index - opaque cookie to identify the sender
1438 @param context - sender context, to match reply w/ request
1439 @param proto - protocol of the session table: 255 - all STs
1443 otherwise - "unknown" proto ST
1445 define nat64_st_dump {
1451 /** \brief NAT64 session table details response
1452 @param context - sender context, to match reply w/ request
1453 @param il_addr - inside IPv6 address of the local host
1454 @param ol_addr - outside IPv4 address of the local host
1455 @param il_port - inside port number id of the local host/inside ICMP id
1456 @param ol_port - outside port number of the local host/outside ICMP id
1457 @param il_addr - inside IPv6 address of the remote host
1458 @param ol_addr - outside IPv4 address of the remote host
1459 @param l_port - port number of the remote host (not used for ICMP)
1460 @param vrf_id - VRF id of tenant
1461 @param proto - protocol number
1463 define nat64_st_details {
1476 /** \brief Add/del NAT64 prefix
1477 @param client_index - opaque cookie to identify the sender
1478 @param context - sender context, to match reply w/ request
1479 @param prefix - NAT64 prefix
1480 @param prefix - NAT64 prefix length
1481 @param vrf_id - VRF id of tenant
1482 @param is_add - 1 if add, 0 if delete
1484 autoreply define nat64_add_del_prefix {
1493 /** \brief Dump NAT64 prefix
1494 @param client_index - opaque cookie to identify the sender
1495 @param context - sender context, to match reply w/ request
1497 define nat64_prefix_dump {
1502 /** \brief Dump NAT64 prefix details response
1503 @param context - sender context, to match reply w/ request
1504 @param prefix - NAT64 prefix
1505 @param prefix - NAT64 prefix length
1506 @param vrf_id - VRF id of tenant
1508 define nat64_prefix_details {