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];
1028 typeonly manual_endian define nat44_lb_addr_port {
1034 autoreply manual_endian define nat44_add_del_lb_static_mapping {
1038 u8 external_addr[4];
1043 vl_api_nat44_lb_addr_port_t locals[local_num];
1046 define nat44_lb_static_mapping_dump {
1051 manual_endian define nat44_lb_static_mapping_details {
1053 u8 external_addr[4];
1058 vl_api_nat44_lb_addr_port_t locals[local_num];
1062 * Deterministic NAT (CGN) APIs
1065 /** \brief Add/delete NAT deterministic mapping
1066 @param client_index - opaque cookie to identify the sender
1067 @param context - sender context, to match reply w/ request
1068 @param is_add - 1 if add, 0 if delete
1069 @param is_nat44 - 1 if NAT44
1070 @param in_addr - inside IP address
1071 @param in_plen - inside IP address prefix length
1072 @param out_addr - outside IPv4 address
1073 @param out_addr - outside IPv4 address prefix length
1075 autoreply define nat_det_add_del_map {
1087 /** \brief Get outside address and port range from inside address
1088 @param client_index - opaque cookie to identify the sender
1089 @param context - sender context, to match reply w/ request
1090 @param is_nat44 - 1 if NAT44
1091 @param in_addr - inside IP address
1093 define nat_det_forward {
1100 /** \brief Get outside address and port range from inside address
1101 @param context - sender context, to match reply w/ request
1102 @param retval - return code
1103 @param out_port_lo - outside port range start
1104 @param out_port_hi - outside port range end
1105 @param out_addr - outside IPv4 address
1107 define nat_det_forward_reply {
1115 /** \brief Get inside address from outside address and port
1116 @param client_index - opaque cookie to identify the sender
1117 @param context - sender context, to match reply w/ request
1118 @param out_port - outside port
1119 @param out_addr - outside IPv4 address
1121 define nat_det_reverse {
1128 /** \brief Get inside address from outside address and port reply
1129 @param context - sender context, to match reply w/ request
1130 @param retval - return code
1131 @param is_nat44 - 1 if NAT44
1132 @param in_addr - inside IP address
1134 define nat_det_reverse_reply {
1141 /** \brief Dump NAT deterministic mappings
1142 @param client_index - opaque cookie to identify the sender
1143 @param context - sender context, to match reply w/ request
1145 define nat_det_map_dump {
1150 /** \brief NAT users response
1151 @param context - sender context, to match reply w/ request
1152 @param is_nat44 - 1 if NAT44
1153 @param in_addr - inside IP address
1154 @param in_plen - inside IP address prefix length
1155 @param out_addr - outside IPv4 address
1156 @param out_plen - outside IPv4 address prefix length
1157 @param sharing_ratio - outside to inside address sharing ratio
1158 @param ports_per_host - number of ports available to a host
1159 @param ses_num - number of sessions belonging to this mapping
1161 define nat_det_map_details {
1173 /** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
1174 @param client_index - opaque cookie to identify the sender
1175 @param context - sender context, to match reply w/ request
1176 @param udp - UDP timeout (default 300sec)
1177 @param tcp_established - TCP established timeout (default 7440sec)
1178 @param tcp_transitory - TCP transitory timeout (default 240sec)
1179 @param icmp - ICMP timeout (default 60sec)
1181 autoreply define nat_det_set_timeouts {
1185 u32 tcp_established;
1190 /** \brief Get values of timeouts for deterministic NAT (seconds)
1191 @param client_index - opaque cookie to identify the sender
1192 @param context - sender context, to match reply w/ request
1194 define nat_det_get_timeouts {
1199 /** \brief Get values of timeouts for deterministic NAT reply
1200 @param context - sender context, to match reply w/ request
1201 @param retval - return code
1202 @param udp - UDP timeout (default 300sec)
1203 @param tcp_established - TCP established timeout (default 7440sec)
1204 @param tcp_transitory - TCP transitory timeout (default 240sec)
1205 @param icmp - ICMP timeout (default 60sec)
1207 define nat_det_get_timeouts_reply {
1211 u32 tcp_established;
1216 /** \brief Close deterministic NAT session by outside address and port
1217 @param client_index - opaque cookie to identify the sender
1218 @param context - sender context, to match reply w/ request
1219 @param out_addr - outside IPv4 address
1220 @param out_port - outside port
1221 @param ext_addr - external host IPv4 address
1222 @param ext_port - external host port
1224 autoreply define nat_det_close_session_out {
1233 /** \brief Close deterministic NAT session by inside address and port
1234 @param client_index - opaque cookie to identify the sender
1235 @param context - sender context, to match reply w/ request
1236 @param is_nat44 - 1 if NAT44
1237 @param in_addr - inside IP address
1238 @param in_port - inside port
1239 @param ext_addr - external host IP address
1240 @param ext_port - external host port
1242 autoreply define nat_det_close_session_in {
1252 /** \brief Dump determinstic NAT sessions
1253 @param client_index - opaque cookie to identify the sender
1254 @param context - sender context, to match reply w/ request
1255 @param is_nat44 - 1 if NAT44
1256 @param user_addr - address of an inside user whose sessions to dump
1258 define nat_det_session_dump {
1265 /** \brief Deterministic NAT sessions reply
1266 @param context - sender context, to match reply w/ request
1267 @param in_port - inside port
1268 @param ext_addr - external host address
1269 @param ext_port - external host port
1270 @param out_port - outside NAT port
1271 @param state - session state
1272 @param expire - session expiration timestamp
1274 define nat_det_session_details {
1289 /** \brief Add/delete address range to NAT64 pool
1290 @param client_index - opaque cookie to identify the sender
1291 @param context - sender context, to match reply w/ request
1292 @param start_addr - start address of the range
1293 @param end_addr - end address of the range
1294 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
1295 @param is_add - 1 if add, 0 if delete
1297 autoreply define nat64_add_del_pool_addr_range {
1306 /** \brief Dump NAT64 pool addresses
1307 @param client_index - opaque cookie to identify the sender
1308 @param context - sender context, to match reply w/ request
1310 define nat64_pool_addr_dump {
1315 /** \brief NAT64 pool address details response
1316 @param context - sender context, to match reply w/ request
1317 @param address - IPv4 address
1318 @param vfr_id - VRF id of tenant, ~0 means independent of VRF
1320 define nat64_pool_addr_details {
1326 /** \brief Enable/disable NAT64 feature on the interface
1327 @param client_index - opaque cookie to identify the sender
1328 @param context - sender context, to match reply w/ request
1329 @param sw_if_index - index of the interface
1330 @param is_inside - 1 if inside, 0 if outside
1331 @param is_add - 1 if add, 0 if delete
1333 autoreply define nat64_add_del_interface {
1341 /** \brief Dump interfaces with NAT64 feature
1342 @param client_index - opaque cookie to identify the sender
1343 @param context - sender context, to match reply w/ request
1345 define nat64_interface_dump {
1350 /** \brief NAT64 interface details response
1351 @param context - sender context, to match reply w/ request
1352 @param is_inside - 1 if inside, 0 if outside
1353 @param sw_if_index - index of the interface
1355 define nat64_interface_details {
1361 /** \brief Add/delete NAT64 static BIB entry
1362 @param client_index - opaque cookie to identify the sender
1363 @param context - sender context, to match reply w/ request
1364 @param i_addr - inside IPv6 address
1365 @param o_addr - outside IPv4 address
1366 @param i_port - inside port number
1367 @param o_port - outside port number
1368 @param vrf_id - VRF id of tenant
1369 @param proto - protocol number
1370 @param is_add - 1 if add, 0 if delete
1372 autoreply define nat64_add_del_static_bib {
1384 /** \brief Dump NAT64 BIB
1385 @param client_index - opaque cookie to identify the sender
1386 @param context - sender context, to match reply w/ request
1387 @param proto - protocol of the BIB: 255 - all BIBs
1391 otherwise - "unknown" protocol BIB
1393 define nat64_bib_dump {
1399 /** \brief NAT64 BIB details response
1400 @param context - sender context, to match reply w/ request
1401 @param i_addr - inside IPv6 address
1402 @param o_addr - outside IPv4 address
1403 @param i_port - inside port number
1404 @param o_port - outside port number
1405 @param vrf_id - VRF id of tenant
1406 @param proto - protocol number
1407 @param is_static - 1 if static BIB entry, 0 if dynamic
1408 @param ses_num - number of sessions associated with the BIB entry
1410 define nat64_bib_details {
1422 /** \brief Set values of timeouts for NAT64 (seconds, 0 = default)
1423 @param client_index - opaque cookie to identify the sender
1424 @param context - sender context, to match reply w/ request
1425 @param udp - UDP timeout (default 300sec)
1426 @param icmp - ICMP timeout (default 60sec)
1427 @param tcp_trans - TCP transitory timeout (default 240sec)
1428 @param tcp_est - TCP established timeout (default 7440sec)
1429 @param tcp_incoming_syn - TCP incoming SYN timeout (default 6sec)
1431 autoreply define nat64_set_timeouts {
1438 u32 tcp_incoming_syn;
1441 /** \brief Get values of timeouts for NAT64 (seconds)
1442 @param client_index - opaque cookie to identify the sender
1443 @param context - sender context, to match reply w/ request
1445 define nat64_get_timeouts {
1450 /** \brief Get values of timeouts for NAT64 reply
1451 @param context - sender context, to match reply w/ request
1452 @param retval - return code
1453 @param udp - UDP timeout
1454 @param icmp - ICMP timeout
1455 @param tcp_trans - TCP transitory timeout
1456 @param tcp_est - TCP established timeout
1457 @param tcp_incoming_syn - TCP incoming SYN timeout
1459 define nat64_get_timeouts_reply {
1466 u32 tcp_incoming_syn;
1469 /** \brief Dump NAT64 session table
1470 @param client_index - opaque cookie to identify the sender
1471 @param context - sender context, to match reply w/ request
1472 @param proto - protocol of the session table: 255 - all STs
1476 otherwise - "unknown" proto ST
1478 define nat64_st_dump {
1484 /** \brief NAT64 session table details response
1485 @param context - sender context, to match reply w/ request
1486 @param il_addr - inside IPv6 address of the local host
1487 @param ol_addr - outside IPv4 address of the local host
1488 @param il_port - inside port number id of the local host/inside ICMP id
1489 @param ol_port - outside port number of the local host/outside ICMP id
1490 @param il_addr - inside IPv6 address of the remote host
1491 @param ol_addr - outside IPv4 address of the remote host
1492 @param l_port - port number of the remote host (not used for ICMP)
1493 @param vrf_id - VRF id of tenant
1494 @param proto - protocol number
1496 define nat64_st_details {
1509 /** \brief Add/del NAT64 prefix
1510 @param client_index - opaque cookie to identify the sender
1511 @param context - sender context, to match reply w/ request
1512 @param prefix - NAT64 prefix
1513 @param prefix - NAT64 prefix length
1514 @param vrf_id - VRF id of tenant
1515 @param is_add - 1 if add, 0 if delete
1517 autoreply define nat64_add_del_prefix {
1526 /** \brief Dump NAT64 prefix
1527 @param client_index - opaque cookie to identify the sender
1528 @param context - sender context, to match reply w/ request
1530 define nat64_prefix_dump {
1535 /** \brief Dump NAT64 prefix details response
1536 @param context - sender context, to match reply w/ request
1537 @param prefix - NAT64 prefix
1538 @param prefix - NAT64 prefix length
1539 @param vrf_id - VRF id of tenant
1541 define nat64_prefix_details {