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 Set TCP MSS rewriting configuration
202 @param client_index - opaque cookie to identify the sender
203 @param context - sender context, to match reply w/ request
204 @param mss_value - MSS value to be used for MSS rewriting
205 @param enable - if true enable MSS rewriting feature else disable
207 autoreply define nat_set_mss_clamping {
214 /** \brief Get TCP MSS rewriting configuration
215 @param client_index - opaque cookie to identify the sender
216 @param context - sender context, to match reply w/ request
218 define nat_get_mss_clamping {
223 /** \brief Get TCP MSS rewriting configuration reply
224 @param context - sender context, to match reply w/ request
225 @param retval - return code
226 @param mss_value - MSS value to be used for MSS rewriting
227 @param enable - if true enable MSS rewriting feature else disable
229 define nat_get_mss_clamping_reply {
236 /** \brief Set NAT handoff frame queue options
237 @param client_index - opaque cookie to identify the sender
238 @param context - sender context, to match reply w/ request
239 @param frame_queue_nelts - number of worker handoff frame queue elements
241 autoreply define nat44_ed_set_fq_options {
244 u32 frame_queue_nelts;
247 /** \brief Show NAT handoff frame queue options
248 @param client_index - opaque cookie to identify the sender
249 @param context - sender context, to match reply w/ request
251 define nat44_ed_show_fq_options
257 /** \brief Show NAT handoff frame queue options reply
258 @param context - sender context, to match reply w/ request
259 @param retval - return code for the request
260 @param frame_queue_nelts - number of worker handoff frame queue elements
262 define nat44_ed_show_fq_options_reply
266 u32 frame_queue_nelts;
269 /** \brief Add/delete NAT44 pool address from specific interfce
270 @param client_index - opaque cookie to identify the sender
271 @param context - sender context, to match reply w/ request
272 @param is_add - true if add, false if delete
273 @param sw_if_index - software index of the interface
274 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts
276 autoreply define nat44_add_del_interface_addr {
280 vl_api_interface_index_t sw_if_index;
281 vl_api_nat_config_flags_t flags;
284 /** \brief Dump NAT44 pool addresses interfaces
285 @param client_index - opaque cookie to identify the sender
286 @param context - sender context, to match reply w/ request
288 define nat44_interface_addr_dump {
293 /** \brief NAT44 pool addresses interfaces details response
294 @param context - sender context, to match reply w/ request
295 @param sw_if_index - software index of the interface
296 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts
299 define nat44_interface_addr_details {
301 vl_api_interface_index_t sw_if_index;
302 vl_api_nat_config_flags_t flags;
305 /** \brief Add/del NAT44 address range
306 @param client_index - opaque cookie to identify the sender
307 @param context - sender context, to match reply w/ request
308 @param first_ip_address - first IPv4 address
309 @param last_ip_address - last IPv4 address
310 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
311 @param is_add - true if add, false if delete
312 @param flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts
315 autoreply define nat44_add_del_address_range {
318 vl_api_ip4_address_t first_ip_address;
319 vl_api_ip4_address_t last_ip_address;
322 vl_api_nat_config_flags_t flags;
325 /** \brief Dump NAT44 addresses
326 @param client_index - opaque cookie to identify the sender
327 @param context - sender context, to match reply w/ request
329 define nat44_address_dump {
334 /** \brief NAT44 address details response
335 @param context - sender context, to match reply w/ request
336 @param ip_address - IPv4 address
337 @param flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts
338 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
340 define nat44_address_details {
342 vl_api_ip4_address_t ip_address;
343 vl_api_nat_config_flags_t flags;
347 /** \brief Enable/disable NAT44 feature on the interface
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 flags - flag NAT_IS_INSIDE if interface is inside else
353 @param sw_if_index - software index of the interface
355 autoreply define nat44_interface_add_del_feature {
359 vl_api_nat_config_flags_t flags;
360 vl_api_interface_index_t sw_if_index;
363 /** \brief Dump interfaces with NAT44 feature
364 @param client_index - opaque cookie to identify the sender
365 @param context - sender context, to match reply w/ request
367 define nat44_interface_dump {
372 /** \brief NAT44 interface details response
373 @param context - sender context, to match reply w/ request
374 @param sw_if_index - software index of the interface
375 @param flags - flag NAT_IS_INSIDE if interface is inside,
376 flag NAT_IS_OUTSIDE if interface is outside
377 and if both flags are set the interface is
378 both inside and outside
380 define nat44_interface_details {
382 vl_api_nat_config_flags_t flags;
383 vl_api_interface_index_t sw_if_index;
386 /** \brief add/del NAT output interface (postrouting
388 @param client_index - opaque cookie to identify the sender
389 @param context - sender context, to match reply w/ request
390 @param is_add - true if add, false if delete
391 @param sw_if_index - software index of the interface
393 autoendian autoreply define nat44_ed_add_del_output_interface {
397 vl_api_interface_index_t sw_if_index;
401 rpc nat44_ed_output_interface_get returns nat44_ed_output_interface_get_reply
402 stream nat44_ed_output_interface_details;
405 define nat44_ed_output_interface_get
412 define nat44_ed_output_interface_get_reply
419 define nat44_ed_output_interface_details
422 vl_api_interface_index_t sw_if_index;
425 /** \brief Add/delete NAT44 static mapping
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_ADDR_ONLY if address only mapping,
430 flag nat_is_twice_nat if nat address range for external hosts,
431 flag NAT_IS_SELF_TWICE_NAT if translate external host address
432 and port whenever external host address equals local
433 address of internal host,
434 flag NAT_IS_OUT2IN_ONLY if rule match only out2in direction
435 @param local_ip_address - local IPv4 address
436 @param external_ip_address - external IPv4 address
437 @param protocol - IP protocol, used only if addr_only=0
438 @param local_port - local port number, used only if addr_only=0
439 @param external_port - external port number, used only if addr_only=0
440 @param external_sw_if_index - external interface (if set
441 external_ip_address is ignored, ~0 means not
443 @param vfr_id - VRF ID
444 @param tag - opaque string tag
446 autoreply define nat44_add_del_static_mapping {
450 vl_api_nat_config_flags_t flags;
451 vl_api_ip4_address_t local_ip_address;
452 vl_api_ip4_address_t external_ip_address;
456 vl_api_interface_index_t external_sw_if_index;
461 /** \brief Add/delete NAT44 static mapping
462 @param client_index - opaque cookie to identify the sender
463 @param context - sender context, to match reply w/ request
464 @param is_add - true if add, false if delete
465 @param match_pool - true if use specific pool_ip_address
466 @param flags - flag NAT_IS_ADDR_ONLY if address only mapping,
467 flag nat_is_twice_nat if nat address range for external hosts,
468 flag NAT_IS_SELF_TWICE_NAT if translate external host address
469 and port whenever external host address equals local
470 address of internal host,
471 flag NAT_IS_OUT2IN_ONLY if rule match only out2in direction
472 @param pool_ip_address - pool IPv4 address to match with pool
473 @param local_ip_address - local IPv4 address
474 @param external_ip_address - external IPv4 address
475 @param protocol - IP protocol, used only if addr_only=0
476 @param local_port - local port number, used only if addr_only=0
477 @param external_port - external port number, used only if addr_only=0
478 @param external_sw_if_index - external interface (if set
479 external_ip_address is ignored, ~0 means not
481 @param vfr_id - VRF ID
482 @param tag - opaque string tag
484 autoreply define nat44_add_del_static_mapping_v2 {
489 vl_api_nat_config_flags_t flags;
490 vl_api_ip4_address_t pool_ip_address;
491 vl_api_ip4_address_t local_ip_address;
492 vl_api_ip4_address_t external_ip_address;
496 vl_api_interface_index_t external_sw_if_index;
501 /** \brief Dump NAT44 static mappings
502 @param client_index - opaque cookie to identify the sender
503 @param context - sender context, to match reply w/ request
505 define nat44_static_mapping_dump {
510 /** \brief NAT44 static mapping details response
511 @param context - sender context, to match reply w/ request
512 @param flags - flag NAT_ADDR_ONLY if address only mapping,
513 flag NAT_TWICE_NAT if NAT address range for external hosts,
514 flag NAT_SELF_TWICE_NAT if translate external host address
515 and port whenever external host address equals local
516 address of internal host,
517 flag NAT_OUT2IN_ONLY if rule match only out2in direction
518 @param local_ip_address - local IPv4 address
519 @param external_ip_address - external IPv4 address
520 @param protocol - IP protocol, valid only if no NAT_ADDR_ONLY flag
521 @param local_port - local port number, valid only if no NAT_ADDR_ONLY flag
522 @param external_port - external port number, valid only if no NAT_ADDR_ONLY flag
523 @param external_sw_if_index - external interface
524 @param vfr_id - VRF ID
525 @param tag - opaque string tag
527 define nat44_static_mapping_details {
529 vl_api_nat_config_flags_t flags;
530 vl_api_ip4_address_t local_ip_address;
531 vl_api_ip4_address_t external_ip_address;
535 vl_api_interface_index_t external_sw_if_index;
540 /** \brief Add/delete NAT44 identity mapping
541 @param client_index - opaque cookie to identify the sender
542 @param context - sender context, to match reply w/ request
543 @param is_add - true if add, false if delete
544 @param flags - flag NAT_ADDR_ONLY if address only mapping
545 @param ip_address - IPv4 address
546 @param protocol - IP protocol
547 @param port - port number
548 @param sw_if_index - interface (if set ip_address is ignored, ~0 means not
550 @param vfr_id - VRF ID (if ~0 use default VRF)
551 @param tag - opaque string tag
553 autoreply define nat44_add_del_identity_mapping {
557 vl_api_nat_config_flags_t flags;
558 vl_api_ip4_address_t ip_address;
561 vl_api_interface_index_t sw_if_index;
566 /** \brief Dump NAT44 identity mappings
567 @param client_index - opaque cookie to identify the sender
568 @param context - sender context, to match reply w/ request
570 define nat44_identity_mapping_dump {
575 /** \brief NAT44 identity mapping details response
576 @param context - sender context, to match reply w/ request
577 @param flags - flag NAT_ADDR_ONLY if address only mapping
578 @param ip_address - IPv4 address
579 @param protocol - IP protocol
580 @param port - port number
581 @param sw_if_index - interface
582 @param vfr_id - VRF ID
583 @param tag - opaque string tag
585 define nat44_identity_mapping_details {
587 vl_api_nat_config_flags_t flags;
588 vl_api_ip4_address_t ip_address;
591 vl_api_interface_index_t sw_if_index;
596 /** \brief NAT44 load-balancing address and port pair
597 @param addr - IPv4 address of the internal node
598 @param port - L4 port number of the internal node
599 @param probability - probability of the internal node to be randomly matched
600 @param vrf_id - VRF id
602 typedef nat44_lb_addr_port {
603 vl_api_ip4_address_t addr;
609 /** \brief Add/delete NAT44 load-balancing static mapping rule
610 @param client_index - opaque cookie to identify the sender
611 @param context - sender context, to match reply w/ request
612 @param is_add - true if add, false if delete
613 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
614 flag NAT_SELF_TWICE_NAT if translate external host address
615 and port whenever external host address equals local
616 address of internal host,
617 flag NAT_OUT2IN_ONLY if rule match only out2in direction
618 @param external_addr - external IPv4 address of the service
619 @param external_port - external L4 port number of the service
620 @param protocol - IP protocol number of the service
621 @param affinity - if 0 disabled, otherwise client IP affinity sticky time
623 @param local_num - number of local network nodes
624 @param locals - local network nodes
625 @param tag - opaque string tag
627 autoreply define nat44_add_del_lb_static_mapping {
631 vl_api_nat_config_flags_t flags;
632 vl_api_ip4_address_t external_addr;
638 vl_api_nat44_lb_addr_port_t locals[local_num];
641 /** \brief Add/delete NAT44 load-balancing static mapping rule backend
642 @param client_index - opaque cookie to identify the sender
643 @param context - sender context, to match reply w/ request
644 @param is_add - true if add, false if delete
645 @param external_addr - external IPv4 address of the service
646 @param external_port - external L4 port number of the service
647 @param protocol - IP protocol number of the service
648 @param local - local network node
650 autoreply define nat44_lb_static_mapping_add_del_local {
654 vl_api_ip4_address_t external_addr;
657 vl_api_nat44_lb_addr_port_t local;
660 /** \brief Dump NAT44 load-balancing static mapping rules
661 @param client_index - opaque cookie to identify the sender
662 @param context - sender context, to match reply w/ request
664 define nat44_lb_static_mapping_dump {
669 /** \brief NAT44 load-balancing static mapping rule details response
670 @param context - sender context, to match reply w/ request
671 @param external_addr - external IPv4 address of the service
672 @param external_port - external L4 port number of the service
673 @param protocol - IP protocol number of the service
674 @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
675 flag NAT_SELF_TWICE_NAT if translate external host address
676 and port whenever external host address equals local
677 address of internal host,
678 flag NAT_OUT2IN_ONLY if rule match only out2in direction
679 @param affinity - if 0 disabled, otherwise client IP affinity sticky time
681 @param local_num - number of local network nodes
682 @param locals - local network nodes
683 @param tag - opaque string tag
685 define nat44_lb_static_mapping_details {
687 vl_api_ip4_address_t external_addr;
690 vl_api_nat_config_flags_t flags;
694 vl_api_nat44_lb_addr_port_t locals[local_num];
697 /** \brief Delete NAT44 session
698 @param client_index - opaque cookie to identify the sender
699 @param context - sender context, to match reply w/ request
700 @param ip_address - IPv4 address
701 @param protocol - IP protocol
702 @param port - port number
703 @param vfr_id - VRF ID
704 @param flags - flag NAT_IS_INSIDE if interface is inside or
705 interface is outside,
706 flag NAT_IS_EXT_HOST_VALID if external host address and
708 @param ext_host_address - external host IPv4 address
709 @param ext_host_port - external host port
711 autoreply define nat44_del_session {
714 vl_api_ip4_address_t address;
718 vl_api_nat_config_flags_t flags;
719 vl_api_ip4_address_t ext_host_address;
723 /** \brief Dump NAT44 users
724 @param client_index - opaque cookie to identify the sender
725 @param context - sender context, to match reply w/ request
727 define nat44_user_dump {
732 /** \brief NAT44 users response
733 @param context - sender context, to match reply w/ request
735 @param ip_address - IPv4 address
736 @param nsessions - number of dynamic sessions
737 @param nstaticsessions - number of static sessions
739 define nat44_user_details {
742 vl_api_ip4_address_t ip_address;
747 /** \brief NAT44 user's sessions
748 @param client_index - opaque cookie to identify the sender
749 @param context - sender context, to match reply w/ request
750 @param ip_address - IPv4 address of the user to dump
751 @param vrf_id - VRF_ID
753 define nat44_user_session_dump {
756 vl_api_ip4_address_t ip_address;
760 /** \brief NAT44 user's sessions response
761 @param context - sender context, to match reply w/ request
762 @param outside_ip_address - outside IPv4 address
763 @param outside_port - outside port
764 @param inside_ip_address - inside IPv4 address
765 @param inside_port - inside port
766 @param protocol - protocol
767 @param flags - flag NAT_IS_STATIC if session is static,
768 flag NAT_IS_TWICE_NAT if session is twice-nat,
769 flag NAT_IS_EXT_HOST_VALID if external host address
771 @param last_heard - last heard timer
772 @param total_bytes - count of bytes sent through session
773 @param total_pkts - count of pakets sent through session
774 @param ext_host_address - external host IPv4 address
775 @param ext_host_port - external host port
776 @param ext_host_nat_address - post-NAT external host IPv4 address (valid
777 only if twice-nat session)
778 @param ext_host_nat_port - post-NAT external host port (valid only if
781 define nat44_user_session_details {
783 vl_api_ip4_address_t outside_ip_address;
785 vl_api_ip4_address_t inside_ip_address;
788 vl_api_nat_config_flags_t flags;
792 vl_api_ip4_address_t ext_host_address;
794 vl_api_ip4_address_t ext_host_nat_address;
795 u16 ext_host_nat_port;
798 /** \brief NAT44 user's sessions
799 @param client_index - opaque cookie to identify the sender
800 @param context - sender context, to match reply w/ request
801 @param ip_address - IPv4 address of the user to dump
802 @param vrf_id - VRF_ID
804 define nat44_user_session_v2_dump {
807 vl_api_ip4_address_t ip_address;
811 /** \brief NAT44 user's sessions response
812 @param context - sender context, to match reply w/ request
813 @param outside_ip_address - outside IPv4 address
814 @param outside_port - outside port
815 @param inside_ip_address - inside IPv4 address
816 @param inside_port - inside port
817 @param protocol - protocol
818 @param flags - flag NAT_IS_STATIC if session is static,
819 flag NAT_IS_TWICE_NAT if session is twice-nat,
820 flag NAT_IS_EXT_HOST_VALID if external host address
822 @param last_heard - last heard timer
823 @param total_bytes - count of bytes sent through session
824 @param total_pkts - count of pakets sent through session
825 @param ext_host_address - external host IPv4 address
826 @param ext_host_port - external host port
827 @param ext_host_nat_address - post-NAT external host IPv4 address (valid
828 only if twice-nat session)
829 @param ext_host_nat_port - post-NAT external host port (valid only if
831 @param is_timed_out - true, if session is timed out, and false, if session
834 define nat44_user_session_v2_details {
836 vl_api_ip4_address_t outside_ip_address;
838 vl_api_ip4_address_t inside_ip_address;
841 vl_api_nat_config_flags_t flags;
845 vl_api_ip4_address_t ext_host_address;
847 vl_api_ip4_address_t ext_host_nat_address;
848 u16 ext_host_nat_port;
852 // DEPRECATED, obsolete messages completely unsupported
854 /** \brief Del NAT44 user
855 @param client_index - opaque cookie to identify the sender
856 @param context - sender context, to match reply w/ request
857 @param ip_address - IPv4 address
858 @param fib_index - FIB index
860 autoreply define nat44_del_user {
864 vl_api_ip4_address_t ip_address;
868 /** \brief Set address and port assignment algorithm
869 @param client_index - opaque cookie to identify the sender
870 @param context - sender context, to match reply w/ request
871 @param alg - address and port assignment algorithm:
872 0 - default, 1 - MAP-E, 2 - port range
873 (see nat_addr_and_port_alloc_alg_t in nat.h)
874 @param psid_offset - number of offset bits (valid only for MAP-E alg)
875 @param psid_length - length of PSID (valid only for MAP-E alg)
876 @param psid - Port Set Identifier (PSID) value (valid only for MAP-E alg)
877 @param start_port - beginning of the port range
878 @param end_port - end of the port range
880 autoreply define nat_set_addr_and_port_alloc_alg {
892 /** \brief Get address and port assignment algorithm
893 @param client_index - opaque cookie to identify the sender
894 @param context - sender context, to match reply w/ request
896 define nat_get_addr_and_port_alloc_alg {
902 /** \brief Get address and port assignment algorithm reply
903 @param context - sender context, to match reply w/ request
904 @param retval - return code
905 @param alg - address and port assignment algorithm:
906 0 - default, 1 - MAP-E, 2 - port range
907 (see nat_addr_and_port_alloc_alg_t in nat.h)
908 @param psid_offset - number of offset bits (valid only for MAP-E alg)
909 @param psid_length - length of PSID (valid only for MAP-E alg)
910 @param psid - Port Set Identifier (PSID) value (valid only for MAP-E alg)
911 @param start_port - beginning of the port range
912 @param end_port - end of the port range
914 define nat_get_addr_and_port_alloc_alg_reply {
926 /** \brief Set HA listener (local settings)
927 @param client_index - opaque cookie to identify the sender
928 @param context - sender context, to match reply w/ request
929 @param ip_address - local IP4 address
930 @param port - local UDP port number
931 @param path_mtu - path MTU between local and failover
933 autoreply define nat_ha_set_listener {
937 vl_api_ip4_address_t ip_address;
942 /** \brief Set HA failover (remote settings)
943 @param client_index - opaque cookie to identify the sender
944 @param context - sender context, to match reply w/ request
945 @param ip_address - failover IP4 address
946 @param port - failvoer UDP port number
947 @param session_refresh_interval - number of seconds after which to send
948 session counters refresh
950 autoreply define nat_ha_set_failover {
954 vl_api_ip4_address_t ip_address;
956 u32 session_refresh_interval;
959 /** \brief Get HA listener/local configuration
960 @param client_index - opaque cookie to identify the sender
961 @param context - sender context, to match reply w/ request
963 define nat_ha_get_listener {
969 /** \brief Get HA listener/local configuration reply
970 @param context - sender context, to match reply w/ request
971 @param retval - return code
972 @param ip_address - local IP4 address
973 @param port - local UDP port number
974 @param path_mtu - Path MTU between local and failover
976 define nat_ha_get_listener_reply {
980 vl_api_ip4_address_t ip_address;
985 /** \brief Get HA failover/remote settings
986 @param client_index - opaque cookie to identify the sender
987 @param context - sender context, to match reply w/ request
989 define nat_ha_get_failover {
995 /** \brief Get HA failover/remote settings reply
996 @param context - sender context, to match reply w/ request
997 @param retval - return code
998 @param ip_address - failover IP4 address
999 @param port - failvoer UDP port number
1000 @param session_refresh_interval - number of seconds after which to send
1001 session counters refresh
1003 define nat_ha_get_failover_reply {
1007 vl_api_ip4_address_t ip_address;
1009 u32 session_refresh_interval;
1012 /** \brief Flush the current HA data (for testing)
1013 @param client_index - opaque cookie to identify the sender
1014 @param context - sender context, to match reply w/ request
1016 autoreply define nat_ha_flush {
1022 /** \brief Resync HA (resend existing sessions to new failover)
1023 @param client_index - opaque cookie to identify the sender
1024 @param context - sender context, to match reply w/ request
1025 @param want_resync_event - resync completed event sent to the sender via
1026 nat_ha_resync_completed_event API message if
1028 @param pid - sender's pid
1030 autoreply define nat_ha_resync
1035 u8 want_resync_event;
1039 /** \brief Tell client about a HA resync completion event
1040 @param client_index - opaque cookie to identify the sender
1041 @param pid - client pid registered to receive notification
1042 @param missed_count - number of missed (not ACKed) messages
1044 define nat_ha_resync_completed_event
1053 rpc nat_ha_resync returns nat_ha_resync_reply events nat_ha_resync_completed_event;