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.
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 * Old "snat" APIs, will be deprecated after 17.10
30 /** \brief Add/del NAT44 address range
31 @param client_index - opaque cookie to identify the sender
32 @param context - sender context, to match reply w/ request
33 @param is_ip4 - 1 if address type is IPv4
34 @param first_ip_address - first IP address
35 @param last_ip_address - last IP address
36 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
37 @param is_add - 1 if add, 0 if delete
39 autoreply define snat_add_address_range {
43 u8 first_ip_address[16];
44 u8 last_ip_address[16];
49 /** \brief Dump NAT44 addresses
50 @param client_index - opaque cookie to identify the sender
51 @param context - sender context, to match reply w/ request
53 define snat_address_dump {
58 /** \brief NAT44 address details response
59 @param context - sender context, to match reply w/ request
60 @param is_ip4 - 1 if address type is IPv4
61 @param ip_address - IP address
62 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
64 define snat_address_details {
71 /** \brief Enable/disable NAT44 feature on the interface
72 @param client_index - opaque cookie to identify the sender
73 @param context - sender context, to match reply w/ request
74 @param is_add - 1 if add, 0 if delete
75 @param is_inside - 1 if inside, 0 if outside
76 @param sw_if_index - software index of the interface
78 autoreply define snat_interface_add_del_feature {
86 /** \brief Dump interfaces with NAT44 feature
87 @param client_index - opaque cookie to identify the sender
88 @param context - sender context, to match reply w/ request
90 define snat_interface_dump {
95 /** \brief NAT44 interface details response
96 @param context - sender context, to match reply w/ request
97 @param is_inside - 1 if inside, 0 if outside
98 @param sw_if_index - software index of the interface
100 define snat_interface_details {
106 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
108 @param client_index - opaque cookie to identify the sender
109 @param context - sender context, to match reply w/ request
110 @param is_add - 1 if add, 0 if delete
111 @param is_inside - 1 if inside, 0 if outside
112 @param sw_if_index - software index of the interface
114 autoreply define snat_interface_add_del_output_feature {
122 /** \brief Dump interfaces with NAT44 output feature
123 @param client_index - opaque cookie to identify the sender
124 @param context - sender context, to match reply w/ request
126 define snat_interface_output_feature_dump {
131 /** \brief NAT44 interface with output feature details response
132 @param context - sender context, to match reply w/ request
133 @param is_inside - 1 if inside, 0 if outside
134 @param sw_if_index - software index of the interface
136 define snat_interface_output_feature_details {
142 /** \brief Add/delete NAT44 static mapping
143 @param client_index - opaque cookie to identify the sender
144 @param context - sender context, to match reply w/ request
145 @param is_add - 1 if add, 0 if delete
146 @param is_ip4 - 1 if address type is IPv4
147 @param addr_only - 1 if address only mapping
148 @param local_ip_address - local IP address
149 @param external_ip_address - external IP address
150 @param protocol - IP protocol
151 @param local_port - local port number
152 @param external_port - external port number
153 @param external_sw_if_index - external interface (if set
154 external_ip_address is ignored, ~0 means not
156 @param vfr_id - VRF ID
158 autoreply define snat_add_static_mapping {
164 u8 local_ip_address[16];
165 u8 external_ip_address[16];
169 u32 external_sw_if_index;
173 /** \brief Dump NAT44 static mappings
174 @param client_index - opaque cookie to identify the sender
175 @param context - sender context, to match reply w/ request
177 define snat_static_mapping_dump {
182 /** \brief NAT44 static mapping details response
183 @param context - sender context, to match reply w/ request
184 @param is_ip4 - 1 if address type is IPv4
185 @param addr_only - 1 if address only mapping
186 @param local_ip_address - local IP address
187 @param external_ip_address - external IP address
188 @param protocol - IP protocol
189 @param local_port - local port number
190 @param external_port - external port number
191 @param external_sw_if_index - external interface
192 @param vfr_id - VRF ID
194 define snat_static_mapping_details {
198 u8 local_ip_address[16];
199 u8 external_ip_address[16];
203 u32 external_sw_if_index;
207 /** \brief Control ping from client to api server request
208 @param client_index - opaque cookie to identify the sender
209 @param context - sender context, to match reply w/ request
211 define snat_control_ping
217 /** \brief Control ping from the client to the server response
218 @param client_index - opaque cookie to identify the sender
219 @param context - sender context, to match reply w/ request
220 @param retval - return code for the request
221 @param vpe_pid - the pid of the vpe, returned by the server
223 define snat_control_ping_reply
231 /** \brief Show NAT plugin startup config
232 @param client_index - opaque cookie to identify the sender
233 @param context - sender context, to match reply w/ request
235 define snat_show_config
241 /** \brief Show NAT plugin startup config reply
242 @param context - sender context, to match reply w/ request
243 @param retval - return code for the request
244 @param static_mapping_only - if 1 dynamic translations disabled
245 @param static_mapping_connection_tracking - if 1 create session data
246 @param deterministic - if 1 deterministic mapping
247 @param translation_buckets - number of translation hash buckets
248 @param translation_memory_size - translation hash memory size
249 @param user_buckets - number of user hash buckets
250 @param user_memory_size - user hash memory size
251 @param max_translations_per_user - maximum number of translations per user
252 @param outside_vrf_id - outside VRF id
253 @param inside_vrf_id - default inside VRF id
255 define snat_show_config_reply
259 u8 static_mapping_only;
260 u8 static_mapping_connection_tracking;
262 u32 translation_buckets;
263 u32 translation_memory_size;
265 u32 user_memory_size;
266 u32 max_translations_per_user;
271 /** \brief Set NAT workers
272 @param client_index - opaque cookie to identify the sender
273 @param context - sender context, to match reply w/ request
274 @param worker_mask - NAT workers mask
276 autoreply define snat_set_workers {
282 /** \brief Dump NAT workers
283 @param client_index - opaque cookie to identify the sender
284 @param context - sender context, to match reply w/ request
286 define snat_worker_dump {
291 /** \brief NAT workers details response
292 @param context - sender context, to match reply w/ request
293 @param worker_index - worker index
294 @param lcore_id - lcore ID
295 @param name - worker name
297 define snat_worker_details {
304 /** \brief Add/delete NAT44 pool address from specific interfce
305 @param client_index - opaque cookie to identify the sender
306 @param context - sender context, to match reply w/ request
307 @param is_add - 1 if add, 0 if delete
308 @param sw_if_index - software index of the interface
310 autoreply define snat_add_del_interface_addr {
318 /** \brief Dump NAT44 pool addresses interfaces
319 @param client_index - opaque cookie to identify the sender
320 @param context - sender context, to match reply w/ request
322 define snat_interface_addr_dump {
327 /** \brief NAT44 pool addresses interfaces details response
328 @param context - sender context, to match reply w/ request
329 @param sw_if_index - software index of the interface
331 define snat_interface_addr_details {
336 /** \brief Enable/disable NAT IPFIX logging
337 @param client_index - opaque cookie to identify the sender
338 @param context - sender context, to match reply w/ request
339 @param domain_id - observation domain ID
340 @param src_port - source port number
341 @param enable - 1 if enable, 0 if disable
343 autoreply define snat_ipfix_enable_disable {
351 /** \brief Dump NAT44 users
352 @param client_index - opaque cookie to identify the sender
353 @param context - sender context, to match reply w/ request
355 define snat_user_dump {
360 /** \brief NAT44 users response
361 @param context - sender context, to match reply w/ request
363 @param is_ip4 - 1 if address type is IPv4
364 @param ip_adress - IP address
365 @param nsessions - number of dynamic sessions
366 @param nstaticsessions - number of static sessions
368 define snat_user_details {
377 /** \brief NAT44 user's sessions
378 @param client_index - opaque cookie to identify the sender
379 @param context - sender context, to match reply w/ request
380 @param is_ip4 - 1 if address type is IPv4
381 @param user_ip - IP address of the user to dump
382 @param vrf_id - VRF_ID
384 define snat_user_session_dump {
392 /** \brief NAT44 user's sessions response
393 @param context - sender context, to match reply w/ request
394 @param is_ip4 - 1 if address type is IPv4
395 @param outside_ip_address - outside IP address
396 @param outside_port - outside port
397 @param inside_ip_address - inside IP address
398 @param inside_port - inside port
399 @param protocol - protocol
400 @param is_static - 1 if session is static
401 @param last_heard - last heard timer
402 @param total_bytes - count of bytes sent through session
403 @param total_pkts - count of pakets sent through session
405 define snat_user_session_details {
408 u8 outside_ip_address[16];
410 u8 inside_ip_address[16];
419 /** \brief Add/delete NAT deterministic mapping
420 @param client_index - opaque cookie to identify the sender
421 @param context - sender context, to match reply w/ request
422 @param is_add - 1 if add, 0 if delete
423 @param is_ip4 - 1 if address type is IPv4
424 @param in_addr - inside IP address
425 @param in_plen - inside IP address prefix length
426 @param out_addr - outside IP address
427 @param out_addr - outside IP address prefix length
429 autoreply define snat_add_det_map {
441 /** \brief Get outside address and port range from inside address
442 @param client_index - opaque cookie to identify the sender
443 @param context - sender context, to match reply w/ request
444 @param is_ip4 - 1 if address type is IPv4
445 @param in_addr - inside IP address
447 define snat_det_forward {
454 /** \brief Get outside address and port range from inside address
455 @param context - sender context, to match reply w/ request
456 @param retval - return code
457 @param out_port_lo - outside port range start
458 @param out_port_hi - outside port range end
459 @param is_ip4 - 1 if address type is IPv4
460 @param out_addr - outside IP address
462 define snat_det_forward_reply {
471 /** \brief Get inside address from outside address and port
472 @param client_index - opaque cookie to identify the sender
473 @param context - sender context, to match reply w/ request
474 @param out_port - outside port
475 @param is_ip4 - 1 if address type is IPv4
476 @param out_addr - outside IP address
478 define snat_det_reverse {
486 /** \brief Get inside address from outside address and port reply
487 @param context - sender context, to match reply w/ request
488 @param retval - return code
489 @param is_ip4 - 1 if address type is IPv4
490 @param in_addr - inside IP address
492 define snat_det_reverse_reply {
499 /** \brief Dump NAT deterministic mappings
500 @param client_index - opaque cookie to identify the sender
501 @param context - sender context, to match reply w/ request
503 define snat_det_map_dump {
508 /** \brief NAT users response
509 @param context - sender context, to match reply w/ request
510 @param is_ip4 - 1 if address type is IPv4
511 @param in_addr - inside IP address
512 @param in_plen - inside IP address prefix length
513 @param out_addr - outside IP address
514 @param out_plen - outside IP address prefix length
515 @param sharing_ratio - outside to inside address sharing ratio
516 @param ports_per_host - number of ports available to a host
517 @param ses_num - number of sessions belonging to this mapping
519 define snat_det_map_details {
531 /** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
532 @param client_index - opaque cookie to identify the sender
533 @param context - sender context, to match reply w/ request
534 @param udp - UDP timeout (default 300sec)
535 @param tcp_established - TCP established timeout (default 7440sec)
536 @param tcp_transitory - TCP transitory timeout (default 240sec)
537 @param icmp - ICMP timeout (default 60sec)
539 autoreply define snat_det_set_timeouts {
548 /** \brief Get values of timeouts for deterministic NAT (seconds)
549 @param client_index - opaque cookie to identify the sender
550 @param context - sender context, to match reply w/ request
552 define snat_det_get_timeouts {
557 /** \brief Get values of timeouts for deterministic NAT reply
558 @param context - sender context, to match reply w/ request
559 @param retval - return code
560 @param udp - UDP timeout (default 300sec)
561 @param tcp_established - TCP established timeout (default 7440sec)
562 @param tcp_transitory - TCP transitory timeout (default 240sec)
563 @param icmp - ICMP timeout (default 60sec)
565 define snat_det_get_timeouts_reply {
574 /** \brief Close deterministic NAT session by outside address and port
575 @param client_index - opaque cookie to identify the sender
576 @param context - sender context, to match reply w/ request
577 @param is_ip4 - 1 if address type is IPv4
578 @param out_addr - outside IP address
579 @param out_port - outside port
580 @param ext_addr - external host address
581 @param ext_port - external host port
583 autoreply define snat_det_close_session_out {
593 /** \brief Close deterministic NAT session by inside address and port
594 @param client_index - opaque cookie to identify the sender
595 @param context - sender context, to match reply w/ request
596 @param is_ip4 - 1 if address type is IPv4
597 @param in_addr - inside IP address
598 @param in_port - inside port
599 @param ext_addr - external host address
600 @param ext_port - external host port
602 autoreply define snat_det_close_session_in {
612 /** \brief Dump determinstic NAT sessions
613 @param client_index - opaque cookie to identify the sender
614 @param context - sender context, to match reply w/ request
615 @param is_ip4 - 1 if address type is IPv4
616 @param user_addr - address of an inside user whose sessions to dump
618 define snat_det_session_dump {
625 /** \brief Deterministic NAT sessions reply
626 @param context - sender context, to match reply w/ request
627 @param is_ip4 - 1 if address type is IPv4
628 @param in_port - inside port
629 @param ext_addr - external host address
630 @param ext_port - external host port
631 @param out_port - outside NAT port
632 @param state - session state
633 @param expire - session expiration timestamp
635 define snat_det_session_details {
648 * Common NAT plugin APIs
651 /** \brief Control ping from client to api server request
652 @param client_index - opaque cookie to identify the sender
653 @param context - sender context, to match reply w/ request
655 define nat_control_ping
661 /** \brief Control ping from the client to the server response
662 @param client_index - opaque cookie to identify the sender
663 @param context - sender context, to match reply w/ request
664 @param retval - return code for the request
665 @param vpe_pid - the pid of the vpe, returned by the server
667 define nat_control_ping_reply
675 /** \brief Show NAT plugin startup config
676 @param client_index - opaque cookie to identify the sender
677 @param context - sender context, to match reply w/ request
679 define nat_show_config
685 /** \brief Show NAT plugin startup config reply
686 @param context - sender context, to match reply w/ request
687 @param retval - return code for the request
688 @param static_mapping_only - if 1 dynamic translations disabled
689 @param static_mapping_connection_tracking - if 1 create session data
690 @param deterministic - if 1 deterministic mapping
691 @param translation_buckets - number of translation hash buckets
692 @param translation_memory_size - translation hash memory size
693 @param user_buckets - number of user hash buckets
694 @param user_memory_size - user hash memory size
695 @param max_translations_per_user - maximum number of translations per user
696 @param outside_vrf_id - outside VRF id
697 @param inside_vrf_id - default inside VRF id
699 define nat_show_config_reply
703 u8 static_mapping_only;
704 u8 static_mapping_connection_tracking;
706 u32 translation_buckets;
707 u32 translation_memory_size;
709 u32 user_memory_size;
710 u32 max_translations_per_user;
715 /** \brief Set NAT workers
716 @param client_index - opaque cookie to identify the sender
717 @param context - sender context, to match reply w/ request
718 @param worker_mask - NAT workers mask
720 autoreply define nat_set_workers {
726 /** \brief Dump NAT workers
727 @param client_index - opaque cookie to identify the sender
728 @param context - sender context, to match reply w/ request
730 define nat_worker_dump {
735 /** \brief NAT workers details response
736 @param context - sender context, to match reply w/ request
737 @param worker_index - worker index
738 @param lcore_id - lcore ID
739 @param name - worker name
741 define nat_worker_details {
748 /** \brief Enable/disable NAT IPFIX logging
749 @param client_index - opaque cookie to identify the sender
750 @param context - sender context, to match reply w/ request
751 @param domain_id - observation domain ID
752 @param src_port - source port number
753 @param enable - 1 if enable, 0 if disable
755 autoreply define nat_ipfix_enable_disable {
767 /** \brief Add/del NAT44 address range
768 @param client_index - opaque cookie to identify the sender
769 @param context - sender context, to match reply w/ request
770 @param first_ip_address - first IPv4 address
771 @param last_ip_address - last IPv4 address
772 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
773 @param is_add - 1 if add, 0 if delete
775 autoreply define nat44_add_del_address_range {
778 u8 first_ip_address[4];
779 u8 last_ip_address[4];
784 /** \brief Dump NAT44 addresses
785 @param client_index - opaque cookie to identify the sender
786 @param context - sender context, to match reply w/ request
788 define nat44_address_dump {
793 /** \brief NAT44 address details response
794 @param context - sender context, to match reply w/ request
795 @param ip_address - IPv4 address
796 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
798 define nat44_address_details {
804 /** \brief Enable/disable NAT44 feature on the interface
805 @param client_index - opaque cookie to identify the sender
806 @param context - sender context, to match reply w/ request
807 @param is_add - 1 if add, 0 if delete
808 @param is_inside - 1 if inside, 0 if outside
809 @param sw_if_index - software index of the interface
811 autoreply define nat44_interface_add_del_feature {
819 /** \brief Dump interfaces with NAT44 feature
820 @param client_index - opaque cookie to identify the sender
821 @param context - sender context, to match reply w/ request
823 define nat44_interface_dump {
828 /** \brief NAT44 interface details response
829 @param context - sender context, to match reply w/ request
830 @param is_inside - 1 if inside, 0 if outside
831 @param sw_if_index - software index of the interface
833 define nat44_interface_details {
839 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
841 @param client_index - opaque cookie to identify the sender
842 @param context - sender context, to match reply w/ request
843 @param is_add - 1 if add, 0 if delete
844 @param is_inside - 1 if inside, 0 if outside
845 @param sw_if_index - software index of the interface
847 autoreply define nat44_interface_add_del_output_feature {
855 /** \brief Dump interfaces with NAT44 output feature
856 @param client_index - opaque cookie to identify the sender
857 @param context - sender context, to match reply w/ request
859 define nat44_interface_output_feature_dump {
864 /** \brief NAT44 interface with output feature details response
865 @param context - sender context, to match reply w/ request
866 @param is_inside - 1 if inside, 0 if outside
867 @param sw_if_index - software index of the interface
869 define nat44_interface_output_feature_details {
875 /** \brief Add/delete NAT44 static mapping
876 @param client_index - opaque cookie to identify the sender
877 @param context - sender context, to match reply w/ request
878 @param is_add - 1 if add, 0 if delete
879 @param addr_only - 1 if address only mapping
880 @param local_ip_address - local IPv4 address
881 @param external_ip_address - external IPv4 address
882 @param protocol - IP protocol
883 @param local_port - local port number
884 @param external_port - external port number
885 @param external_sw_if_index - external interface (if set
886 external_ip_address is ignored, ~0 means not
888 @param vfr_id - VRF ID
890 autoreply define nat44_add_del_static_mapping {
895 u8 local_ip_address[4];
896 u8 external_ip_address[4];
900 u32 external_sw_if_index;
904 /** \brief Dump NAT44 static mappings
905 @param client_index - opaque cookie to identify the sender
906 @param context - sender context, to match reply w/ request
908 define nat44_static_mapping_dump {
913 /** \brief NAT44 static mapping details response
914 @param context - sender context, to match reply w/ request
915 @param addr_only - 1 if address only mapping
916 @param local_ip_address - local IPv4 address
917 @param external_ip_address - external IPv4 address
918 @param protocol - IP protocol
919 @param local_port - local port number
920 @param external_port - external port number
921 @param external_sw_if_index - external interface
922 @param vfr_id - VRF ID
924 define nat44_static_mapping_details {
927 u8 local_ip_address[4];
928 u8 external_ip_address[4];
932 u32 external_sw_if_index;
936 /** \brief Add/delete NAT44 pool address from specific interfce
937 @param client_index - opaque cookie to identify the sender
938 @param context - sender context, to match reply w/ request
939 @param is_add - 1 if add, 0 if delete
940 @param sw_if_index - software index of the interface
942 autoreply define nat44_add_del_interface_addr {
950 /** \brief Dump NAT44 pool addresses interfaces
951 @param client_index - opaque cookie to identify the sender
952 @param context - sender context, to match reply w/ request
954 define nat44_interface_addr_dump {
959 /** \brief NAT44 pool addresses interfaces details response
960 @param context - sender context, to match reply w/ request
961 @param sw_if_index - software index of the interface
963 define nat44_interface_addr_details {
968 /** \brief Dump NAT44 users
969 @param client_index - opaque cookie to identify the sender
970 @param context - sender context, to match reply w/ request
972 define nat44_user_dump {
977 /** \brief NAT44 users response
978 @param context - sender context, to match reply w/ request
980 @param ip_adress - IPv4 address
981 @param nsessions - number of dynamic sessions
982 @param nstaticsessions - number of static sessions
984 define nat44_user_details {
992 /** \brief NAT44 user's sessions
993 @param client_index - opaque cookie to identify the sender
994 @param context - sender context, to match reply w/ request
995 @param is_ip4 - 1 if address type is IPv4
996 @param user_ip - IP address of the user to dump
997 @param vrf_id - VRF_ID
999 define nat44_user_session_dump {
1006 /** \brief NAT44 user's sessions response
1007 @param context - sender context, to match reply w/ request
1008 @param outside_ip_address - outside IPv4 address
1009 @param outside_port - outside port
1010 @param inside_ip_address - inside IPv4 address
1011 @param inside_port - inside port
1012 @param protocol - protocol
1013 @param is_static - 1 if session is static
1014 @param last_heard - last heard timer
1015 @param total_bytes - count of bytes sent through session
1016 @param total_pkts - count of pakets sent through session
1018 define nat44_user_session_details {
1020 u8 outside_ip_address[4];
1022 u8 inside_ip_address[4];
1031 typeonly manual_endian define nat44_lb_addr_port {
1037 autoreply manual_endian define nat44_add_del_lb_static_mapping {
1041 u8 external_addr[4];
1046 vl_api_nat44_lb_addr_port_t locals[local_num];
1049 define nat44_lb_static_mapping_dump {
1054 manual_endian define nat44_lb_static_mapping_details {
1056 u8 external_addr[4];
1061 vl_api_nat44_lb_addr_port_t locals[local_num];
1065 * Deterministic NAT (CGN) APIs
1068 /** \brief Add/delete NAT deterministic mapping
1069 @param client_index - opaque cookie to identify the sender
1070 @param context - sender context, to match reply w/ request
1071 @param is_add - 1 if add, 0 if delete
1072 @param is_nat44 - 1 if NAT44
1073 @param in_addr - inside IP address
1074 @param in_plen - inside IP address prefix length
1075 @param out_addr - outside IPv4 address
1076 @param out_addr - outside IPv4 address prefix length
1078 autoreply define nat_det_add_del_map {
1090 /** \brief Get outside address and port range from inside address
1091 @param client_index - opaque cookie to identify the sender
1092 @param context - sender context, to match reply w/ request
1093 @param is_nat44 - 1 if NAT44
1094 @param in_addr - inside IP address
1096 define nat_det_forward {
1103 /** \brief Get outside address and port range from inside address
1104 @param context - sender context, to match reply w/ request
1105 @param retval - return code
1106 @param out_port_lo - outside port range start
1107 @param out_port_hi - outside port range end
1108 @param out_addr - outside IPv4 address
1110 define nat_det_forward_reply {
1118 /** \brief Get inside address from outside address and port
1119 @param client_index - opaque cookie to identify the sender
1120 @param context - sender context, to match reply w/ request
1121 @param out_port - outside port
1122 @param out_addr - outside IPv4 address
1124 define nat_det_reverse {
1131 /** \brief Get inside address from outside address and port reply
1132 @param context - sender context, to match reply w/ request
1133 @param retval - return code
1134 @param is_nat44 - 1 if NAT44
1135 @param in_addr - inside IP address
1137 define nat_det_reverse_reply {
1144 /** \brief Dump NAT deterministic mappings
1145 @param client_index - opaque cookie to identify the sender
1146 @param context - sender context, to match reply w/ request
1148 define nat_det_map_dump {
1153 /** \brief NAT users response
1154 @param context - sender context, to match reply w/ request
1155 @param is_nat44 - 1 if NAT44
1156 @param in_addr - inside IP address
1157 @param in_plen - inside IP address prefix length
1158 @param out_addr - outside IPv4 address
1159 @param out_plen - outside IPv4 address prefix length
1160 @param sharing_ratio - outside to inside address sharing ratio
1161 @param ports_per_host - number of ports available to a host
1162 @param ses_num - number of sessions belonging to this mapping
1164 define nat_det_map_details {
1176 /** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
1177 @param client_index - opaque cookie to identify the sender
1178 @param context - sender context, to match reply w/ request
1179 @param udp - UDP timeout (default 300sec)
1180 @param tcp_established - TCP established timeout (default 7440sec)
1181 @param tcp_transitory - TCP transitory timeout (default 240sec)
1182 @param icmp - ICMP timeout (default 60sec)
1184 autoreply define nat_det_set_timeouts {
1188 u32 tcp_established;
1193 /** \brief Get values of timeouts for deterministic NAT (seconds)
1194 @param client_index - opaque cookie to identify the sender
1195 @param context - sender context, to match reply w/ request
1197 define nat_det_get_timeouts {
1202 /** \brief Get values of timeouts for deterministic NAT reply
1203 @param context - sender context, to match reply w/ request
1204 @param retval - return code
1205 @param udp - UDP timeout (default 300sec)
1206 @param tcp_established - TCP established timeout (default 7440sec)
1207 @param tcp_transitory - TCP transitory timeout (default 240sec)
1208 @param icmp - ICMP timeout (default 60sec)
1210 define nat_det_get_timeouts_reply {
1214 u32 tcp_established;
1219 /** \brief Close deterministic NAT session by outside address and port
1220 @param client_index - opaque cookie to identify the sender
1221 @param context - sender context, to match reply w/ request
1222 @param out_addr - outside IPv4 address
1223 @param out_port - outside port
1224 @param ext_addr - external host IPv4 address
1225 @param ext_port - external host port
1227 autoreply define nat_det_close_session_out {
1236 /** \brief Close deterministic NAT session by inside address and port
1237 @param client_index - opaque cookie to identify the sender
1238 @param context - sender context, to match reply w/ request
1239 @param is_nat44 - 1 if NAT44
1240 @param in_addr - inside IP address
1241 @param in_port - inside port
1242 @param ext_addr - external host IP address
1243 @param ext_port - external host port
1245 autoreply define nat_det_close_session_in {
1255 /** \brief Dump determinstic NAT sessions
1256 @param client_index - opaque cookie to identify the sender
1257 @param context - sender context, to match reply w/ request
1258 @param is_nat44 - 1 if NAT44
1259 @param user_addr - address of an inside user whose sessions to dump
1261 define nat_det_session_dump {
1268 /** \brief Deterministic NAT sessions reply
1269 @param context - sender context, to match reply w/ request
1270 @param in_port - inside port
1271 @param ext_addr - external host address
1272 @param ext_port - external host port
1273 @param out_port - outside NAT port
1274 @param state - session state
1275 @param expire - session expiration timestamp
1277 define nat_det_session_details {
1292 /** \brief Add/delete address range to NAT64 pool
1293 @param client_index - opaque cookie to identify the sender
1294 @param context - sender context, to match reply w/ request
1295 @param start_addr - start address of the range
1296 @param end_addr - end address of the range
1297 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
1298 @param is_add - 1 if add, 0 if delete
1300 autoreply define nat64_add_del_pool_addr_range {
1309 /** \brief Dump NAT64 pool addresses
1310 @param client_index - opaque cookie to identify the sender
1311 @param context - sender context, to match reply w/ request
1313 define nat64_pool_addr_dump {
1318 /** \brief NAT64 pool address details response
1319 @param context - sender context, to match reply w/ request
1320 @param address - IPv4 address
1321 @param vfr_id - VRF id of tenant, ~0 means independent of VRF
1323 define nat64_pool_addr_details {
1329 /** \brief Enable/disable NAT64 feature on the interface
1330 @param client_index - opaque cookie to identify the sender
1331 @param context - sender context, to match reply w/ request
1332 @param sw_if_index - index of the interface
1333 @param is_inside - 1 if inside, 0 if outside
1334 @param is_add - 1 if add, 0 if delete
1336 autoreply define nat64_add_del_interface {
1344 /** \brief Dump interfaces with NAT64 feature
1345 @param client_index - opaque cookie to identify the sender
1346 @param context - sender context, to match reply w/ request
1348 define nat64_interface_dump {
1353 /** \brief NAT64 interface details response
1354 @param context - sender context, to match reply w/ request
1355 @param is_inside - 1 if inside, 0 if outside
1356 @param sw_if_index - index of the interface
1358 define nat64_interface_details {
1364 /** \brief Add/delete NAT64 static BIB entry
1365 @param client_index - opaque cookie to identify the sender
1366 @param context - sender context, to match reply w/ request
1367 @param i_addr - inside IPv6 address
1368 @param o_addr - outside IPv4 address
1369 @param i_port - inside port number
1370 @param o_port - outside port number
1371 @param vrf_id - VRF id of tenant
1372 @param proto - protocol number
1373 @param is_add - 1 if add, 0 if delete
1375 autoreply define nat64_add_del_static_bib {
1387 /** \brief Dump NAT64 BIB
1388 @param client_index - opaque cookie to identify the sender
1389 @param context - sender context, to match reply w/ request
1390 @param proto - protocol of the BIB: 255 - all BIBs
1394 otherwise - "unknown" protocol BIB
1396 define nat64_bib_dump {
1402 /** \brief NAT64 BIB details response
1403 @param context - sender context, to match reply w/ request
1404 @param i_addr - inside IPv6 address
1405 @param o_addr - outside IPv4 address
1406 @param i_port - inside port number
1407 @param o_port - outside port number
1408 @param vrf_id - VRF id of tenant
1409 @param proto - protocol number
1410 @param is_static - 1 if static BIB entry, 0 if dynamic
1411 @param ses_num - number of sessions associated with the BIB entry
1413 define nat64_bib_details {
1425 /** \brief Set values of timeouts for NAT64 (seconds, 0 = default)
1426 @param client_index - opaque cookie to identify the sender
1427 @param context - sender context, to match reply w/ request
1428 @param udp - UDP timeout (default 300sec)
1429 @param icmp - ICMP timeout (default 60sec)
1430 @param tcp_trans - TCP transitory timeout (default 240sec)
1431 @param tcp_est - TCP established timeout (default 7440sec)
1432 @param tcp_incoming_syn - TCP incoming SYN timeout (default 6sec)
1434 autoreply define nat64_set_timeouts {
1441 u32 tcp_incoming_syn;
1444 /** \brief Get values of timeouts for NAT64 (seconds)
1445 @param client_index - opaque cookie to identify the sender
1446 @param context - sender context, to match reply w/ request
1448 define nat64_get_timeouts {
1453 /** \brief Get values of timeouts for NAT64 reply
1454 @param context - sender context, to match reply w/ request
1455 @param retval - return code
1456 @param udp - UDP timeout
1457 @param icmp - ICMP timeout
1458 @param tcp_trans - TCP transitory timeout
1459 @param tcp_est - TCP established timeout
1460 @param tcp_incoming_syn - TCP incoming SYN timeout
1462 define nat64_get_timeouts_reply {
1469 u32 tcp_incoming_syn;
1472 /** \brief Dump NAT64 session table
1473 @param client_index - opaque cookie to identify the sender
1474 @param context - sender context, to match reply w/ request
1475 @param proto - protocol of the session table: 255 - all STs
1479 otherwise - "unknown" proto ST
1481 define nat64_st_dump {
1487 /** \brief NAT64 session table details response
1488 @param context - sender context, to match reply w/ request
1489 @param il_addr - inside IPv6 address of the local host
1490 @param ol_addr - outside IPv4 address of the local host
1491 @param il_port - inside port number id of the local host/inside ICMP id
1492 @param ol_port - outside port number of the local host/outside ICMP id
1493 @param il_addr - inside IPv6 address of the remote host
1494 @param ol_addr - outside IPv4 address of the remote host
1495 @param l_port - port number of the remote host (not used for ICMP)
1496 @param vrf_id - VRF id of tenant
1497 @param proto - protocol number
1499 define nat64_st_details {
1512 /** \brief Add/del NAT64 prefix
1513 @param client_index - opaque cookie to identify the sender
1514 @param context - sender context, to match reply w/ request
1515 @param prefix - NAT64 prefix
1516 @param prefix - NAT64 prefix length
1517 @param vrf_id - VRF id of tenant
1518 @param is_add - 1 if add, 0 if delete
1520 autoreply define nat64_add_del_prefix {
1529 /** \brief Dump NAT64 prefix
1530 @param client_index - opaque cookie to identify the sender
1531 @param context - sender context, to match reply w/ request
1533 define nat64_prefix_dump {
1538 /** \brief Dump NAT64 prefix details response
1539 @param context - sender context, to match reply w/ request
1540 @param prefix - NAT64 prefix
1541 @param prefix - NAT64 prefix length
1542 @param vrf_id - VRF id of tenant
1544 define nat64_prefix_details {