FD.io VPP  v19.08-27-gf4dcae4
Vector Packet Processing
nat.api
Go to the documentation of this file.
1 /*
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:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
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.
14  */
15 
16 option version = "5.2.0";
17 import "vnet/ip/ip_types.api";
18 import "vnet/interface_types.api";
19 
20 /**
21  * @file nat.api
22  * @brief VPP control-plane API messages.
23  *
24  * This file defines VPP control-plane API messages which are generally
25  * called through a shared memory interface.
26  */
27 
28 /*
29  * Common NAT plugin APIs
30  */
31 
33 {
34  NAT_IS_NONE = 0x00,
40  NAT_IS_INSIDE = 0x20,
41  NAT_IS_STATIC = 0x40,
43 };
44 
45 /** \brief Control ping from client to api server request
46  @param client_index - opaque cookie to identify the sender
47  @param context - sender context, to match reply w/ request
48 */
49 define nat_control_ping
50 {
53 };
54 
55 /** \brief Control ping from the client to the server response
56  @param client_index - opaque cookie to identify the sender
57  @param context - sender context, to match reply w/ request
58  @param retval - return code for the request
59  @param vpe_pid - the pid of the vpe, returned by the server
60 */
61 define nat_control_ping_reply
62 {
67 };
68 
69 /** \brief Show NAT plugin startup config
70  @param client_index - opaque cookie to identify the sender
71  @param context - sender context, to match reply w/ request
72 */
73 define nat_show_config
74 {
77 };
78 
79 /** \brief Show NAT plugin startup config reply
80  @param context - sender context, to match reply w/ request
81  @param retval - return code for the request
82  @param static_mapping_only - if true dynamic translations disabled
83  @param static_mapping_connection_tracking - if true create session data
84  @param deterministic - if true deterministic mapping
85  @param endpoint_dependent - if true endpoint-dependent mode
86  @param out2in_dpo - if true out2in dpo mode
87  @param dslite_ce - if true DS-Lite is CE/B4 element, if false AFTR elemet
88  @param translation_buckets - number of translation hash buckets
89  @param translation_memory_size - translation hash memory size
90  @param user_buckets - number of user hash buckets
91  @param user_memory_size - user hash memory size
92  @param max_translations_per_user - maximum number of translations per user
93  @param outside_vrf_id - outside VRF id
94  @param inside_vrf_id - default inside VRF id
95  @param nat64_bib_buckets - number of NAT64 BIB hash buckets
96  @param nat64_bib_memory_size - memory size of NAT64 BIB hash
97  @param nat64_st_buckets - number of NAT64 session table hash buckets
98  @param nat64_st_memory_size - memory size of NAT64 session table hash
99 */
100 define nat_show_config_reply
101 {
109  bool dslite_ce;
121 };
122 
124 {
125  NAT_LOG_NONE = 0x00,
129  NAT_LOG_INFO = 0x04,
131 };
132 
133 /** \brief Set NAT logging level
134  @param client_index - opaque cookie to identify the sender
135  @param context - sender context, to match reply w/ request
136  @param log_level - logging level
137 */
138 autoreply define nat_set_log_level {
141  vl_api_nat_log_level_t log_level;
142 };
143 
144 /** \brief Set NAT workers
145  @param client_index - opaque cookie to identify the sender
146  @param context - sender context, to match reply w/ request
147  @param worker_mask - NAT workers mask
148 */
149 autoreply define nat_set_workers {
153 };
154 
155 /** \brief Dump NAT workers
156  @param client_index - opaque cookie to identify the sender
157  @param context - sender context, to match reply w/ request
158 */
159 define nat_worker_dump {
162 };
163 
164 /** \brief NAT workers details response
165  @param context - sender context, to match reply w/ request
166  @param worker_index - worker index
167  @param lcore_id - lcore ID
168  @param name - worker name
169 */
170 define nat_worker_details {
174  string name[64];
175 };
176 
177 /** \brief Enable/disable NAT IPFIX logging
178  @param client_index - opaque cookie to identify the sender
179  @param context - sender context, to match reply w/ request
180  @param domain_id - observation domain ID
181  @param src_port - source port number
182  @param enable - true if enable, false if disable
183 */
184 autoreply define nat_ipfix_enable_disable {
189  bool enable;
190 };
191 
192 /** \brief Set NAT virtual fragmentation reassembly
193  @param client_index - opaque cookie to identify the sender
194  @param context - sender context, to match reply w/ request
195  @param timeout - reassembly timeout
196  @param max_reass - maximum number of concurrent reassemblies
197  @param max_frag - maximum number of fragmets per reassembly
198  @param drop_frag - if 0 translate fragments, otherwise drop fragments
199  @param is_ip6 - true if IPv6, false if IPv4
200 */
201 autoreply define nat_set_reass {
208  bool is_ip6;
209 };
210 
211 /** \brief Get NAT virtual fragmentation reassembly configuration
212  @param client_index - opaque cookie to identify the sender
213  @param context - sender context, to match reply w/ request
214 */
215 define nat_get_reass {
218 };
219 
220 /** \brief Get NAT virtual fragmentation reassembly configuration reply
221  @param context - sender context, to match reply w/ request
222  @param retval - return code
223  @param ip4_timeout - reassembly timeout
224  @param ip4_max_reass - maximum number of concurrent reassemblies
225  @param ip4_max_frag - maximum number of fragmets per reassembly
226  @param ip4_drop_frag - if 0 translate fragments, otherwise drop fragments
227  @param ip6_timeout - reassembly timeout
228  @param ip6_max_reass - maximum number of concurrent reassemblies
229  @param ip6_max_frag - maximum number of fragmets per reassembly
230  @param ip6_drop_frag - if 0 translate fragments, otherwise drop fragments
231 */
232 define nat_get_reass_reply {
243 };
244 
245 /** \brief Dump NAT virtual fragmentation reassemblies
246  @param client_index - opaque cookie to identify the sender
247  @param context - sender context, to match reply w/ request
248 */
249 define nat_reass_dump {
252 };
253 
254 /** \brief NAT virtual fragmentation reassemblies response
255  @param context - sender context, to match reply w/ request
256  @param src_addr - source IPv4 address
257  @param dst_addr - destination IPv4 address
258  @param frag_id - fragment ID
259  @param proto - protocol
260  @param frag_n - number of cached fragments
261 */
262 define nat_reass_details {
264  vl_api_address_t src_addr;
265  vl_api_address_t dst_addr;
269 };
270 
271 /** \brief Set values of timeouts for NAT sessions (seconds)
272  @param client_index - opaque cookie to identify the sender
273  @param context - sender context, to match reply w/ request
274  @param udp - UDP timeout (default 300sec)
275  @param tcp_established - TCP established timeout (default 7440sec)
276  @param tcp_transitory - TCP transitory timeout (default 240sec)
277  @param icmp - ICMP timeout (default 60sec)
278 */
279 autoreply define nat_set_timeouts {
286 };
287 
288 /** \brief Get values of timeouts for NAT sessions (seconds)
289  @param client_index - opaque cookie to identify the sender
290  @param context - sender context, to match reply w/ request
291 */
292 define nat_get_timeouts {
295 };
296 
297 /** \brief Get values of timeouts for NAT sessions reply
298  @param context - sender context, to match reply w/ request
299  @param retval - return code
300  @param udp - UDP timeout
301  @param tcp_established - TCP established timeout
302  @param tcp_transitory - TCP transitory timeout
303  @param icmp - ICMP timeout
304 */
305 define nat_get_timeouts_reply {
312 };
313 
314 /** \brief Set address and port assignment algorithm
315  @param client_index - opaque cookie to identify the sender
316  @param context - sender context, to match reply w/ request
317  @param alg - address and port assignment algorithm:
318  0 - default, 1 - MAP-E, 2 - port range
319  (see nat_addr_and_port_alloc_alg_t in nat.h)
320  @param psid_offset - number of offset bits (valid only for MAP-E alg)
321  @param psid_length - length of PSID (valid only for MAP-E alg)
322  @param psid - Port Set Identifier (PSID) value (valid only for MAP-E alg)
323  @param start_port - beginning of the port range
324  @param end_port - end of the port range
325 */
326 autoreply define nat_set_addr_and_port_alloc_alg {
335 };
336 
337 /** \brief Get address and port assignment algorithm
338  @param client_index - opaque cookie to identify the sender
339  @param context - sender context, to match reply w/ request
340 */
341 define nat_get_addr_and_port_alloc_alg {
344 };
345 
346 /** \brief Get address and port assignment algorithm reply
347  @param context - sender context, to match reply w/ request
348  @param retval - return code
349  @param alg - address and port assignment algorithm:
350  0 - default, 1 - MAP-E, 2 - port range
351  (see nat_addr_and_port_alloc_alg_t in nat.h)
352  @param psid_offset - number of offset bits (valid only for MAP-E alg)
353  @param psid_length - length of PSID (valid only for MAP-E alg)
354  @param psid - Port Set Identifier (PSID) value (valid only for MAP-E alg)
355  @param start_port - beginning of the port range
356  @param end_port - end of the port range
357 */
358 define nat_get_addr_and_port_alloc_alg_reply {
367 };
368 
369 /** \brief Set TCP MSS rewriting configuration
370  @param client_index - opaque cookie to identify the sender
371  @param context - sender context, to match reply w/ request
372  @param mss_value - MSS value to be used for MSS rewriting
373  @param enable - if true enable MSS rewriting feature else disable
374 */
375 autoreply define nat_set_mss_clamping {
379  bool enable;
380 };
381 
382 /** \brief Get TCP MSS rewriting configuration
383  @param client_index - opaque cookie to identify the sender
384  @param context - sender context, to match reply w/ request
385 */
386 define nat_get_mss_clamping {
389 };
390 
391 /** \brief Get TCP MSS rewriting configuration reply
392  @param context - sender context, to match reply w/ request
393  @param retval - return code
394  @param mss_value - MSS value to be used for MSS rewriting
395  @param enable - if true enable MSS rewriting feature else disable
396 */
397 define nat_get_mss_clamping_reply {
401  bool enable;
402 };
403 
404 /** \brief Set HA listener (local settings)
405  @param client_index - opaque cookie to identify the sender
406  @param context - sender context, to match reply w/ request
407  @param ip_address - local IP4 address
408  @param port - local UDP port number
409  @param path_mtu - path MTU between local and failover
410 */
411 autoreply define nat_ha_set_listener {
417 };
418 
419 /** \brief Set HA failover (remote settings)
420  @param client_index - opaque cookie to identify the sender
421  @param context - sender context, to match reply w/ request
422  @param ip_address - failover IP4 address
423  @param port - failvoer UDP port number
424  @param session_refresh_interval - number of seconds after which to send
425  session counters refresh
426 */
427 autoreply define nat_ha_set_failover {
433 };
434 
435 /** \brief Get HA listener/local configuration
436  @param client_index - opaque cookie to identify the sender
437  @param context - sender context, to match reply w/ request
438 */
442 };
443 
444 /** \brief Get HA listener/local configuration reply
445  @param context - sender context, to match reply w/ request
446  @param retval - return code
447  @param ip_address - local IP4 address
448  @param port - local UDP port number
449  @param path_mtu - Path MTU between local and failover
450 */
451 define nat_ha_get_listener_reply {
457 };
458 
459 /** \brief Get HA failover/remote settings
460  @param client_index - opaque cookie to identify the sender
461  @param context - sender context, to match reply w/ request
462 */
466 };
467 
468 /** \brief Get HA failover/remote settings reply
469  @param context - sender context, to match reply w/ request
470  @param retval - return code
471  @param ip_address - failover IP4 address
472  @param port - failvoer UDP port number
473  @param session_refresh_interval - number of seconds after which to send
474  session counters refresh
475 */
476 define nat_ha_get_failover_reply {
482 };
483 
484 /** \brief Flush the current HA data (for testing)
485  @param client_index - opaque cookie to identify the sender
486  @param context - sender context, to match reply w/ request
487 */
488 autoreply define nat_ha_flush {
491 };
492 
493 /** \brief Resync HA (resend existing sessions to new failover)
494  @param client_index - opaque cookie to identify the sender
495  @param context - sender context, to match reply w/ request
496  @param want_resync_event - resync completed event sent to the sender via
497  nat_ha_resync_completed_event API message if
498  non-zero
499  @param pid - sender's pid
500 */
501 autoreply define nat_ha_resync
502 {
507 };
508 
509 /** \brief Tell client about a HA resync completion event
510  @param client_index - opaque cookie to identify the sender
511  @param pid - client pid registered to receive notification
512  @param missed_count - number of missed (not ACKed) messages
513 */
514 define nat_ha_resync_completed_event
515 {
519 };
520 
522  rpc nat_ha_resync returns nat_ha_resync_reply events nat_ha_resync_completed_event;
523 };
524 
525 /*
526  * NAT44 APIs
527  */
528 
529 /** \brief Add/del NAT44 address range
530  @param client_index - opaque cookie to identify the sender
531  @param context - sender context, to match reply w/ request
532  @param first_ip_address - first IPv4 address
533  @param last_ip_address - last IPv4 address
534  @param vrf_id - VRF id of tenant, ~0 means independent of VRF
535  @param is_add - true if add, false if delete
536  @param flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts
537 
538 */
539 autoreply define nat44_add_del_address_range {
545  bool is_add;
546  vl_api_nat_config_flags_t flags;
547 };
548 
549 /** \brief Dump NAT44 addresses
550  @param client_index - opaque cookie to identify the sender
551  @param context - sender context, to match reply w/ request
552 */
553 define nat44_address_dump {
556 };
557 
558 /** \brief NAT44 address details response
559  @param context - sender context, to match reply w/ request
560  @param ip_address - IPv4 address
561  @param flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts
562  @param vrf_id - VRF id of tenant, ~0 means independent of VRF
563 */
564 define nat44_address_details {
567  vl_api_nat_config_flags_t flags;
569 };
570 
571 /** \brief Enable/disable NAT44 feature on the interface
572  @param client_index - opaque cookie to identify the sender
573  @param context - sender context, to match reply w/ request
574  @param is_add - true if add, false if delete
575  @param flags - flag NAT_IS_INSIDE if interface is inside else
576  interface is outside
577  @param sw_if_index - software index of the interface
578 */
579 autoreply define nat44_interface_add_del_feature {
582  bool is_add;
583  vl_api_nat_config_flags_t flags;
584  vl_api_interface_index_t sw_if_index;
585 };
586 
587 /** \brief Dump interfaces with NAT44 feature
588  @param client_index - opaque cookie to identify the sender
589  @param context - sender context, to match reply w/ request
590 */
591 define nat44_interface_dump {
594 };
595 
596 /** \brief NAT44 interface details response
597  @param context - sender context, to match reply w/ request
598  @param sw_if_index - software index of the interface
599  @param flags - flag NAT_IS_INSIDE if interface is inside,
600  flag NAT_IS_OUTSIDE if interface is outside
601  and if both flags are set the interface is
602  both inside and outside
603 */
604 define nat44_interface_details {
606  vl_api_nat_config_flags_t flags;
607  vl_api_interface_index_t sw_if_index;
608 };
609 
610 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
611  in2out translation)
612  @param client_index - opaque cookie to identify the sender
613  @param context - sender context, to match reply w/ request
614  @param is_add - true if add, false if delete
615  @param flags - flag NAT_IS_INSIDE if interface is inside else
616  interface is outside
617  @param sw_if_index - software index of the interface
618 */
619 autoreply define nat44_interface_add_del_output_feature {
622  bool is_add;
623  vl_api_nat_config_flags_t flags;
624  vl_api_interface_index_t sw_if_index;
625 };
626 
627 /** \brief Dump interfaces with NAT44 output feature
628  @param client_index - opaque cookie to identify the sender
629  @param context - sender context, to match reply w/ request
630 */
631 define nat44_interface_output_feature_dump {
634 };
635 
636 /** \brief NAT44 interface with output feature details response
637  @param context - sender context, to match reply w/ request
638  @param flags - flag NAT_IS_INSIDE if interface is inside else
639  interface is outside
640  @param sw_if_index - software index of the interface
641 */
642 define nat44_interface_output_feature_details {
644  vl_api_nat_config_flags_t flags;
645  vl_api_interface_index_t sw_if_index;
646 };
647 
648 /** \brief Add/delete NAT44 static mapping
649  @param client_index - opaque cookie to identify the sender
650  @param context - sender context, to match reply w/ request
651  @param is_add - true if add, false if delete
652  @param flags - flag NAT_IS_ADDR_ONLY if address only mapping,
653  flag nat_is_twice_nat if nat address range for external hosts,
654  flag NAT_IS_SELF_TWICE_NAT if translate external host address
655  and port whenever external host address equals local
656  address of internal host,
657  flag NAT_IS_OUT2IN_ONLY if rule match only out2in direction
658  @param local_ip_address - local IPv4 address
659  @param external_ip_address - external IPv4 address
660  @param protocol - IP protocol, used only if addr_only=0
661  @param local_port - local port number, used only if addr_only=0
662  @param external_port - external port number, used only if addr_only=0
663  @param external_sw_if_index - external interface (if set
664  external_ip_address is ignored, ~0 means not
665  used)
666  @param vfr_id - VRF ID
667  @param tag - opaque string tag
668 */
669 autoreply define nat44_add_del_static_mapping {
672  bool is_add;
673  vl_api_nat_config_flags_t flags;
679  vl_api_interface_index_t external_sw_if_index;
681  string tag[64];
682 };
683 
684 /** \brief Dump NAT44 static mappings
685  @param client_index - opaque cookie to identify the sender
686  @param context - sender context, to match reply w/ request
687 */
688 define nat44_static_mapping_dump {
691 };
692 
693 /** \brief NAT44 static mapping details response
694  @param context - sender context, to match reply w/ request
695  @param flags - flag NAT_ADDR_ONLY if address only mapping,
696  flag NAT_TWICE_NAT if NAT address range for external hosts,
697  flag NAT_SELF_TWICE_NAT if translate external host address
698  and port whenever external host address equals local
699  address of internal host,
700  flag NAT_OUT2IN_ONLY if rule match only out2in direction
701  @param local_ip_address - local IPv4 address
702  @param external_ip_address - external IPv4 address
703  @param protocol - IP protocol, valid only if no NAT_ADDR_ONLY flag
704  @param local_port - local port number, valid only if no NAT_ADDR_ONLY flag
705  @param external_port - external port number, valid only if no NAT_ADDR_ONLY flag
706  @param external_sw_if_index - external interface
707  @param vfr_id - VRF ID
708  @param tag - opaque string tag
709 */
710 define nat44_static_mapping_details {
712  vl_api_nat_config_flags_t flags;
718  vl_api_interface_index_t external_sw_if_index;
720  string tag[64];
721 };
722 
723 /** \brief Add/delete NAT44 identity mapping
724  @param client_index - opaque cookie to identify the sender
725  @param context - sender context, to match reply w/ request
726  @param is_add - true if add, false if delete
727  @param flags - flag NAT_ADDR_ONLY if address only mapping
728  @param ip_address - IPv4 address
729  @param protocol - IP protocol
730  @param port - port number
731  @param sw_if_index - interface (if set ip_address is ignored, ~0 means not
732  used)
733  @param vfr_id - VRF ID (if ~0 use default VRF)
734  @param tag - opaque string tag
735 */
736 autoreply define nat44_add_del_identity_mapping {
739  bool is_add;
740  vl_api_nat_config_flags_t flags;
744  vl_api_interface_index_t sw_if_index;
746  string tag[64];
747 };
748 
749 /** \brief Dump NAT44 identity mappings
750  @param client_index - opaque cookie to identify the sender
751  @param context - sender context, to match reply w/ request
752 */
753 define nat44_identity_mapping_dump {
756 };
757 
758 /** \brief NAT44 identity mapping details response
759  @param context - sender context, to match reply w/ request
760  @param flags - flag NAT_ADDR_ONLY if address only mapping
761  @param ip_address - IPv4 address
762  @param protocol - IP protocol
763  @param port - port number
764  @param sw_if_index - interface
765  @param vfr_id - VRF ID
766  @param tag - opaque string tag
767 */
768 define nat44_identity_mapping_details {
770  vl_api_nat_config_flags_t flags;
774  vl_api_interface_index_t sw_if_index;
776  string tag[64];
777 };
778 
779 /** \brief Add/delete NAT44 pool address from specific interfce
780  @param client_index - opaque cookie to identify the sender
781  @param context - sender context, to match reply w/ request
782  @param is_add - true if add, false if delete
783  @param sw_if_index - software index of the interface
784  @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts
785 */
786 autoreply define nat44_add_del_interface_addr {
789  bool is_add;
790  vl_api_interface_index_t sw_if_index;
791  vl_api_nat_config_flags_t flags;
792 };
793 
794 /** \brief Dump NAT44 pool addresses interfaces
795  @param client_index - opaque cookie to identify the sender
796  @param context - sender context, to match reply w/ request
797 */
798 define nat44_interface_addr_dump {
801 };
802 
803 /** \brief NAT44 pool addresses interfaces details response
804  @param context - sender context, to match reply w/ request
805  @param sw_if_index - software index of the interface
806  @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts
807 
808 */
809 define nat44_interface_addr_details {
811  vl_api_interface_index_t sw_if_index;
812  vl_api_nat_config_flags_t flags;
813 };
814 
815 /** \brief Dump NAT44 users
816  @param client_index - opaque cookie to identify the sender
817  @param context - sender context, to match reply w/ request
818 */
819 define nat44_user_dump {
822 };
823 
824 /** \brief NAT44 users response
825  @param context - sender context, to match reply w/ request
826  @vrf_id - VRF ID
827  @param ip_address - IPv4 address
828  @param nsessions - number of dynamic sessions
829  @param nstaticsessions - number of static sessions
830 */
831 define nat44_user_details {
837 };
838 
839 /** \brief NAT44 user's sessions
840  @param client_index - opaque cookie to identify the sender
841  @param context - sender context, to match reply w/ request
842  @param ip_address - IPv4 address of the user to dump
843  @param vrf_id - VRF_ID
844 */
845 define nat44_user_session_dump {
850 };
851 
852 /** \brief NAT44 user's sessions response
853  @param context - sender context, to match reply w/ request
854  @param outside_ip_address - outside IPv4 address
855  @param outside_port - outside port
856  @param inside_ip_address - inside IPv4 address
857  @param inside_port - inside port
858  @param protocol - protocol
859  @param flags - flag NAT_IS_STATIC if session is static,
860  flag NAT_IS_TWICE_NAT if session is twice-nat,
861  flag NAT_IS_EXT_HOST_VALID if external host address
862  and port are valid
863  @param last_heard - last heard timer
864  @param total_bytes - count of bytes sent through session
865  @param total_pkts - count of pakets sent through session
866  @param ext_host_address - external host IPv4 address
867  @param ext_host_port - external host port
868  @param ext_host_nat_address - post-NAT external host IPv4 address (valid
869  only if twice-nat session)
870  @param ext_host_nat_port - post-NAT external host port (valid only if
871  twice-nat session)
872 */
873 define nat44_user_session_details {
880  vl_api_nat_config_flags_t flags;
888 };
889 
890 /** \brief NAT44 load-balancing address and port pair
891  @param addr - IPv4 address of the internal node
892  @param port - L4 port number of the internal node
893  @param probability - probability of the internal node to be randomly matched
894  @param vrf_id - VRF id
895 */
896 typeonly manual_endian define nat44_lb_addr_port {
901 };
902 
903 /** \brief Add/delete NAT44 load-balancing static mapping rule
904  @param client_index - opaque cookie to identify the sender
905  @param context - sender context, to match reply w/ request
906  @param is_add - true if add, false if delete
907  @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
908  flag NAT_SELF_TWICE_NAT if translate external host address
909  and port whenever external host address equals local
910  address of internal host,
911  flag NAT_OUT2IN_ONLY if rule match only out2in direction
912  @param external_addr - external IPv4 address of the service
913  @param external_port - external L4 port number of the service
914  @param protocol - IP protocol number of the service
915  @param affinity - if 0 disabled, otherwise client IP affinity sticky time
916  in seconds
917  @param local_num - number of local network nodes
918  @param locals - local network nodes
919  @param tag - opaque string tag
920 */
921 autoreply manual_endian define nat44_add_del_lb_static_mapping {
924  bool is_add;
925  vl_api_nat_config_flags_t flags;
930  string tag[64];
932  vl_api_nat44_lb_addr_port_t locals[local_num];
933 };
934 
935 /** \brief Add/delete NAT44 load-balancing static mapping rule backend
936  @param client_index - opaque cookie to identify the sender
937  @param context - sender context, to match reply w/ request
938  @param is_add - true if add, false if delete
939  @param external_addr - external IPv4 address of the service
940  @param external_port - external L4 port number of the service
941  @param protocol - IP protocol number of the service
942  @param local - local network node
943 */
947  bool is_add;
952 };
953 
954 /** \brief Dump NAT44 load-balancing static mapping rules
955  @param client_index - opaque cookie to identify the sender
956  @param context - sender context, to match reply w/ request
957 */
958 define nat44_lb_static_mapping_dump {
961 };
962 
963 /** \brief NAT44 load-balancing static mapping rule details response
964  @param context - sender context, to match reply w/ request
965  @param external_addr - external IPv4 address of the service
966  @param external_port - external L4 port number of the service
967  @param protocol - IP protocol number of the service
968  @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
969  flag NAT_SELF_TWICE_NAT if translate external host address
970  and port whenever external host address equals local
971  address of internal host,
972  flag NAT_OUT2IN_ONLY if rule match only out2in direction
973  @param affinity - if 0 disabled, otherwise client IP affinity sticky time
974  in seconds
975  @param local_num - number of local network nodes
976  @param locals - local network nodes
977  @param tag - opaque string tag
978 */
979 manual_endian define nat44_lb_static_mapping_details {
984  vl_api_nat_config_flags_t flags;
986  string tag[64];
988  vl_api_nat44_lb_addr_port_t locals[local_num];
989 };
990 
991 /** \brief Delete NAT44 session
992  @param client_index - opaque cookie to identify the sender
993  @param context - sender context, to match reply w/ request
994  @param ip_address - IPv4 address
995  @param protocol - IP protocol
996  @param port - port number
997  @param vfr_id - VRF ID
998  @param flags - flag NAT_IS_INSIDE if interface is inside or
999  interface is outside,
1000  flag NAT_IS_EXT_HOST_VALID if external host address and
1001  port are valid
1002  @param ext_host_address - external host IPv4 address
1003  @param ext_host_port - external host port
1004 */
1005 autoreply define nat44_del_session {
1012  vl_api_nat_config_flags_t flags;
1015 };
1016 
1017 /** \brief Enable/disable forwarding for NAT44
1018  Forward packets which don't match existing translation
1019  or static mapping instead of dropping them.
1020  @param client_index - opaque cookie to identify the sender
1021  @param context - sender context, to match reply w/ request
1022  @param enable - true for enable, false for disable
1023 */
1024 autoreply define nat44_forwarding_enable_disable {
1027  bool enable;
1028 };
1029 
1030 /** \brief Check if forwarding is enabled or disabled
1031  @param client_index - opaque cookie to identify the sender
1032  @param context - sender context, to match reply w/ request
1033 */
1034 define nat44_forwarding_is_enabled {
1037 };
1038 
1039 /** \brief Response to check if forwarding is enabled or disabled
1040  @param context - sender context, to match reply w/ request
1041  @param enabled - true if enabled, false if disabled
1042 */
1043 define nat44_forwarding_is_enabled_reply {
1045  bool enabled;
1046 };
1047 
1048 
1049 /*
1050  * Deterministic NAT (CGN) APIs
1051  */
1052 
1053 /** \brief Add/delete NAT deterministic mapping
1054  @param client_index - opaque cookie to identify the sender
1055  @param context - sender context, to match reply w/ request
1056  @param is_add - true if add, false if delete
1057  @param in_addr - inside IPv4 address
1058  @param in_plen - inside IPv4 address prefix length
1059  @param out_addr - outside IPv4 address
1060  @param out_plen - outside IPv4 address prefix length
1061 */
1062 autoreply define nat_det_add_del_map {
1065  bool is_add;
1070 };
1071 
1072 /** \brief Get outside address and port range from inside address
1073  @param client_index - opaque cookie to identify the sender
1074  @param context - sender context, to match reply w/ request
1075  @param in_addr - inside IP address
1076 */
1077 define nat_det_forward {
1081 };
1082 
1083 /** \brief Get outside address and port range from inside address
1084  @param context - sender context, to match reply w/ request
1085  @param retval - return code
1086  @param out_port_lo - outside port range start
1087  @param out_port_hi - outside port range end
1088  @param out_addr - outside IPv4 address
1089 */
1090 define nat_det_forward_reply {
1096 };
1097 
1098 /** \brief Get inside address from outside address and port
1099  @param client_index - opaque cookie to identify the sender
1100  @param context - sender context, to match reply w/ request
1101  @param out_port - outside port
1102  @param out_addr - outside IPv4 address
1103 */
1104 define nat_det_reverse {
1109 };
1110 
1111 /** \brief Get inside address from outside address and port reply
1112  @param context - sender context, to match reply w/ request
1113  @param retval - return code
1114  @param in_addr - inside IP address
1115 */
1116 define nat_det_reverse_reply {
1120 };
1121 
1122 /** \brief Dump NAT deterministic mappings
1123  @param client_index - opaque cookie to identify the sender
1124  @param context - sender context, to match reply w/ request
1125 */
1126 define nat_det_map_dump {
1129 };
1130 
1131 /** \brief NAT users response
1132  @param context - sender context, to match reply w/ request
1133  @param in_addr - inside IPv4 address
1134  @param in_plen - inside IPv4 address prefix length
1135  @param out_addr - outside IPv4 address
1136  @param out_plen - outside IPv4 address prefix length
1137  @param sharing_ratio - outside to inside address sharing ratio
1138  @param ports_per_host - number of ports available to a host
1139  @param ses_num - number of sessions belonging to this mapping
1140 */
1141 define nat_det_map_details {
1150 };
1151 
1152 /** \brief Close deterministic NAT session by outside address and port
1153  @param client_index - opaque cookie to identify the sender
1154  @param context - sender context, to match reply w/ request
1155  @param out_addr - outside IPv4 address
1156  @param out_port - outside port
1157  @param ext_addr - external host IPv4 address
1158  @param ext_port - external host port
1159 */
1160 autoreply define nat_det_close_session_out {
1167 };
1168 
1169 /** \brief Close deterministic NAT session by inside address and port
1170  @param client_index - opaque cookie to identify the sender
1171  @param context - sender context, to match reply w/ request
1172  @param in_addr - inside IP address
1173  @param in_port - inside port
1174  @param ext_addr - external host IP address
1175  @param ext_port - external host port
1176 */
1177 autoreply define nat_det_close_session_in {
1184 };
1185 
1186 /** \brief Dump determinstic NAT sessions
1187  @param client_index - opaque cookie to identify the sender
1188  @param context - sender context, to match reply w/ request
1189  @param user_addr - address of an inside user whose sessions to dump
1190 */
1191 define nat_det_session_dump {
1195 };
1196 
1197 /** \brief Deterministic NAT sessions reply
1198  @param context - sender context, to match reply w/ request
1199  @param in_port - inside port
1200  @param ext_addr - external host IPv4 address
1201  @param ext_port - external host port
1202  @param out_port - outside NAT port
1203  @param state - session state
1204  @param expire - session expiration timestamp
1205 */
1206 define nat_det_session_details {
1214 };
1215 
1216 /*
1217  * NAT64 APIs
1218  */
1219 
1220 /** \brief Add/delete address range to NAT64 pool
1221  @param client_index - opaque cookie to identify the sender
1222  @param context - sender context, to match reply w/ request
1223  @param start_addr - start IPv4 address of the range
1224  @param end_addr - end IPv4 address of the range
1225  @param vrf_id - VRF id of tenant, ~0 means independent of VRF
1226  @param is_add - true if add, false if delete
1227 */
1228 autoreply define nat64_add_del_pool_addr_range {
1234  bool is_add;
1235 };
1236 
1237 /** \brief Dump NAT64 pool addresses
1238  @param client_index - opaque cookie to identify the sender
1239  @param context - sender context, to match reply w/ request
1240 */
1241 define nat64_pool_addr_dump {
1244 };
1245 
1246 /** \brief NAT64 pool address details response
1247  @param context - sender context, to match reply w/ request
1248  @param address - IPv4 address
1249  @param vfr_id - VRF id of tenant, ~0 means independent of VRF
1250 */
1251 define nat64_pool_addr_details {
1255 };
1256 
1257 /** \brief Enable/disable NAT64 feature on the interface
1258  @param client_index - opaque cookie to identify the sender
1259  @param context - sender context, to match reply w/ request
1260  @param is_add - true if add, false if delete
1261  @param flags - flag NAT_IS_INSIDE if interface is inside else
1262  interface is outside
1263  @param sw_if_index - index of the interface
1264 */
1265 autoreply define nat64_add_del_interface {
1268  bool is_add;
1269  vl_api_nat_config_flags_t flags;
1270  vl_api_interface_index_t sw_if_index;
1271 };
1272 
1273 /** \brief Dump interfaces with NAT64 feature
1274  @param client_index - opaque cookie to identify the sender
1275  @param context - sender context, to match reply w/ request
1276 */
1277 define nat64_interface_dump {
1280 };
1281 
1282 /** \brief NAT64 interface details response
1283  @param context - sender context, to match reply w/ request
1284  @param flags - flag NAT_IS_INSIDE if interface is inside,
1285  flag NAT_IS_OUTSIDE if interface is outside
1286  and if both flags are set the interface is
1287  both inside and outside
1288  @param sw_if_index - index of the interface
1289 */
1290 define nat64_interface_details {
1292  vl_api_nat_config_flags_t flags;
1293  vl_api_interface_index_t sw_if_index;
1294 };
1295 
1296 /** \brief Add/delete NAT64 static BIB entry
1297  @param client_index - opaque cookie to identify the sender
1298  @param context - sender context, to match reply w/ request
1299  @param i_addr - inside IPv6 address
1300  @param o_addr - outside IPv4 address
1301  @param i_port - inside port number
1302  @param o_port - outside port number
1303  @param vrf_id - VRF id of tenant
1304  @param proto - protocol number
1305  @param is_add - true if add, false if delete
1306 */
1307  autoreply define nat64_add_del_static_bib {
1316  bool is_add;
1317 };
1318 
1319 /** \brief Dump NAT64 BIB
1320  @param client_index - opaque cookie to identify the sender
1321  @param context - sender context, to match reply w/ request
1322  @param proto - protocol of the BIB: 255 - all BIBs
1323  6 - TCP BIB
1324  17 - UDP BIB
1325  1/58 - ICMP BIB
1326  otherwise - "unknown" protocol BIB
1327 */
1328 define nat64_bib_dump {
1332 };
1333 
1334 /** \brief NAT64 BIB details response
1335  @param context - sender context, to match reply w/ request
1336  @param i_addr - inside IPv6 address
1337  @param o_addr - outside IPv4 address
1338  @param i_port - inside port number
1339  @param o_port - outside port number
1340  @param vrf_id - VRF id of tenant
1341  @param proto - protocol number
1342  @param flags - flag NAT_IS_STATIC if BIB entry is static
1343  or BIB entry is dynamic
1344  @param ses_num - number of sessions associated with the BIB entry
1345 */
1346 define nat64_bib_details {
1354  vl_api_nat_config_flags_t flags;
1356 };
1357 
1358 /** \brief Dump NAT64 session table
1359  @param client_index - opaque cookie to identify the sender
1360  @param context - sender context, to match reply w/ request
1361  @param proto - protocol of the session table: 255 - all STs
1362  6 - TCP ST
1363  17 - UDP ST
1364  1/58 - ICMP ST
1365  otherwise - "unknown" proto ST
1366 */
1367 define nat64_st_dump {
1371 };
1372 
1373 /** \brief NAT64 session table details response
1374  @param context - sender context, to match reply w/ request
1375  @param il_addr - inside IPv6 address of the local host
1376  @param ol_addr - outside IPv4 address of the local host
1377  @param il_port - inside port number id of the local host/inside ICMP id
1378  @param ol_port - outside port number of the local host/outside ICMP id
1379  @param ir_addr - inside IPv6 address of the remote host
1380  @param or_addr - outside IPv4 address of the remote host
1381  @param r_port - port number of the remote host (not used for ICMP)
1382  @param vrf_id - VRF id of tenant
1383  @param proto - protocol number
1384 */
1385 define nat64_st_details {
1396 };
1397 
1398 /** \brief Add/del NAT64 prefix
1399  @param client_index - opaque cookie to identify the sender
1400  @param context - sender context, to match reply w/ request
1401  @param prefix - NAT64 prefix
1402  @param vrf_id - VRF id of tenant
1403  @param is_add - true if add, false if delete
1404 */
1405 autoreply define nat64_add_del_prefix {
1408  vl_api_ip6_prefix_t prefix;
1410  bool is_add;
1411 };
1412 
1413 /** \brief Dump NAT64 prefix
1414  @param client_index - opaque cookie to identify the sender
1415  @param context - sender context, to match reply w/ request
1416 */
1417 define nat64_prefix_dump {
1420 };
1421 
1422 /** \brief Dump NAT64 prefix details response
1423  @param context - sender context, to match reply w/ request
1424  @param prefix - NAT64 prefix
1425  @param vrf_id - VRF id of tenant
1426 */
1427 define nat64_prefix_details {
1429  vl_api_ip6_prefix_t prefix;
1431 };
1432 
1433 /** \brief Add/delete NAT64 pool address from specific interfce
1434  @param client_index - opaque cookie to identify the sender
1435  @param context - sender context, to match reply w/ request
1436  @param is_add - true if add, false if delete
1437  @param sw_if_index - software index of the interface
1438 */
1439 autoreply define nat64_add_del_interface_addr {
1442  bool is_add;
1443  vl_api_interface_index_t sw_if_index;
1444 };
1445 
1446 /*
1447  * DS-Lite APIs
1448  */
1449 
1450 /** \brief Add/delete address range to DS-Lite pool
1451  @param client_index - opaque cookie to identify the sender
1452  @param context - sender context, to match reply w/ request
1453  @param start_addr - start IPv4 address of the range
1454  @param end_addr - end IPv4 address of the range
1455  @param is_add - true if add, false if delete
1456 */
1457 autoreply define dslite_add_del_pool_addr_range {
1462  bool is_add;
1463 };
1464 
1465 /** \brief Dump DS-Lite addresses
1466  @param client_index - opaque cookie to identify the sender
1467  @param context - sender context, to match reply w/ request
1468 */
1469 define dslite_address_dump {
1472 };
1473 
1474 /** \brief DS-Lite address details response
1475  @param context - sender context, to match reply w/ request
1476  @param ip_address - IPv4 address
1477 */
1478 define dslite_address_details {
1481 };
1482 
1483 /** \brief Set AFTR IPv6 and IPv4 addresses
1484  @param client_index - opaque cookie to identify the sender
1485  @param context - sender context, to match reply w/ request
1486  @param ip4_addr - IPv4 address
1487  @param ip6_addr - IPv6 address
1488 */
1489 autoreply define dslite_set_aftr_addr {
1494 };
1495 
1496 /** \brief Get AFTR IPv6 and IPv4 addresses
1497  @param client_index - opaque cookie to identify the sender
1498  @param context - sender context, to match reply w/ request
1499 */
1500 define dslite_get_aftr_addr {
1503 };
1504 
1505 /** \brief Response to get AFTR IPv6 and IPv4 addresses
1506  @param context - sender context, to match reply w/ request
1507  @param retval - return code
1508  @param ip4_addr - IPv4 address
1509  @param ip6_addr - IPv6 address
1510 */
1511 define dslite_get_aftr_addr_reply {
1516 };
1517 
1518 /** \brief Set B4 IPv6 and IPv4 addresses
1519  @param client_index - opaque cookie to identify the sender
1520  @param context - sender context, to match reply w/ request
1521  @param ip4_addr - IPv4 address
1522  @param ip6_addr - IPv6 address
1523 */
1524 autoreply define dslite_set_b4_addr {
1529 };
1530 
1531 /** \brief Get B4 IPv6 and IPv4 addresses
1532  @param client_index - opaque cookie to identify the sender
1533  @param context - sender context, to match reply w/ request
1534 */
1535 define dslite_get_b4_addr {
1538 };
1539 
1540 /** \brief Response to get B4 IPv6 and IPv4 addresses
1541  @param context - sender context, to match reply w/ request
1542  @param retval - return code
1543  @param ip4_addr - IPv4 address
1544  @param ip6_addr - IPv6 address
1545 */
1546 define dslite_get_b4_addr_reply {
1551 };
1552 
1553 /*
1554  * NAT66 APIs
1555  */
1556 /** \brief Enable/disable NAT66 feature on the interface
1557  @param client_index - opaque cookie to identify the sender
1558  @param context - sender context, to match reply w/ request
1559  @param is_add - true if add, false if delete
1560  @param flags - flag NAT_IS_INSIDE if interface is inside or
1561  interface is outside,
1562  @param sw_if_index - software index of the interface
1563 */
1564 autoreply define nat66_add_del_interface {
1567  bool is_add;
1568  vl_api_nat_config_flags_t flags;
1569  vl_api_interface_index_t sw_if_index;
1570 };
1571 
1572 /** \brief Dump interfaces with NAT66 feature
1573  @param client_index - opaque cookie to identify the sender
1574  @param context - sender context, to match reply w/ request
1575 */
1576 define nat66_interface_dump {
1579 };
1580 
1581 /** \brief NAT66 interface details response
1582  @param context - sender context, to match reply w/ request
1583  @param flags - flag NAT_IS_INSIDE if interface is inside or
1584  interface is outside,
1585  @param sw_if_index - software index of the interface
1586 */
1587 define nat66_interface_details {
1589  vl_api_nat_config_flags_t flags;
1590  vl_api_interface_index_t sw_if_index;
1591 };
1592 
1593 /** \brief Add/delete 1:1 NAT66
1594  @param client_index - opaque cookie to identify the sender
1595  @param context - sender context, to match reply w/ request
1596  @param is_add - true if add, false if delete
1597  @param local_ip_address - local IPv6 address
1598  @param external_ip_address - external IPv6 address
1599  @param vrf_id - VRF id of tenant
1600 */
1601 autoreply define nat66_add_del_static_mapping {
1604  bool is_add;
1608 };
1609 
1610 /** \brief Dump NAT66 static mappings
1611  @param client_index - opaque cookie to identify the sender
1612  @param context - sender context, to match reply w/ request
1613 */
1614 define nat66_static_mapping_dump {
1617 };
1618 
1619 /** \brief NAT66 static mapping details response
1620  @param context - sender context, to match reply w/ request
1621  @param local_ip_address - local IPv6 address
1622  @param external_ip_address - external IPv6 address
1623  @param vrf_id - VRF id of tenant
1624  @param total_bytes - count of bytes sent through static mapping
1625  @param total_pkts - count of pakets sent through static mapping
1626 */
1627 define nat66_static_mapping_details {
1634 };
vl_api_ip4_address_t ext_host_address
Definition: nat.api:884
vl_api_ip4_address_t ext_addr
Definition: nat.api:1182
vl_api_interface_index_t sw_if_index
Definition: nat.api:790
vl_api_ip4_address_t out_addr
Definition: nat.api:1095
vl_api_nat_config_flags_t flags
Definition: nat.api:1589
vl_api_ip4_address_t external_addr
Definition: nat.api:981
vl_api_interface_index_t external_sw_if_index
Definition: nat.api:679
vl_api_interface_index_t sw_if_index
Definition: nat.api:584
vl_api_ip4_address_t external_addr
Definition: nat.api:926
vl_api_ip4_address_t out_addr
Definition: nat.api:1068
unsigned long u64
Definition: types.h:89
int nat64_add_del_interface(u32 sw_if_index, u8 is_inside, u8 is_add)
Enable/disable NAT64 feature on the interface.
Definition: nat64.c:453
vl_api_ip4_address_t ip4_addr
Definition: nat.api:1527
vl_api_nat_config_flags_t flags
Definition: nat.api:740
vl_api_nat_config_flags_t flags
Definition: nat.api:1354
vl_api_nat_config_flags_t flags
Definition: nat.api:606
u8 vl_api_ip6_address_t[16]
Conversion functions to/from (decode/encode) API types to VPP internal types.
Definition: ip_types_api.h:30
vl_api_ip6_address_t external_ip_address
Definition: nat.api:1630
vl_api_ip4_address_t local_ip_address
Definition: nat.api:674
vl_api_address_t dst_addr
Definition: nat.api:265
vl_api_ip4_address_t ip_address
Definition: nat.api:479
vl_api_ip6_prefix_t prefix
Definition: nat.api:1429
vl_api_nat_config_flags_t flags
Definition: nat.api:583
vl_api_ip4_address_t first_ip_address
Definition: nat.api:542
vl_api_ip4_address_t or_addr
Definition: nat.api:1392
vl_api_ip4_address_t ip_address
Definition: nat.api:771
vl_api_ip4_address_t start_addr
Definition: nat.api:1460
vl_api_nat_config_flags_t flags
Definition: nat.api:812
unsigned char u8
Definition: types.h:56
vl_api_ip4_address_t out_addr
Definition: nat.api:1108
int nat44_add_del_lb_static_mapping(ip4_address_t e_addr, u16 e_port, snat_protocol_t proto, nat44_lb_addr_port_t *locals, u8 is_add, twice_nat_type_t twice_nat, u8 out2in_only, u8 *tag, u32 affinity)
Add/delete static mapping with load-balancing (multiple backends)
Definition: nat.c:1169
nat_log_level
Definition: nat.api:123
vl_api_ip4_address_t ip4_addr
Definition: nat.api:1549
vl_api_interface_index_t sw_if_index
Definition: nat.api:1443
vl_api_nat_config_flags_t flags
Definition: nat.api:1269
vl_api_ip6_address_t ir_addr
Definition: nat.api:1391
int nat_ha_resync(u32 client_index, u32 pid, nat_ha_resync_event_cb_t event_callback)
Resync HA (resend existing sessions to new failover)
vl_api_ip4_address_t o_addr
Definition: nat.api:1311
vl_api_nat_config_flags_t flags
Definition: nat.api:770
NAT44 load-balancing address and port pair.
Definition: nat.api:896
vl_api_ip6_address_t i_addr
Definition: nat.api:1310
nat_config_flags
Definition: nat.api:32
option version
Definition: nat.api:16
unsigned int u32
Definition: types.h:88
vl_api_ip4_address_t ip_address
Definition: nat.api:848
vl_api_ip6_address_t local_ip_address
Definition: nat.api:1605
vl_api_ip4_address_t ext_addr
Definition: nat.api:1209
vl_api_nat_config_flags_t flags
Definition: nat.api:1012
vl_api_nat_config_flags_t flags
Definition: nat.api:880
vl_api_nat_config_flags_t flags
Definition: nat.api:546
service
Definition: nat.api:521
vl_api_nat_config_flags_t flags
Definition: nat.api:925
vl_api_nat_config_flags_t flags
Definition: nat.api:712
vl_api_nat_config_flags_t flags
Definition: nat.api:984
unsigned short u16
Definition: types.h:57
vl_api_ip4_address_t external_ip_address
Definition: nat.api:714
void nat_ha_get_listener(ip4_address_t *addr, u16 *port, u32 *path_mtu)
Get HA listener/local configuration.
Definition: nat_ha.c:385
void nat_ha_flush(u8 is_resync)
Flush the current HA data (for testing)
Definition: nat_ha.c:682
vl_api_ip6_address_t i_addr
Definition: nat.api:1348
vl_api_ip4_address_t ext_host_nat_address
Definition: nat.api:886
vl_api_ip4_address_t outside_ip_address
Definition: nat.api:875
vl_api_ip4_address_t address
Definition: nat.api:1008
u8 name[64]
Definition: memclnt.api:152
vl_api_ip4_address_t in_addr
Definition: nat.api:1180
vl_api_ip6_address_t il_addr
Definition: nat.api:1387
vl_api_ip6_address_t external_ip_address
Definition: nat.api:1606
vl_api_ip4_address_t last_ip_address
Definition: nat.api:543
vl_api_interface_index_t sw_if_index
Definition: nat.api:1293
vl_api_ip4_address_t ip_address
Definition: nat.api:566
vl_api_ip4_address_t ext_addr
Definition: nat.api:1165
vl_api_interface_index_t sw_if_index
Definition: nat.api:1569
vl_api_ip4_address_t ip4_addr
Definition: nat.api:1492
u8 vl_api_ip4_address_t[4]
Definition: ip_types_api.h:31
vl_api_ip4_address_t ip_address
Definition: nat.api:414
vl_api_ip4_address_t ip_address
Definition: nat.api:1480
int nat64_add_del_prefix(ip6_address_t *prefix, u8 plen, u32 vrf_id, u8 is_add)
Add/delete NAT64 prefix.
Definition: nat64.c:1002
vl_api_ip4_address_t out_addr
Definition: nat.api:1163
vl_api_ip4_address_t ol_addr
Definition: nat.api:1388
vl_api_nat_config_flags_t flags
Definition: nat.api:791
vl_api_ip6_address_t ip6_addr
Definition: nat.api:1528
vl_api_nat_config_flags_t flags
Definition: nat.api:1568
vl_api_ip4_address_t ext_host_address
Definition: nat.api:1013
vl_api_ip4_address_t in_addr
Definition: nat.api:1080
vl_api_ip4_address_t end_addr
Definition: nat.api:1461
int nat_ha_set_listener(ip4_address_t *addr, u16 port, u32 path_mtu)
Set HA listener (local settings)
Definition: nat_ha.c:352
vl_api_ip6_address_t ip6_addr
Definition: nat.api:1515
signed int i32
Definition: types.h:77
int nat_ha_set_failover(ip4_address_t *addr, u16 port, u32 session_refresh_interval)
Set HA failover (remote settings)
Definition: nat_ha.c:395
vl_api_ip6_address_t ip6_addr
Definition: nat.api:1550
vl_api_ip4_address_t in_addr
Definition: nat.api:1143
vl_api_ip6_address_t ip6_addr
Definition: nat.api:1493
int nat44_del_session(snat_main_t *sm, ip4_address_t *addr, u16 port, snat_protocol_t proto, u32 vrf_id, int is_in)
Delete NAT44 session.
Definition: nat.c:4138
vl_api_ip4_address_t ip4_addr
Definition: nat.api:1514
vl_api_ip4_address_t o_addr
Definition: nat.api:1349
vl_api_nat_config_flags_t flags
Definition: nat.api:673
vl_api_interface_index_t sw_if_index
Definition: nat.api:774
vl_api_ip4_address_t start_addr
Definition: nat.api:1231
vl_api_interface_index_t external_sw_if_index
Definition: nat.api:718
vl_api_interface_index_t sw_if_index
Definition: nat.api:607
vl_api_interface_index_t sw_if_index
Definition: nat.api:1270
vl_api_interface_index_t sw_if_index
Definition: nat.api:1590
vl_api_ip4_address_t ip_address
Definition: nat.api:741
vl_api_interface_index_t sw_if_index
Definition: nat.api:811
vl_api_ip4_address_t ip_address
Definition: nat.api:834
vl_api_ip4_address_t end_addr
Definition: nat.api:1232
void nat_ha_get_failover(ip4_address_t *addr, u16 *port, u32 *session_refresh_interval)
Get HA failover/remote settings.
Definition: nat_ha.c:410
vl_api_ip4_address_t ip_address
Definition: nat.api:430
vl_api_interface_index_t sw_if_index
Definition: nat.api:744
vl_api_ip4_address_t addr
Definition: nat.api:897
vl_api_ip4_address_t external_ip_address
Definition: nat.api:675
vl_api_ip4_address_t inside_ip_address
Definition: nat.api:877
vl_api_ip6_prefix_t prefix
Definition: nat.api:1408
vl_api_ip4_address_t address
Definition: nat.api:1253
vl_api_nat_config_flags_t flags
Definition: nat.api:567
vl_api_ip4_address_t local_ip_address
Definition: nat.api:713
vl_api_ip4_address_t user_addr
Definition: nat.api:1194
vl_api_ip4_address_t in_addr
Definition: nat.api:1119
vl_api_nat_log_level_t log_level
Definition: nat.api:141
vl_api_interface_index_t sw_if_index
Definition: nat.api:645
vl_api_interface_index_t sw_if_index
Definition: nat.api:624
vl_api_ip4_address_t in_addr
Definition: nat.api:1066
vl_api_ip4_address_t out_addr
Definition: nat.api:1145
vl_api_nat44_lb_addr_port_t local
Definition: nat.api:951
int nat44_lb_static_mapping_add_del_local(ip4_address_t e_addr, u16 e_port, ip4_address_t l_addr, u16 l_port, snat_protocol_t proto, u32 vrf_id, u8 probability, u8 is_add)
Definition: nat.c:1446
vl_api_ip6_address_t local_ip_address
Definition: nat.api:1629
vl_api_nat_config_flags_t flags
Definition: nat.api:1292
vl_api_ip4_address_t ip_address
Definition: nat.api:454
vl_api_address_t src_addr
Definition: nat.api:264