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 {
530 vl_api_nat_config_flags_t flags;
531 vl_api_ip4_address_t local_ip_address;
532 vl_api_ip4_address_t external_ip_address;
536 vl_api_interface_index_t external_sw_if_index;
541 /** \brief Add/delete NAT44 static mapping
542 @param client_index - opaque cookie to identify the sender
543 @param context - sender context, to match reply w/ request
544 @param is_add - true if add, false if delete
545 @param match_pool - true if use specific pool_ip_address
546 @param flags - flag NAT_IS_ADDR_ONLY if address only mapping,
547 flag nat_is_twice_nat if nat address range for external hosts,
548 flag NAT_IS_SELF_TWICE_NAT if translate external host address
549 and port whenever external host address equals local
550 address of internal host,
551 flag NAT_IS_OUT2IN_ONLY if rule match only out2in direction
552 @param pool_ip_address - pool IPv4 address to match with pool
553 @param local_ip_address - local IPv4 address
554 @param external_ip_address - external IPv4 address
555 @param protocol - IP protocol, used only if addr_only=0
556 @param local_port - local port number, used only if addr_only=0
557 @param external_port - external port number, used only if addr_only=0
558 @param external_sw_if_index - external interface (if set
559 external_ip_address is ignored, ~0 means not
561 @param vfr_id - VRF ID
562 @param tag - opaque string tag
564 autoreply define nat44_add_del_static_mapping_v2 {
569 vl_api_nat_config_flags_t flags;
570 vl_api_ip4_address_t pool_ip_address;
571 vl_api_ip4_address_t local_ip_address;
572 vl_api_ip4_address_t external_ip_address;
576 vl_api_interface_index_t external_sw_if_index;
581 /** \brief Dump NAT44 static mappings
582 @param client_index - opaque cookie to identify the sender
583 @param context - sender context, to match reply w/ request
585 define nat44_static_mapping_dump {
590 /** \brief NAT44 static mapping details response
591 @param context - sender context, to match reply w/ request
592 @param flags - flag NAT_ADDR_ONLY if address only mapping,
593 flag NAT_TWICE_NAT if NAT address range for external hosts,
594 flag NAT_SELF_TWICE_NAT if translate external host address
595 and port whenever external host address equals local
596 address of internal host,
597 flag NAT_OUT2IN_ONLY if rule match only out2in direction
598 @param local_ip_address - local IPv4 address
599 @param external_ip_address - external IPv4 address
600 @param protocol - IP protocol, valid only if no NAT_ADDR_ONLY flag
601 @param local_port - local port number, valid only if no NAT_ADDR_ONLY flag
602 @param external_port - external port number, valid only if no NAT_ADDR_ONLY flag
603 @param external_sw_if_index - external interface
604 @param vfr_id - VRF ID
605 @param tag - opaque string tag
607 define nat44_static_mapping_details {
609 vl_api_nat_config_flags_t flags;
610 vl_api_ip4_address_t local_ip_address;
611 vl_api_ip4_address_t external_ip_address;
615 vl_api_interface_index_t external_sw_if_index;
620 /** \brief Add/delete NAT44 identity mapping
621 @param client_index - opaque cookie to identify the sender
622 @param context - sender context, to match reply w/ request
623 @param is_add - true if add, false if delete
624 @param flags - flag NAT_ADDR_ONLY if address only mapping
625 @param ip_address - IPv4 address
626 @param protocol - IP protocol
627 @param port - port number
628 @param sw_if_index - interface (if set ip_address is ignored, ~0 means not
630 @param vfr_id - VRF ID (if ~0 use default VRF)
631 @param tag - opaque string tag
633 autoreply define nat44_add_del_identity_mapping {
637 vl_api_nat_config_flags_t flags;
638 vl_api_ip4_address_t ip_address;
641 vl_api_interface_index_t sw_if_index;
646 /** \brief Dump NAT44 identity mappings
647 @param client_index - opaque cookie to identify the sender
648 @param context - sender context, to match reply w/ request
650 define nat44_identity_mapping_dump {
655 /** \brief NAT44 identity mapping details response
656 @param context - sender context, to match reply w/ request
657 @param flags - flag NAT_ADDR_ONLY if address only mapping
658 @param ip_address - IPv4 address
659 @param protocol - IP protocol
660 @param port - port number
661 @param sw_if_index - interface
662 @param vfr_id - VRF ID
663 @param tag - opaque string tag
665 define nat44_identity_mapping_details {
667 vl_api_nat_config_flags_t flags;
668 vl_api_ip4_address_t ip_address;
671 vl_api_interface_index_t sw_if_index;
676 /** \brief NAT44 load-balancing address and port pair
677 @param addr - IPv4 address of the internal node
678 @param port - L4 port number of the internal node
679 @param probability - probability of the internal node to be randomly matched
680 @param vrf_id - VRF id
682 typedef nat44_lb_addr_port {
683 vl_api_ip4_address_t addr;
689 /** \brief Add/delete NAT44 load-balancing static mapping rule
690 @param client_index - opaque cookie to identify the sender
691 @param context - sender context, to match reply w/ request
692 @param is_add - true if add, false if delete
693 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
694 flag NAT_SELF_TWICE_NAT if translate external host address
695 and port whenever external host address equals local
696 address of internal host,
697 flag NAT_OUT2IN_ONLY if rule match only out2in direction
698 @param external_addr - external IPv4 address of the service
699 @param external_port - external L4 port number of the service
700 @param protocol - IP protocol number of the service
701 @param affinity - if 0 disabled, otherwise client IP affinity sticky time
703 @param local_num - number of local network nodes
704 @param locals - local network nodes
705 @param tag - opaque string tag
707 autoreply define nat44_add_del_lb_static_mapping {
711 vl_api_nat_config_flags_t flags;
712 vl_api_ip4_address_t external_addr;
718 vl_api_nat44_lb_addr_port_t locals[local_num];
721 /** \brief Add/delete NAT44 load-balancing static mapping rule backend
722 @param client_index - opaque cookie to identify the sender
723 @param context - sender context, to match reply w/ request
724 @param is_add - true if add, false if delete
725 @param external_addr - external IPv4 address of the service
726 @param external_port - external L4 port number of the service
727 @param protocol - IP protocol number of the service
728 @param local - local network node
730 autoreply define nat44_lb_static_mapping_add_del_local {
734 vl_api_ip4_address_t external_addr;
737 vl_api_nat44_lb_addr_port_t local;
740 /** \brief Dump NAT44 load-balancing static mapping rules
741 @param client_index - opaque cookie to identify the sender
742 @param context - sender context, to match reply w/ request
744 define nat44_lb_static_mapping_dump {
749 /** \brief NAT44 load-balancing static mapping rule details response
750 @param context - sender context, to match reply w/ request
751 @param external_addr - external IPv4 address of the service
752 @param external_port - external L4 port number of the service
753 @param protocol - IP protocol number of the service
754 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
755 flag NAT_SELF_TWICE_NAT if translate external host address
756 and port whenever external host address equals local
757 address of internal host,
758 flag NAT_OUT2IN_ONLY if rule match only out2in direction
759 @param affinity - if 0 disabled, otherwise client IP affinity sticky time
761 @param local_num - number of local network nodes
762 @param locals - local network nodes
763 @param tag - opaque string tag
765 define nat44_lb_static_mapping_details {
767 vl_api_ip4_address_t external_addr;
770 vl_api_nat_config_flags_t flags;
774 vl_api_nat44_lb_addr_port_t locals[local_num];
777 /** \brief Delete NAT44 session
778 @param client_index - opaque cookie to identify the sender
779 @param context - sender context, to match reply w/ request
780 @param ip_address - IPv4 address
781 @param protocol - IP protocol
782 @param port - port number
783 @param vfr_id - VRF ID
784 @param flags - flag NAT_IS_INSIDE if interface is inside or
785 interface is outside,
786 flag NAT_IS_EXT_HOST_VALID if external host address and
788 @param ext_host_address - external host IPv4 address
789 @param ext_host_port - external host port
791 autoreply define nat44_del_session {
794 vl_api_ip4_address_t address;
798 vl_api_nat_config_flags_t flags;
799 vl_api_ip4_address_t ext_host_address;
803 /** \brief Dump NAT44 users
804 @param client_index - opaque cookie to identify the sender
805 @param context - sender context, to match reply w/ request
807 define nat44_user_dump {
812 /** \brief NAT44 users response
813 @param context - sender context, to match reply w/ request
815 @param ip_address - IPv4 address
816 @param nsessions - number of dynamic sessions
817 @param nstaticsessions - number of static sessions
819 define nat44_user_details {
822 vl_api_ip4_address_t ip_address;
827 /** \brief NAT44 user's sessions
828 @param client_index - opaque cookie to identify the sender
829 @param context - sender context, to match reply w/ request
830 @param ip_address - IPv4 address of the user to dump
831 @param vrf_id - VRF_ID
833 define nat44_user_session_dump {
838 vl_api_ip4_address_t ip_address;
842 /** \brief NAT44 user's sessions response
843 @param context - sender context, to match reply w/ request
844 @param outside_ip_address - outside IPv4 address
845 @param outside_port - outside port
846 @param inside_ip_address - inside IPv4 address
847 @param inside_port - inside port
848 @param protocol - protocol
849 @param flags - flag NAT_IS_STATIC if session is static,
850 flag NAT_IS_TWICE_NAT if session is twice-nat,
851 flag NAT_IS_EXT_HOST_VALID if external host address
853 @param last_heard - last heard timer
854 @param total_bytes - count of bytes sent through session
855 @param total_pkts - count of pakets sent through session
856 @param ext_host_address - external host IPv4 address
857 @param ext_host_port - external host port
858 @param ext_host_nat_address - post-NAT external host IPv4 address (valid
859 only if twice-nat session)
860 @param ext_host_nat_port - post-NAT external host port (valid only if
863 define nat44_user_session_details {
867 vl_api_ip4_address_t outside_ip_address;
869 vl_api_ip4_address_t inside_ip_address;
872 vl_api_nat_config_flags_t flags;
876 vl_api_ip4_address_t ext_host_address;
878 vl_api_ip4_address_t ext_host_nat_address;
879 u16 ext_host_nat_port;
882 /** \brief NAT44 user's sessions
883 @param client_index - opaque cookie to identify the sender
884 @param context - sender context, to match reply w/ request
885 @param ip_address - IPv4 address of the user to dump
886 @param vrf_id - VRF_ID
888 define nat44_user_session_v2_dump {
893 vl_api_ip4_address_t ip_address;
897 /** \brief NAT44 user's sessions response
898 @param context - sender context, to match reply w/ request
899 @param outside_ip_address - outside IPv4 address
900 @param outside_port - outside port
901 @param inside_ip_address - inside IPv4 address
902 @param inside_port - inside port
903 @param protocol - protocol
904 @param flags - flag NAT_IS_STATIC if session is static,
905 flag NAT_IS_TWICE_NAT if session is twice-nat,
906 flag NAT_IS_EXT_HOST_VALID if external host address
908 @param last_heard - last heard timer
909 @param total_bytes - count of bytes sent through session
910 @param total_pkts - count of pakets sent through session
911 @param ext_host_address - external host IPv4 address
912 @param ext_host_port - external host port
913 @param ext_host_nat_address - post-NAT external host IPv4 address (valid
914 only if twice-nat session)
915 @param ext_host_nat_port - post-NAT external host port (valid only if
917 @param is_timed_out - true, if session is timed out, and false, if session
920 define nat44_user_session_v2_details {
924 vl_api_ip4_address_t outside_ip_address;
926 vl_api_ip4_address_t inside_ip_address;
929 vl_api_nat_config_flags_t flags;
933 vl_api_ip4_address_t ext_host_address;
935 vl_api_ip4_address_t ext_host_nat_address;
936 u16 ext_host_nat_port;
940 /** \brief NAT44 user's sessions response
941 @param context - sender context, to match reply w/ request
942 @param outside_ip_address - outside IPv4 address
943 @param outside_port - outside port
944 @param inside_ip_address - inside IPv4 address
945 @param inside_port - inside port
946 @param protocol - protocol
947 @param flags - flag NAT_IS_STATIC if session is static,
948 flag NAT_IS_TWICE_NAT if session is twice-nat,
949 flag NAT_IS_EXT_HOST_VALID if external host address
951 @param last_heard - last heard timer since VPP start
952 @param time_since_last_heard - difference between current vpp time and last_heard value
953 @param total_bytes - count of bytes sent through session
954 @param total_pkts - count of pakets sent through session
955 @param ext_host_address - external host IPv4 address
956 @param ext_host_port - external host port
957 @param ext_host_nat_address - post-NAT external host IPv4 address (valid
958 only if twice-nat session)
959 @param ext_host_nat_port - post-NAT external host port (valid only if
961 @param is_timed_out - true, if session is timed out, and false, if session
964 define nat44_user_session_v3_details {
966 vl_api_ip4_address_t outside_ip_address;
968 vl_api_ip4_address_t inside_ip_address;
971 vl_api_nat_config_flags_t flags;
973 u64 time_since_last_heard;
976 vl_api_ip4_address_t ext_host_address;
978 vl_api_ip4_address_t ext_host_nat_address;
979 u16 ext_host_nat_port;
983 /** \brief NAT44 user's sessions
984 @param client_index - opaque cookie to identify the sender
985 @param context - sender context, to match reply w/ request
986 @param ip_address - IPv4 address of the user to dump
987 @param vrf_id - VRF_ID
989 define nat44_user_session_v3_dump {
992 vl_api_ip4_address_t ip_address;