2 * Copyright (c) 2020 Cisco and/or its affiliates.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 option version = "5.5.0";
17 import "vnet/ip/ip_types.api";
18 import "vnet/interface_types.api";
19 import "plugins/nat/lib/nat_types.api";
23 * @brief VPP control-plane API messages.
25 * This file defines VPP control-plane API messages which are generally
26 * called through a shared memory interface.
29 enum nat44_config_flags : u8
31 NAT44_IS_ENDPOINT_INDEPENDENT = 0x00,
32 NAT44_IS_ENDPOINT_DEPENDENT = 0x01,
33 NAT44_IS_STATIC_MAPPING_ONLY = 0x02,
34 NAT44_IS_CONNECTION_TRACKING = 0x04,
35 NAT44_IS_OUT2IN_DPO = 0x08,
38 /** \brief Enable/disable NAT44ED plugin
39 @param client_index - opaque cookie to identify the sender
40 @param context - sender context, to match reply w/ request
41 @param inside_vrf - inside vrf id
42 @param outside_vrf - outside vrf id
43 @param sessions - maximum number of sessions per thread
44 @param session_memory - overwrite hash allocation parameter
45 @param enable - true if enable, false if disable
46 @param flags - flag NAT44_IS_STATIC_MAPPING_ONLY,
47 NAT44_IS_CONNECTION_TRACKING
49 autoreply define nat44_ed_plugin_enable_disable {
57 vl_api_nat44_config_flags_t flags;
60 /** \brief Enable/disable forwarding for NAT44
61 Forward packets which don't match existing translation
62 or static mapping instead of dropping them.
63 @param client_index - opaque cookie to identify the sender
64 @param context - sender context, to match reply w/ request
65 @param enable - true for enable, false for disable
67 autoreply define nat44_forwarding_enable_disable {
74 /** \brief Enable/disable NAT IPFIX logging
75 @param client_index - opaque cookie to identify the sender
76 @param context - sender context, to match reply w/ request
77 @param domain_id - observation domain ID
78 @param src_port - source port number
79 @param enable - true if enable, false if disable
81 autoreply define nat_ipfix_enable_disable {
90 /** \brief Set values of timeouts for NAT sessions (seconds)
91 @param client_index - opaque cookie to identify the sender
92 @param context - sender context, to match reply w/ request
93 @param udp - UDP timeout (default 300sec)
94 @param tcp_established - TCP established timeout (default 7440sec)
95 @param tcp_transitory - TCP transitory timeout (default 240sec)
96 @param icmp - ICMP timeout (default 60sec)
98 autoreply define nat_set_timeouts {
108 /** \brief NAT44 set session limit
109 @param client_index - opaque cookie to identify the sender
110 @param context - sender context, to match reply w/ request
111 @param session_limit - session limit
112 @param vrf_id - vrf id
114 autoreply define nat44_set_session_limit {
121 /** \brief Show NAT44 plugin running config
122 @param client_index - opaque cookie to identify the sender
123 @param context - sender context, to match reply w/ request
125 define nat44_show_running_config
131 /** \brief Show NAT44 plugin running config reply
132 @param context - sender context, to match reply w/ request
133 @param retval - return code for the request
134 @param inside_vrf - default inside VRF id
135 @param outside_vrf - outside VRF id
136 @param users - maximum number of users per worker thread
137 (NAT44_IS_ENDPOINT_INDEPENDENT)
138 @param sessions - maximum number of sessions per worker thread
139 @param user_sessions - maximum number of sessions per user
140 (NAT44_IS_ENDPOINT_INDEPENDENT)
141 @param user_buckets - number of user hash buckets
142 (NAT44_IS_ENDPOINT_INDEPENDENT)
143 @param translation_buckets - number of translation hash buckets
144 @param flags - flag NAT44_IS_ENDPOINT_INDEPENDENT,
145 NAT44_IS_ENDPOINT_DEPENDENT,
146 NAT44_IS_STATIC_MAPPING_ONLY,
147 NAT44_IS_CONNECTION_TRACKING,
150 define nat44_show_running_config_reply
160 u32 translation_buckets;
161 bool forwarding_enabled;
162 bool ipfix_logging_enabled;
163 vl_api_nat_timeouts_t timeouts;
164 vl_api_nat_log_level_t log_level;
165 vl_api_nat44_config_flags_t flags;
168 /** \brief Set NAT workers
169 @param client_index - opaque cookie to identify the sender
170 @param context - sender context, to match reply w/ request
171 @param worker_mask - NAT workers mask
173 autoreply define nat_set_workers {
179 /** \brief Dump NAT workers
180 @param client_index - opaque cookie to identify the sender
181 @param context - sender context, to match reply w/ request
183 define nat_worker_dump {
188 /** \brief NAT workers details response
189 @param context - sender context, to match reply w/ request
190 @param worker_index - worker index
191 @param lcore_id - lcore ID
192 @param name - worker name
194 define nat_worker_details {
201 /** \brief Add/delete inter VRF NAT44-ED routing table
202 @param client_index - opaque cookie to identify the sender
203 @param context - sender context, to match reply w/ request
204 @param table_vrf_id - id of (rx) VRF used for resolving
205 destination (tx) VRF during dynamic
207 @param is_add - if true add else del
209 autoreply define nat44_ed_add_del_vrf_table {
216 /** \brief Add/del inter VRF NAT44-ED route record
217 @param client_index - opaque cookie to identify the sender
218 @param context - sender context, to match reply w/ request
219 @param table_vrf_id - id of the VRF NAT routing table
220 @param vrf_id - id of resolving destination (tx) VRF table
221 @param is_add - if true add else del
223 autoreply define nat44_ed_add_del_vrf_route {
231 /** \brief Dump NAT44-ED inter VRF NAT routing tables
232 @param client_index - opaque cookie to identify the sender
233 @param context - sender context, to match reply w/ request
235 define nat44_ed_vrf_tables_dump {
241 /** \brief NAT44-ED inter VRF NAT routing table details response
242 @param context - sender context, to match reply w/ request
243 @param table_vrf_id - id of the VRF NAT routing table
244 @param n_vrf_ids - number of vrf_ids
245 @param vrf_ids - ids of resolving destination (tx) VRFs
247 define nat44_ed_vrf_tables_details {
251 u32 vrf_ids[n_vrf_ids];
255 /** \brief Dump NAT44-ED inter VRF NAT routing tables
256 @param client_index - opaque cookie to identify the sender
257 @param context - sender context, to match reply w/ request
259 define nat44_ed_vrf_tables_v2_dump {
262 option status="in_progress";
265 /** \brief NAT44-ED inter VRF NAT routing table details response
266 @param context - sender context, to match reply w/ request
267 @param table_vrf_id - id of the VRF NAT routing table
268 @param n_vrf_ids - number of vrf_ids
269 @param vrf_ids - ids of resolving destination (tx) VRFs
271 define nat44_ed_vrf_tables_v2_details {
275 u32 vrf_ids[n_vrf_ids];
276 option status="in_progress";
279 /** \brief Set TCP MSS rewriting configuration
280 @param client_index - opaque cookie to identify the sender
281 @param context - sender context, to match reply w/ request
282 @param mss_value - MSS value to be used for MSS rewriting
283 @param enable - if true enable MSS rewriting feature else disable
285 autoreply define nat_set_mss_clamping {
292 /** \brief Get TCP MSS rewriting configuration
293 @param client_index - opaque cookie to identify the sender
294 @param context - sender context, to match reply w/ request
296 define nat_get_mss_clamping {
301 /** \brief Get TCP MSS rewriting configuration reply
302 @param context - sender context, to match reply w/ request
303 @param retval - return code
304 @param mss_value - MSS value to be used for MSS rewriting
305 @param enable - if true enable MSS rewriting feature else disable
307 define nat_get_mss_clamping_reply {
314 /** \brief Set NAT handoff frame queue options
315 @param client_index - opaque cookie to identify the sender
316 @param context - sender context, to match reply w/ request
317 @param frame_queue_nelts - number of worker handoff frame queue elements
319 autoreply define nat44_ed_set_fq_options {
322 u32 frame_queue_nelts;
325 /** \brief Show NAT handoff frame queue options
326 @param client_index - opaque cookie to identify the sender
327 @param context - sender context, to match reply w/ request
329 define nat44_ed_show_fq_options
335 /** \brief Show NAT handoff frame queue options reply
336 @param context - sender context, to match reply w/ request
337 @param retval - return code for the request
338 @param frame_queue_nelts - number of worker handoff frame queue elements
340 define nat44_ed_show_fq_options_reply
344 u32 frame_queue_nelts;
347 /** \brief Add/delete NAT44 pool address from specific interfce
348 @param client_index - opaque cookie to identify the sender
349 @param context - sender context, to match reply w/ request
350 @param is_add - true if add, false if delete
351 @param sw_if_index - software index of the interface
352 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts
354 autoreply define nat44_add_del_interface_addr {
358 vl_api_interface_index_t sw_if_index;
359 vl_api_nat_config_flags_t flags;
362 /** \brief Dump NAT44 pool addresses interfaces
363 @param client_index - opaque cookie to identify the sender
364 @param context - sender context, to match reply w/ request
366 define nat44_interface_addr_dump {
371 /** \brief NAT44 pool addresses interfaces details response
372 @param context - sender context, to match reply w/ request
373 @param sw_if_index - software index of the interface
374 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts
377 define nat44_interface_addr_details {
379 vl_api_interface_index_t sw_if_index;
380 vl_api_nat_config_flags_t flags;
383 /** \brief Add/del NAT44 address range
384 @param client_index - opaque cookie to identify the sender
385 @param context - sender context, to match reply w/ request
386 @param first_ip_address - first IPv4 address
387 @param last_ip_address - last IPv4 address
388 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
389 @param is_add - true if add, false if delete
390 @param flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts
393 autoreply define nat44_add_del_address_range {
396 vl_api_ip4_address_t first_ip_address;
397 vl_api_ip4_address_t last_ip_address;
400 vl_api_nat_config_flags_t flags;
403 /** \brief Dump NAT44 addresses
404 @param client_index - opaque cookie to identify the sender
405 @param context - sender context, to match reply w/ request
407 define nat44_address_dump {
412 /** \brief NAT44 address details response
413 @param context - sender context, to match reply w/ request
414 @param ip_address - IPv4 address
415 @param flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts
416 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
418 define nat44_address_details {
420 vl_api_ip4_address_t ip_address;
421 vl_api_nat_config_flags_t flags;
425 /** \brief Enable/disable NAT44 feature on the interface
426 @param client_index - opaque cookie to identify the sender
427 @param context - sender context, to match reply w/ request
428 @param is_add - true if add, false if delete
429 @param flags - flag NAT_IS_INSIDE if interface is inside else
431 @param sw_if_index - software index of the interface
433 autoreply define nat44_interface_add_del_feature {
437 vl_api_nat_config_flags_t flags;
438 vl_api_interface_index_t sw_if_index;
441 /** \brief Dump interfaces with NAT44 feature
442 @param client_index - opaque cookie to identify the sender
443 @param context - sender context, to match reply w/ request
445 define nat44_interface_dump {
450 /** \brief NAT44 interface details response
451 @param context - sender context, to match reply w/ request
452 @param sw_if_index - software index of the interface
453 @param flags - flag NAT_IS_INSIDE if interface is inside,
454 flag NAT_IS_OUTSIDE if interface is outside
455 and if both flags are set the interface is
456 both inside and outside
458 define nat44_interface_details {
460 vl_api_nat_config_flags_t flags;
461 vl_api_interface_index_t sw_if_index;
464 /** \brief add/del NAT output interface (postrouting
466 @param client_index - opaque cookie to identify the sender
467 @param context - sender context, to match reply w/ request
468 @param is_add - true if add, false if delete
469 @param sw_if_index - software index of the interface
471 autoendian autoreply define nat44_ed_add_del_output_interface {
475 vl_api_interface_index_t sw_if_index;
479 rpc nat44_ed_output_interface_get returns nat44_ed_output_interface_get_reply
480 stream nat44_ed_output_interface_details;
483 define nat44_ed_output_interface_get
490 define nat44_ed_output_interface_get_reply
497 define nat44_ed_output_interface_details
500 vl_api_interface_index_t sw_if_index;
503 /** \brief Add/delete NAT44 static mapping
504 @param client_index - opaque cookie to identify the sender
505 @param context - sender context, to match reply w/ request
506 @param is_add - true if add, false if delete
507 @param flags - flag NAT_IS_ADDR_ONLY if address only mapping,
508 flag nat_is_twice_nat if nat address range for external hosts,
509 flag NAT_IS_SELF_TWICE_NAT if translate external host address
510 and port whenever external host address equals local
511 address of internal host,
512 flag NAT_IS_OUT2IN_ONLY if rule match only out2in direction
513 @param local_ip_address - local IPv4 address
514 @param external_ip_address - external IPv4 address
515 @param protocol - IP protocol, used only if addr_only=0
516 @param local_port - local port number, used only if addr_only=0
517 @param external_port - external port number, used only if addr_only=0
518 @param external_sw_if_index - external interface (if set
519 external_ip_address is ignored, ~0 means not
521 @param vfr_id - VRF ID
522 @param tag - opaque string tag
524 autoreply define nat44_add_del_static_mapping {
528 vl_api_nat_config_flags_t flags;
529 vl_api_ip4_address_t local_ip_address;
530 vl_api_ip4_address_t external_ip_address;
534 vl_api_interface_index_t external_sw_if_index;
539 /** \brief Add/delete NAT44 static mapping
540 @param client_index - opaque cookie to identify the sender
541 @param context - sender context, to match reply w/ request
542 @param is_add - true if add, false if delete
543 @param match_pool - true if use specific pool_ip_address
544 @param flags - flag NAT_IS_ADDR_ONLY if address only mapping,
545 flag nat_is_twice_nat if nat address range for external hosts,
546 flag NAT_IS_SELF_TWICE_NAT if translate external host address
547 and port whenever external host address equals local
548 address of internal host,
549 flag NAT_IS_OUT2IN_ONLY if rule match only out2in direction
550 @param pool_ip_address - pool IPv4 address to match with pool
551 @param local_ip_address - local IPv4 address
552 @param external_ip_address - external IPv4 address
553 @param protocol - IP protocol, used only if addr_only=0
554 @param local_port - local port number, used only if addr_only=0
555 @param external_port - external port number, used only if addr_only=0
556 @param external_sw_if_index - external interface (if set
557 external_ip_address is ignored, ~0 means not
559 @param vfr_id - VRF ID
560 @param tag - opaque string tag
562 autoreply define nat44_add_del_static_mapping_v2 {
567 vl_api_nat_config_flags_t flags;
568 vl_api_ip4_address_t pool_ip_address;
569 vl_api_ip4_address_t local_ip_address;
570 vl_api_ip4_address_t external_ip_address;
574 vl_api_interface_index_t external_sw_if_index;
579 /** \brief Dump NAT44 static mappings
580 @param client_index - opaque cookie to identify the sender
581 @param context - sender context, to match reply w/ request
583 define nat44_static_mapping_dump {
588 /** \brief NAT44 static mapping details response
589 @param context - sender context, to match reply w/ request
590 @param flags - flag NAT_ADDR_ONLY if address only mapping,
591 flag NAT_TWICE_NAT if NAT address range for external hosts,
592 flag NAT_SELF_TWICE_NAT if translate external host address
593 and port whenever external host address equals local
594 address of internal host,
595 flag NAT_OUT2IN_ONLY if rule match only out2in direction
596 @param local_ip_address - local IPv4 address
597 @param external_ip_address - external IPv4 address
598 @param protocol - IP protocol, valid only if no NAT_ADDR_ONLY flag
599 @param local_port - local port number, valid only if no NAT_ADDR_ONLY flag
600 @param external_port - external port number, valid only if no NAT_ADDR_ONLY flag
601 @param external_sw_if_index - external interface
602 @param vfr_id - VRF ID
603 @param tag - opaque string tag
605 define nat44_static_mapping_details {
607 vl_api_nat_config_flags_t flags;
608 vl_api_ip4_address_t local_ip_address;
609 vl_api_ip4_address_t external_ip_address;
613 vl_api_interface_index_t external_sw_if_index;
618 /** \brief Add/delete NAT44 identity mapping
619 @param client_index - opaque cookie to identify the sender
620 @param context - sender context, to match reply w/ request
621 @param is_add - true if add, false if delete
622 @param flags - flag NAT_ADDR_ONLY if address only mapping
623 @param ip_address - IPv4 address
624 @param protocol - IP protocol
625 @param port - port number
626 @param sw_if_index - interface (if set ip_address is ignored, ~0 means not
628 @param vfr_id - VRF ID (if ~0 use default VRF)
629 @param tag - opaque string tag
631 autoreply define nat44_add_del_identity_mapping {
635 vl_api_nat_config_flags_t flags;
636 vl_api_ip4_address_t ip_address;
639 vl_api_interface_index_t sw_if_index;
644 /** \brief Dump NAT44 identity mappings
645 @param client_index - opaque cookie to identify the sender
646 @param context - sender context, to match reply w/ request
648 define nat44_identity_mapping_dump {
653 /** \brief NAT44 identity mapping details response
654 @param context - sender context, to match reply w/ request
655 @param flags - flag NAT_ADDR_ONLY if address only mapping
656 @param ip_address - IPv4 address
657 @param protocol - IP protocol
658 @param port - port number
659 @param sw_if_index - interface
660 @param vfr_id - VRF ID
661 @param tag - opaque string tag
663 define nat44_identity_mapping_details {
665 vl_api_nat_config_flags_t flags;
666 vl_api_ip4_address_t ip_address;
669 vl_api_interface_index_t sw_if_index;
674 /** \brief NAT44 load-balancing address and port pair
675 @param addr - IPv4 address of the internal node
676 @param port - L4 port number of the internal node
677 @param probability - probability of the internal node to be randomly matched
678 @param vrf_id - VRF id
680 typedef nat44_lb_addr_port {
681 vl_api_ip4_address_t addr;
687 /** \brief Add/delete NAT44 load-balancing static mapping rule
688 @param client_index - opaque cookie to identify the sender
689 @param context - sender context, to match reply w/ request
690 @param is_add - true if add, false if delete
691 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
692 flag NAT_SELF_TWICE_NAT if translate external host address
693 and port whenever external host address equals local
694 address of internal host,
695 flag NAT_OUT2IN_ONLY if rule match only out2in direction
696 @param external_addr - external IPv4 address of the service
697 @param external_port - external L4 port number of the service
698 @param protocol - IP protocol number of the service
699 @param affinity - if 0 disabled, otherwise client IP affinity sticky time
701 @param local_num - number of local network nodes
702 @param locals - local network nodes
703 @param tag - opaque string tag
705 autoreply define nat44_add_del_lb_static_mapping {
709 vl_api_nat_config_flags_t flags;
710 vl_api_ip4_address_t external_addr;
716 vl_api_nat44_lb_addr_port_t locals[local_num];
719 /** \brief Add/delete NAT44 load-balancing static mapping rule backend
720 @param client_index - opaque cookie to identify the sender
721 @param context - sender context, to match reply w/ request
722 @param is_add - true if add, false if delete
723 @param external_addr - external IPv4 address of the service
724 @param external_port - external L4 port number of the service
725 @param protocol - IP protocol number of the service
726 @param local - local network node
728 autoreply define nat44_lb_static_mapping_add_del_local {
732 vl_api_ip4_address_t external_addr;
735 vl_api_nat44_lb_addr_port_t local;
738 /** \brief Dump NAT44 load-balancing static mapping rules
739 @param client_index - opaque cookie to identify the sender
740 @param context - sender context, to match reply w/ request
742 define nat44_lb_static_mapping_dump {
747 /** \brief NAT44 load-balancing static mapping rule details response
748 @param context - sender context, to match reply w/ request
749 @param external_addr - external IPv4 address of the service
750 @param external_port - external L4 port number of the service
751 @param protocol - IP protocol number of the service
752 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
753 flag NAT_SELF_TWICE_NAT if translate external host address
754 and port whenever external host address equals local
755 address of internal host,
756 flag NAT_OUT2IN_ONLY if rule match only out2in direction
757 @param affinity - if 0 disabled, otherwise client IP affinity sticky time
759 @param local_num - number of local network nodes
760 @param locals - local network nodes
761 @param tag - opaque string tag
763 define nat44_lb_static_mapping_details {
765 vl_api_ip4_address_t external_addr;
768 vl_api_nat_config_flags_t flags;
772 vl_api_nat44_lb_addr_port_t locals[local_num];
775 /** \brief Delete NAT44 session
776 @param client_index - opaque cookie to identify the sender
777 @param context - sender context, to match reply w/ request
778 @param ip_address - IPv4 address
779 @param protocol - IP protocol
780 @param port - port number
781 @param vfr_id - VRF ID
782 @param flags - flag NAT_IS_INSIDE if interface is inside or
783 interface is outside,
784 flag NAT_IS_EXT_HOST_VALID if external host address and
786 @param ext_host_address - external host IPv4 address
787 @param ext_host_port - external host port
789 autoreply define nat44_del_session {
792 vl_api_ip4_address_t address;
796 vl_api_nat_config_flags_t flags;
797 vl_api_ip4_address_t ext_host_address;
801 /** \brief Dump NAT44 users
802 @param client_index - opaque cookie to identify the sender
803 @param context - sender context, to match reply w/ request
805 define nat44_user_dump {
810 /** \brief NAT44 users response
811 @param context - sender context, to match reply w/ request
813 @param ip_address - IPv4 address
814 @param nsessions - number of dynamic sessions
815 @param nstaticsessions - number of static sessions
817 define nat44_user_details {
820 vl_api_ip4_address_t ip_address;
825 /** \brief NAT44 user's sessions
826 @param client_index - opaque cookie to identify the sender
827 @param context - sender context, to match reply w/ request
828 @param ip_address - IPv4 address of the user to dump
829 @param vrf_id - VRF_ID
831 define nat44_user_session_dump {
834 vl_api_ip4_address_t ip_address;
838 /** \brief NAT44 user's sessions response
839 @param context - sender context, to match reply w/ request
840 @param outside_ip_address - outside IPv4 address
841 @param outside_port - outside port
842 @param inside_ip_address - inside IPv4 address
843 @param inside_port - inside port
844 @param protocol - protocol
845 @param flags - flag NAT_IS_STATIC if session is static,
846 flag NAT_IS_TWICE_NAT if session is twice-nat,
847 flag NAT_IS_EXT_HOST_VALID if external host address
849 @param last_heard - last heard timer
850 @param total_bytes - count of bytes sent through session
851 @param total_pkts - count of pakets sent through session
852 @param ext_host_address - external host IPv4 address
853 @param ext_host_port - external host port
854 @param ext_host_nat_address - post-NAT external host IPv4 address (valid
855 only if twice-nat session)
856 @param ext_host_nat_port - post-NAT external host port (valid only if
859 define nat44_user_session_details {
861 vl_api_ip4_address_t outside_ip_address;
863 vl_api_ip4_address_t inside_ip_address;
866 vl_api_nat_config_flags_t flags;
870 vl_api_ip4_address_t ext_host_address;
872 vl_api_ip4_address_t ext_host_nat_address;
873 u16 ext_host_nat_port;
876 /** \brief NAT44 user's sessions
877 @param client_index - opaque cookie to identify the sender
878 @param context - sender context, to match reply w/ request
879 @param ip_address - IPv4 address of the user to dump
880 @param vrf_id - VRF_ID
882 define nat44_user_session_v2_dump {
885 vl_api_ip4_address_t ip_address;
889 /** \brief NAT44 user's sessions response
890 @param context - sender context, to match reply w/ request
891 @param outside_ip_address - outside IPv4 address
892 @param outside_port - outside port
893 @param inside_ip_address - inside IPv4 address
894 @param inside_port - inside port
895 @param protocol - protocol
896 @param flags - flag NAT_IS_STATIC if session is static,
897 flag NAT_IS_TWICE_NAT if session is twice-nat,
898 flag NAT_IS_EXT_HOST_VALID if external host address
900 @param last_heard - last heard timer
901 @param total_bytes - count of bytes sent through session
902 @param total_pkts - count of pakets sent through session
903 @param ext_host_address - external host IPv4 address
904 @param ext_host_port - external host port
905 @param ext_host_nat_address - post-NAT external host IPv4 address (valid
906 only if twice-nat session)
907 @param ext_host_nat_port - post-NAT external host port (valid only if
909 @param is_timed_out - true, if session is timed out, and false, if session
912 define nat44_user_session_v2_details {
914 vl_api_ip4_address_t outside_ip_address;
916 vl_api_ip4_address_t inside_ip_address;
919 vl_api_nat_config_flags_t flags;
923 vl_api_ip4_address_t ext_host_address;
925 vl_api_ip4_address_t ext_host_nat_address;
926 u16 ext_host_nat_port;
930 /** \brief NAT44 user's sessions response
931 @param context - sender context, to match reply w/ request
932 @param outside_ip_address - outside IPv4 address
933 @param outside_port - outside port
934 @param inside_ip_address - inside IPv4 address
935 @param inside_port - inside port
936 @param protocol - protocol
937 @param flags - flag NAT_IS_STATIC if session is static,
938 flag NAT_IS_TWICE_NAT if session is twice-nat,
939 flag NAT_IS_EXT_HOST_VALID if external host address
941 @param last_heard - last heard timer since VPP start
942 @param time_since_last_heard - difference between current vpp time and last_heard value
943 @param total_bytes - count of bytes sent through session
944 @param total_pkts - count of pakets sent through session
945 @param ext_host_address - external host IPv4 address
946 @param ext_host_port - external host port
947 @param ext_host_nat_address - post-NAT external host IPv4 address (valid
948 only if twice-nat session)
949 @param ext_host_nat_port - post-NAT external host port (valid only if
951 @param is_timed_out - true, if session is timed out, and false, if session
954 define nat44_user_session_v3_details {
956 vl_api_ip4_address_t outside_ip_address;
958 vl_api_ip4_address_t inside_ip_address;
961 vl_api_nat_config_flags_t flags;
963 u64 time_since_last_heard;
966 vl_api_ip4_address_t ext_host_address;
968 vl_api_ip4_address_t ext_host_nat_address;
969 u16 ext_host_nat_port;
973 /** \brief NAT44 user's sessions
974 @param client_index - opaque cookie to identify the sender
975 @param context - sender context, to match reply w/ request
976 @param ip_address - IPv4 address of the user to dump
977 @param vrf_id - VRF_ID
979 define nat44_user_session_v3_dump {
982 vl_api_ip4_address_t ip_address;