FD.io VPP  v20.01-48-g3e0dafb74
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 values of timeouts for NAT sessions (seconds)
193  @param client_index - opaque cookie to identify the sender
194  @param context - sender context, to match reply w/ request
195  @param udp - UDP timeout (default 300sec)
196  @param tcp_established - TCP established timeout (default 7440sec)
197  @param tcp_transitory - TCP transitory timeout (default 240sec)
198  @param icmp - ICMP timeout (default 60sec)
199 */
200 autoreply define nat_set_timeouts {
207 };
208 
209 /** \brief Get values of timeouts for NAT sessions (seconds)
210  @param client_index - opaque cookie to identify the sender
211  @param context - sender context, to match reply w/ request
212 */
213 define nat_get_timeouts {
216 };
217 
218 /** \brief Get values of timeouts for NAT sessions reply
219  @param context - sender context, to match reply w/ request
220  @param retval - return code
221  @param udp - UDP timeout
222  @param tcp_established - TCP established timeout
223  @param tcp_transitory - TCP transitory timeout
224  @param icmp - ICMP timeout
225 */
226 define nat_get_timeouts_reply {
233 };
234 
235 /** \brief Set address and port assignment algorithm
236  @param client_index - opaque cookie to identify the sender
237  @param context - sender context, to match reply w/ request
238  @param alg - address and port assignment algorithm:
239  0 - default, 1 - MAP-E, 2 - port range
240  (see nat_addr_and_port_alloc_alg_t in nat.h)
241  @param psid_offset - number of offset bits (valid only for MAP-E alg)
242  @param psid_length - length of PSID (valid only for MAP-E alg)
243  @param psid - Port Set Identifier (PSID) value (valid only for MAP-E alg)
244  @param start_port - beginning of the port range
245  @param end_port - end of the port range
246 */
247 autoreply define nat_set_addr_and_port_alloc_alg {
256 };
257 
258 /** \brief Get address and port assignment algorithm
259  @param client_index - opaque cookie to identify the sender
260  @param context - sender context, to match reply w/ request
261 */
262 define nat_get_addr_and_port_alloc_alg {
265 };
266 
267 /** \brief Get address and port assignment algorithm reply
268  @param context - sender context, to match reply w/ request
269  @param retval - return code
270  @param alg - address and port assignment algorithm:
271  0 - default, 1 - MAP-E, 2 - port range
272  (see nat_addr_and_port_alloc_alg_t in nat.h)
273  @param psid_offset - number of offset bits (valid only for MAP-E alg)
274  @param psid_length - length of PSID (valid only for MAP-E alg)
275  @param psid - Port Set Identifier (PSID) value (valid only for MAP-E alg)
276  @param start_port - beginning of the port range
277  @param end_port - end of the port range
278 */
279 define nat_get_addr_and_port_alloc_alg_reply {
288 };
289 
290 /** \brief Set TCP MSS rewriting configuration
291  @param client_index - opaque cookie to identify the sender
292  @param context - sender context, to match reply w/ request
293  @param mss_value - MSS value to be used for MSS rewriting
294  @param enable - if true enable MSS rewriting feature else disable
295 */
296 autoreply define nat_set_mss_clamping {
300  bool enable;
301 };
302 
303 /** \brief Get TCP MSS rewriting configuration
304  @param client_index - opaque cookie to identify the sender
305  @param context - sender context, to match reply w/ request
306 */
307 define nat_get_mss_clamping {
310 };
311 
312 /** \brief Get TCP MSS rewriting configuration reply
313  @param context - sender context, to match reply w/ request
314  @param retval - return code
315  @param mss_value - MSS value to be used for MSS rewriting
316  @param enable - if true enable MSS rewriting feature else disable
317 */
318 define nat_get_mss_clamping_reply {
322  bool enable;
323 };
324 
325 /** \brief Set HA listener (local settings)
326  @param client_index - opaque cookie to identify the sender
327  @param context - sender context, to match reply w/ request
328  @param ip_address - local IP4 address
329  @param port - local UDP port number
330  @param path_mtu - path MTU between local and failover
331 */
332 autoreply define nat_ha_set_listener {
335  vl_api_ip4_address_t ip_address;
338 };
339 
340 /** \brief Set HA failover (remote settings)
341  @param client_index - opaque cookie to identify the sender
342  @param context - sender context, to match reply w/ request
343  @param ip_address - failover IP4 address
344  @param port - failvoer UDP port number
345  @param session_refresh_interval - number of seconds after which to send
346  session counters refresh
347 */
348 autoreply define nat_ha_set_failover {
351  vl_api_ip4_address_t ip_address;
354 };
355 
356 /** \brief Get HA listener/local configuration
357  @param client_index - opaque cookie to identify the sender
358  @param context - sender context, to match reply w/ request
359 */
363 };
364 
365 /** \brief Get HA listener/local configuration reply
366  @param context - sender context, to match reply w/ request
367  @param retval - return code
368  @param ip_address - local IP4 address
369  @param port - local UDP port number
370  @param path_mtu - Path MTU between local and failover
371 */
372 define nat_ha_get_listener_reply {
375  vl_api_ip4_address_t ip_address;
378 };
379 
380 /** \brief Get HA failover/remote settings
381  @param client_index - opaque cookie to identify the sender
382  @param context - sender context, to match reply w/ request
383 */
387 };
388 
389 /** \brief Get HA failover/remote settings reply
390  @param context - sender context, to match reply w/ request
391  @param retval - return code
392  @param ip_address - failover IP4 address
393  @param port - failvoer UDP port number
394  @param session_refresh_interval - number of seconds after which to send
395  session counters refresh
396 */
397 define nat_ha_get_failover_reply {
400  vl_api_ip4_address_t ip_address;
403 };
404 
405 /** \brief Flush the current HA data (for testing)
406  @param client_index - opaque cookie to identify the sender
407  @param context - sender context, to match reply w/ request
408 */
409 autoreply define nat_ha_flush {
412 };
413 
414 /** \brief Resync HA (resend existing sessions to new failover)
415  @param client_index - opaque cookie to identify the sender
416  @param context - sender context, to match reply w/ request
417  @param want_resync_event - resync completed event sent to the sender via
418  nat_ha_resync_completed_event API message if
419  non-zero
420  @param pid - sender's pid
421 */
422 autoreply define nat_ha_resync
423 {
428 };
429 
430 /** \brief Tell client about a HA resync completion event
431  @param client_index - opaque cookie to identify the sender
432  @param pid - client pid registered to receive notification
433  @param missed_count - number of missed (not ACKed) messages
434 */
435 define nat_ha_resync_completed_event
436 {
440 };
441 
443  rpc nat_ha_resync returns nat_ha_resync_reply events nat_ha_resync_completed_event;
444 };
445 
446 /*
447  * NAT44 APIs
448  */
449 
450 /** \brief Add/del NAT44 address range
451  @param client_index - opaque cookie to identify the sender
452  @param context - sender context, to match reply w/ request
453  @param first_ip_address - first IPv4 address
454  @param last_ip_address - last IPv4 address
455  @param vrf_id - VRF id of tenant, ~0 means independent of VRF
456  @param is_add - true if add, false if delete
457  @param flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts
458 
459 */
460 autoreply define nat44_add_del_address_range {
463  vl_api_ip4_address_t first_ip_address;
464  vl_api_ip4_address_t last_ip_address;
466  bool is_add;
467  vl_api_nat_config_flags_t flags;
468 };
469 
470 /** \brief Dump NAT44 addresses
471  @param client_index - opaque cookie to identify the sender
472  @param context - sender context, to match reply w/ request
473 */
474 define nat44_address_dump {
477 };
478 
479 /** \brief NAT44 address details response
480  @param context - sender context, to match reply w/ request
481  @param ip_address - IPv4 address
482  @param flags - flag NAT_IS_TWICE_NAT if NAT address range for external hosts
483  @param vrf_id - VRF id of tenant, ~0 means independent of VRF
484 */
485 define nat44_address_details {
487  vl_api_ip4_address_t ip_address;
488  vl_api_nat_config_flags_t flags;
490 };
491 
492 /** \brief Enable/disable NAT44 feature on the interface
493  @param client_index - opaque cookie to identify the sender
494  @param context - sender context, to match reply w/ request
495  @param is_add - true if add, false if delete
496  @param flags - flag NAT_IS_INSIDE if interface is inside else
497  interface is outside
498  @param sw_if_index - software index of the interface
499 */
500 autoreply define nat44_interface_add_del_feature {
503  bool is_add;
504  vl_api_nat_config_flags_t flags;
505  vl_api_interface_index_t sw_if_index;
506 };
507 
508 /** \brief Dump interfaces with NAT44 feature
509  @param client_index - opaque cookie to identify the sender
510  @param context - sender context, to match reply w/ request
511 */
512 define nat44_interface_dump {
515 };
516 
517 /** \brief NAT44 interface details response
518  @param context - sender context, to match reply w/ request
519  @param sw_if_index - software index of the interface
520  @param flags - flag NAT_IS_INSIDE if interface is inside,
521  flag NAT_IS_OUTSIDE if interface is outside
522  and if both flags are set the interface is
523  both inside and outside
524 */
525 define nat44_interface_details {
527  vl_api_nat_config_flags_t flags;
528  vl_api_interface_index_t sw_if_index;
529 };
530 
531 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
532  in2out translation)
533  @param client_index - opaque cookie to identify the sender
534  @param context - sender context, to match reply w/ request
535  @param is_add - true if add, false if delete
536  @param flags - flag NAT_IS_INSIDE if interface is inside else
537  interface is outside
538  @param sw_if_index - software index of the interface
539 */
540 autoreply define nat44_interface_add_del_output_feature {
543  bool is_add;
544  vl_api_nat_config_flags_t flags;
545  vl_api_interface_index_t sw_if_index;
546 };
547 
548 /** \brief Dump interfaces with NAT44 output feature
549  @param client_index - opaque cookie to identify the sender
550  @param context - sender context, to match reply w/ request
551 */
552 define nat44_interface_output_feature_dump {
555 };
556 
557 /** \brief NAT44 interface with output feature details response
558  @param context - sender context, to match reply w/ request
559  @param flags - flag NAT_IS_INSIDE if interface is inside else
560  interface is outside
561  @param sw_if_index - software index of the interface
562 */
563 define nat44_interface_output_feature_details {
565  vl_api_nat_config_flags_t flags;
566  vl_api_interface_index_t sw_if_index;
567 };
568 
569 /** \brief Add/delete NAT44 static mapping
570  @param client_index - opaque cookie to identify the sender
571  @param context - sender context, to match reply w/ request
572  @param is_add - true if add, false if delete
573  @param flags - flag NAT_IS_ADDR_ONLY if address only mapping,
574  flag nat_is_twice_nat if nat address range for external hosts,
575  flag NAT_IS_SELF_TWICE_NAT if translate external host address
576  and port whenever external host address equals local
577  address of internal host,
578  flag NAT_IS_OUT2IN_ONLY if rule match only out2in direction
579  @param local_ip_address - local IPv4 address
580  @param external_ip_address - external IPv4 address
581  @param protocol - IP protocol, used only if addr_only=0
582  @param local_port - local port number, used only if addr_only=0
583  @param external_port - external port number, used only if addr_only=0
584  @param external_sw_if_index - external interface (if set
585  external_ip_address is ignored, ~0 means not
586  used)
587  @param vfr_id - VRF ID
588  @param tag - opaque string tag
589 */
590 autoreply define nat44_add_del_static_mapping {
593  bool is_add;
594  vl_api_nat_config_flags_t flags;
595  vl_api_ip4_address_t local_ip_address;
596  vl_api_ip4_address_t external_ip_address;
600  vl_api_interface_index_t external_sw_if_index;
602  string tag[64];
603 };
604 
605 /** \brief Dump NAT44 static mappings
606  @param client_index - opaque cookie to identify the sender
607  @param context - sender context, to match reply w/ request
608 */
609 define nat44_static_mapping_dump {
612 };
613 
614 /** \brief NAT44 static mapping details response
615  @param context - sender context, to match reply w/ request
616  @param flags - flag NAT_ADDR_ONLY if address only mapping,
617  flag NAT_TWICE_NAT if NAT address range for external hosts,
618  flag NAT_SELF_TWICE_NAT if translate external host address
619  and port whenever external host address equals local
620  address of internal host,
621  flag NAT_OUT2IN_ONLY if rule match only out2in direction
622  @param local_ip_address - local IPv4 address
623  @param external_ip_address - external IPv4 address
624  @param protocol - IP protocol, valid only if no NAT_ADDR_ONLY flag
625  @param local_port - local port number, valid only if no NAT_ADDR_ONLY flag
626  @param external_port - external port number, valid only if no NAT_ADDR_ONLY flag
627  @param external_sw_if_index - external interface
628  @param vfr_id - VRF ID
629  @param tag - opaque string tag
630 */
631 define nat44_static_mapping_details {
633  vl_api_nat_config_flags_t flags;
634  vl_api_ip4_address_t local_ip_address;
635  vl_api_ip4_address_t external_ip_address;
639  vl_api_interface_index_t external_sw_if_index;
641  string tag[64];
642 };
643 
644 /** \brief Add/delete NAT44 identity mapping
645  @param client_index - opaque cookie to identify the sender
646  @param context - sender context, to match reply w/ request
647  @param is_add - true if add, false if delete
648  @param flags - flag NAT_ADDR_ONLY if address only mapping
649  @param ip_address - IPv4 address
650  @param protocol - IP protocol
651  @param port - port number
652  @param sw_if_index - interface (if set ip_address is ignored, ~0 means not
653  used)
654  @param vfr_id - VRF ID (if ~0 use default VRF)
655  @param tag - opaque string tag
656 */
657 autoreply define nat44_add_del_identity_mapping {
660  bool is_add;
661  vl_api_nat_config_flags_t flags;
662  vl_api_ip4_address_t ip_address;
665  vl_api_interface_index_t sw_if_index;
667  string tag[64];
668 };
669 
670 /** \brief Dump NAT44 identity mappings
671  @param client_index - opaque cookie to identify the sender
672  @param context - sender context, to match reply w/ request
673 */
674 define nat44_identity_mapping_dump {
677 };
678 
679 /** \brief NAT44 identity mapping details response
680  @param context - sender context, to match reply w/ request
681  @param flags - flag NAT_ADDR_ONLY if address only mapping
682  @param ip_address - IPv4 address
683  @param protocol - IP protocol
684  @param port - port number
685  @param sw_if_index - interface
686  @param vfr_id - VRF ID
687  @param tag - opaque string tag
688 */
689 define nat44_identity_mapping_details {
691  vl_api_nat_config_flags_t flags;
692  vl_api_ip4_address_t ip_address;
695  vl_api_interface_index_t sw_if_index;
697  string tag[64];
698 };
699 
700 /** \brief Add/delete NAT44 pool address from specific interfce
701  @param client_index - opaque cookie to identify the sender
702  @param context - sender context, to match reply w/ request
703  @param is_add - true if add, false if delete
704  @param sw_if_index - software index of the interface
705  @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts
706 */
707 autoreply define nat44_add_del_interface_addr {
710  bool is_add;
711  vl_api_interface_index_t sw_if_index;
712  vl_api_nat_config_flags_t flags;
713 };
714 
715 /** \brief Dump NAT44 pool addresses interfaces
716  @param client_index - opaque cookie to identify the sender
717  @param context - sender context, to match reply w/ request
718 */
719 define nat44_interface_addr_dump {
722 };
723 
724 /** \brief NAT44 pool addresses interfaces details response
725  @param context - sender context, to match reply w/ request
726  @param sw_if_index - software index of the interface
727  @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts
728 
729 */
730 define nat44_interface_addr_details {
732  vl_api_interface_index_t sw_if_index;
733  vl_api_nat_config_flags_t flags;
734 };
735 
736 /** \brief Dump NAT44 users
737  @param client_index - opaque cookie to identify the sender
738  @param context - sender context, to match reply w/ request
739 */
740 define nat44_user_dump {
743 };
744 
745 /** \brief NAT44 users response
746  @param context - sender context, to match reply w/ request
747  @vrf_id - VRF ID
748  @param ip_address - IPv4 address
749  @param nsessions - number of dynamic sessions
750  @param nstaticsessions - number of static sessions
751 */
752 define nat44_user_details {
755  vl_api_ip4_address_t ip_address;
758 };
759 
760 /** \brief NAT44 user's sessions
761  @param client_index - opaque cookie to identify the sender
762  @param context - sender context, to match reply w/ request
763  @param ip_address - IPv4 address of the user to dump
764  @param vrf_id - VRF_ID
765 */
766 define nat44_user_session_dump {
769  vl_api_ip4_address_t ip_address;
771 };
772 
773 /** \brief NAT44 user's sessions response
774  @param context - sender context, to match reply w/ request
775  @param outside_ip_address - outside IPv4 address
776  @param outside_port - outside port
777  @param inside_ip_address - inside IPv4 address
778  @param inside_port - inside port
779  @param protocol - protocol
780  @param flags - flag NAT_IS_STATIC if session is static,
781  flag NAT_IS_TWICE_NAT if session is twice-nat,
782  flag NAT_IS_EXT_HOST_VALID if external host address
783  and port are valid
784  @param last_heard - last heard timer
785  @param total_bytes - count of bytes sent through session
786  @param total_pkts - count of pakets sent through session
787  @param ext_host_address - external host IPv4 address
788  @param ext_host_port - external host port
789  @param ext_host_nat_address - post-NAT external host IPv4 address (valid
790  only if twice-nat session)
791  @param ext_host_nat_port - post-NAT external host port (valid only if
792  twice-nat session)
793 */
794 define nat44_user_session_details {
796  vl_api_ip4_address_t outside_ip_address;
798  vl_api_ip4_address_t inside_ip_address;
801  vl_api_nat_config_flags_t flags;
805  vl_api_ip4_address_t ext_host_address;
807  vl_api_ip4_address_t ext_host_nat_address;
809 };
810 
811 /** \brief NAT44 load-balancing address and port pair
812  @param addr - IPv4 address of the internal node
813  @param port - L4 port number of the internal node
814  @param probability - probability of the internal node to be randomly matched
815  @param vrf_id - VRF id
816 */
818  vl_api_ip4_address_t addr;
822 };
823 
824 /** \brief Add/delete NAT44 load-balancing static mapping rule
825  @param client_index - opaque cookie to identify the sender
826  @param context - sender context, to match reply w/ request
827  @param is_add - true if add, false if delete
828  @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
829  flag NAT_SELF_TWICE_NAT if translate external host address
830  and port whenever external host address equals local
831  address of internal host,
832  flag NAT_OUT2IN_ONLY if rule match only out2in direction
833  @param external_addr - external IPv4 address of the service
834  @param external_port - external L4 port number of the service
835  @param protocol - IP protocol number of the service
836  @param affinity - if 0 disabled, otherwise client IP affinity sticky time
837  in seconds
838  @param local_num - number of local network nodes
839  @param locals - local network nodes
840  @param tag - opaque string tag
841 */
842 autoreply manual_endian define nat44_add_del_lb_static_mapping {
845  bool is_add;
846  vl_api_nat_config_flags_t flags;
847  vl_api_ip4_address_t external_addr;
851  string tag[64];
853  vl_api_nat44_lb_addr_port_t locals[local_num];
854 };
855 
856 /** \brief Add/delete NAT44 load-balancing static mapping rule backend
857  @param client_index - opaque cookie to identify the sender
858  @param context - sender context, to match reply w/ request
859  @param is_add - true if add, false if delete
860  @param external_addr - external IPv4 address of the service
861  @param external_port - external L4 port number of the service
862  @param protocol - IP protocol number of the service
863  @param local - local network node
864 */
868  bool is_add;
869  vl_api_ip4_address_t external_addr;
872  vl_api_nat44_lb_addr_port_t local;
873 };
874 
875 /** \brief Dump NAT44 load-balancing static mapping rules
876  @param client_index - opaque cookie to identify the sender
877  @param context - sender context, to match reply w/ request
878 */
879 define nat44_lb_static_mapping_dump {
882 };
883 
884 /** \brief NAT44 load-balancing static mapping rule details response
885  @param context - sender context, to match reply w/ request
886  @param external_addr - external IPv4 address of the service
887  @param external_port - external L4 port number of the service
888  @param protocol - IP protocol number of the service
889  @param flags - flag NAT_TWICE_NAT if NAT address range for external hosts,
890  flag NAT_SELF_TWICE_NAT if translate external host address
891  and port whenever external host address equals local
892  address of internal host,
893  flag NAT_OUT2IN_ONLY if rule match only out2in direction
894  @param affinity - if 0 disabled, otherwise client IP affinity sticky time
895  in seconds
896  @param local_num - number of local network nodes
897  @param locals - local network nodes
898  @param tag - opaque string tag
899 */
900 manual_endian define nat44_lb_static_mapping_details {
902  vl_api_ip4_address_t external_addr;
905  vl_api_nat_config_flags_t flags;
907  string tag[64];
909  vl_api_nat44_lb_addr_port_t locals[local_num];
910 };
911 
912 /** \brief Delete NAT44 session
913  @param client_index - opaque cookie to identify the sender
914  @param context - sender context, to match reply w/ request
915  @param ip_address - IPv4 address
916  @param protocol - IP protocol
917  @param port - port number
918  @param vfr_id - VRF ID
919  @param flags - flag NAT_IS_INSIDE if interface is inside or
920  interface is outside,
921  flag NAT_IS_EXT_HOST_VALID if external host address and
922  port are valid
923  @param ext_host_address - external host IPv4 address
924  @param ext_host_port - external host port
925 */
926 autoreply define nat44_del_session {
929  vl_api_ip4_address_t address;
933  vl_api_nat_config_flags_t flags;
934  vl_api_ip4_address_t ext_host_address;
936 };
937 
938 /** \brief Enable/disable forwarding for NAT44
939  Forward packets which don't match existing translation
940  or static mapping instead of dropping them.
941  @param client_index - opaque cookie to identify the sender
942  @param context - sender context, to match reply w/ request
943  @param enable - true for enable, false for disable
944 */
945 autoreply define nat44_forwarding_enable_disable {
948  bool enable;
949 };
950 
951 /** \brief Check if forwarding is enabled or disabled
952  @param client_index - opaque cookie to identify the sender
953  @param context - sender context, to match reply w/ request
954 */
955 define nat44_forwarding_is_enabled {
958 };
959 
960 /** \brief Response to check if forwarding is enabled or disabled
961  @param context - sender context, to match reply w/ request
962  @param enabled - true if enabled, false if disabled
963 */
964 define nat44_forwarding_is_enabled_reply {
966  bool enabled;
967 };
968 
969 
970 /*
971  * Deterministic NAT (CGN) APIs
972  */
973 
974 /** \brief Add/delete NAT deterministic mapping
975  @param client_index - opaque cookie to identify the sender
976  @param context - sender context, to match reply w/ request
977  @param is_add - true if add, false if delete
978  @param in_addr - inside IPv4 address
979  @param in_plen - inside IPv4 address prefix length
980  @param out_addr - outside IPv4 address
981  @param out_plen - outside IPv4 address prefix length
982 */
983 autoreply define nat_det_add_del_map {
986  bool is_add;
987  vl_api_ip4_address_t in_addr;
989  vl_api_ip4_address_t out_addr;
991 };
992 
993 /** \brief Get outside address and port range from inside address
994  @param client_index - opaque cookie to identify the sender
995  @param context - sender context, to match reply w/ request
996  @param in_addr - inside IP address
997 */
998 define nat_det_forward {
1001  vl_api_ip4_address_t in_addr;
1002 };
1003 
1004 /** \brief Get outside address and port range from inside address
1005  @param context - sender context, to match reply w/ request
1006  @param retval - return code
1007  @param out_port_lo - outside port range start
1008  @param out_port_hi - outside port range end
1009  @param out_addr - outside IPv4 address
1010 */
1011 define nat_det_forward_reply {
1016  vl_api_ip4_address_t out_addr;
1017 };
1018 
1019 /** \brief Get inside address from outside address and port
1020  @param client_index - opaque cookie to identify the sender
1021  @param context - sender context, to match reply w/ request
1022  @param out_port - outside port
1023  @param out_addr - outside IPv4 address
1024 */
1025 define nat_det_reverse {
1029  vl_api_ip4_address_t out_addr;
1030 };
1031 
1032 /** \brief Get inside address from outside address and port reply
1033  @param context - sender context, to match reply w/ request
1034  @param retval - return code
1035  @param in_addr - inside IP address
1036 */
1037 define nat_det_reverse_reply {
1040  vl_api_ip4_address_t in_addr;
1041 };
1042 
1043 /** \brief Dump NAT deterministic mappings
1044  @param client_index - opaque cookie to identify the sender
1045  @param context - sender context, to match reply w/ request
1046 */
1047 define nat_det_map_dump {
1050 };
1051 
1052 /** \brief NAT users response
1053  @param context - sender context, to match reply w/ request
1054  @param in_addr - inside IPv4 address
1055  @param in_plen - inside IPv4 address prefix length
1056  @param out_addr - outside IPv4 address
1057  @param out_plen - outside IPv4 address prefix length
1058  @param sharing_ratio - outside to inside address sharing ratio
1059  @param ports_per_host - number of ports available to a host
1060  @param ses_num - number of sessions belonging to this mapping
1061 */
1062 define nat_det_map_details {
1064  vl_api_ip4_address_t in_addr;
1066  vl_api_ip4_address_t out_addr;
1071 };
1072 
1073 /** \brief Close deterministic NAT session by outside address and port
1074  @param client_index - opaque cookie to identify the sender
1075  @param context - sender context, to match reply w/ request
1076  @param out_addr - outside IPv4 address
1077  @param out_port - outside port
1078  @param ext_addr - external host IPv4 address
1079  @param ext_port - external host port
1080 */
1081 autoreply define nat_det_close_session_out {
1084  vl_api_ip4_address_t out_addr;
1086  vl_api_ip4_address_t ext_addr;
1088 };
1089 
1090 /** \brief Close deterministic NAT session by inside address and port
1091  @param client_index - opaque cookie to identify the sender
1092  @param context - sender context, to match reply w/ request
1093  @param in_addr - inside IP address
1094  @param in_port - inside port
1095  @param ext_addr - external host IP address
1096  @param ext_port - external host port
1097 */
1098 autoreply define nat_det_close_session_in {
1101  vl_api_ip4_address_t in_addr;
1103  vl_api_ip4_address_t ext_addr;
1105 };
1106 
1107 /** \brief Dump determinstic NAT sessions
1108  @param client_index - opaque cookie to identify the sender
1109  @param context - sender context, to match reply w/ request
1110  @param user_addr - address of an inside user whose sessions to dump
1111 */
1112 define nat_det_session_dump {
1115  vl_api_ip4_address_t user_addr;
1116 };
1117 
1118 /** \brief Deterministic NAT sessions reply
1119  @param context - sender context, to match reply w/ request
1120  @param in_port - inside port
1121  @param ext_addr - external host IPv4 address
1122  @param ext_port - external host port
1123  @param out_port - outside NAT port
1124  @param state - session state
1125  @param expire - session expiration timestamp
1126 */
1127 define nat_det_session_details {
1130  vl_api_ip4_address_t ext_addr;
1135 };
1136 
1137 /*
1138  * NAT64 APIs
1139  */
1140 
1141 /** \brief Add/delete address range to NAT64 pool
1142  @param client_index - opaque cookie to identify the sender
1143  @param context - sender context, to match reply w/ request
1144  @param start_addr - start IPv4 address of the range
1145  @param end_addr - end IPv4 address of the range
1146  @param vrf_id - VRF id of tenant, ~0 means independent of VRF
1147  @param is_add - true if add, false if delete
1148 */
1149 autoreply define nat64_add_del_pool_addr_range {
1152  vl_api_ip4_address_t start_addr;
1153  vl_api_ip4_address_t end_addr;
1155  bool is_add;
1156 };
1157 
1158 /** \brief Dump NAT64 pool addresses
1159  @param client_index - opaque cookie to identify the sender
1160  @param context - sender context, to match reply w/ request
1161 */
1162 define nat64_pool_addr_dump {
1165 };
1166 
1167 /** \brief NAT64 pool address details response
1168  @param context - sender context, to match reply w/ request
1169  @param address - IPv4 address
1170  @param vfr_id - VRF id of tenant, ~0 means independent of VRF
1171 */
1172 define nat64_pool_addr_details {
1174  vl_api_ip4_address_t address;
1176 };
1177 
1178 /** \brief Enable/disable NAT64 feature on the interface
1179  @param client_index - opaque cookie to identify the sender
1180  @param context - sender context, to match reply w/ request
1181  @param is_add - true if add, false if delete
1182  @param flags - flag NAT_IS_INSIDE if interface is inside else
1183  interface is outside
1184  @param sw_if_index - index of the interface
1185 */
1186 autoreply define nat64_add_del_interface {
1189  bool is_add;
1190  vl_api_nat_config_flags_t flags;
1191  vl_api_interface_index_t sw_if_index;
1192 };
1193 
1194 /** \brief Dump interfaces with NAT64 feature
1195  @param client_index - opaque cookie to identify the sender
1196  @param context - sender context, to match reply w/ request
1197 */
1198 define nat64_interface_dump {
1201 };
1202 
1203 /** \brief NAT64 interface details response
1204  @param context - sender context, to match reply w/ request
1205  @param flags - flag NAT_IS_INSIDE if interface is inside,
1206  flag NAT_IS_OUTSIDE if interface is outside
1207  and if both flags are set the interface is
1208  both inside and outside
1209  @param sw_if_index - index of the interface
1210 */
1211 define nat64_interface_details {
1213  vl_api_nat_config_flags_t flags;
1214  vl_api_interface_index_t sw_if_index;
1215 };
1216 
1217 /** \brief Add/delete NAT64 static BIB entry
1218  @param client_index - opaque cookie to identify the sender
1219  @param context - sender context, to match reply w/ request
1220  @param i_addr - inside IPv6 address
1221  @param o_addr - outside IPv4 address
1222  @param i_port - inside port number
1223  @param o_port - outside port number
1224  @param vrf_id - VRF id of tenant
1225  @param proto - protocol number
1226  @param is_add - true if add, false if delete
1227 */
1228  autoreply define nat64_add_del_static_bib {
1231  vl_api_ip6_address_t i_addr;
1232  vl_api_ip4_address_t o_addr;
1237  bool is_add;
1238 };
1239 
1240 /** \brief Dump NAT64 BIB
1241  @param client_index - opaque cookie to identify the sender
1242  @param context - sender context, to match reply w/ request
1243  @param proto - protocol of the BIB: 255 - all BIBs
1244  6 - TCP BIB
1245  17 - UDP BIB
1246  1/58 - ICMP BIB
1247  otherwise - "unknown" protocol BIB
1248 */
1249 define nat64_bib_dump {
1253 };
1254 
1255 /** \brief NAT64 BIB details response
1256  @param context - sender context, to match reply w/ request
1257  @param i_addr - inside IPv6 address
1258  @param o_addr - outside IPv4 address
1259  @param i_port - inside port number
1260  @param o_port - outside port number
1261  @param vrf_id - VRF id of tenant
1262  @param proto - protocol number
1263  @param flags - flag NAT_IS_STATIC if BIB entry is static
1264  or BIB entry is dynamic
1265  @param ses_num - number of sessions associated with the BIB entry
1266 */
1267 define nat64_bib_details {
1269  vl_api_ip6_address_t i_addr;
1270  vl_api_ip4_address_t o_addr;
1275  vl_api_nat_config_flags_t flags;
1277 };
1278 
1279 /** \brief Dump NAT64 session table
1280  @param client_index - opaque cookie to identify the sender
1281  @param context - sender context, to match reply w/ request
1282  @param proto - protocol of the session table: 255 - all STs
1283  6 - TCP ST
1284  17 - UDP ST
1285  1/58 - ICMP ST
1286  otherwise - "unknown" proto ST
1287 */
1288 define nat64_st_dump {
1292 };
1293 
1294 /** \brief NAT64 session table details response
1295  @param context - sender context, to match reply w/ request
1296  @param il_addr - inside IPv6 address of the local host
1297  @param ol_addr - outside IPv4 address of the local host
1298  @param il_port - inside port number id of the local host/inside ICMP id
1299  @param ol_port - outside port number of the local host/outside ICMP id
1300  @param ir_addr - inside IPv6 address of the remote host
1301  @param or_addr - outside IPv4 address of the remote host
1302  @param r_port - port number of the remote host (not used for ICMP)
1303  @param vrf_id - VRF id of tenant
1304  @param proto - protocol number
1305 */
1306 define nat64_st_details {
1308  vl_api_ip6_address_t il_addr;
1309  vl_api_ip4_address_t ol_addr;
1312  vl_api_ip6_address_t ir_addr;
1313  vl_api_ip4_address_t or_addr;
1317 };
1318 
1319 /** \brief Add/del NAT64 prefix
1320  @param client_index - opaque cookie to identify the sender
1321  @param context - sender context, to match reply w/ request
1322  @param prefix - NAT64 prefix
1323  @param vrf_id - VRF id of tenant
1324  @param is_add - true if add, false if delete
1325 */
1326 autoreply define nat64_add_del_prefix {
1329  vl_api_ip6_prefix_t prefix;
1331  bool is_add;
1332 };
1333 
1334 /** \brief Dump NAT64 prefix
1335  @param client_index - opaque cookie to identify the sender
1336  @param context - sender context, to match reply w/ request
1337 */
1338 define nat64_prefix_dump {
1341 };
1342 
1343 /** \brief Dump NAT64 prefix details response
1344  @param context - sender context, to match reply w/ request
1345  @param prefix - NAT64 prefix
1346  @param vrf_id - VRF id of tenant
1347 */
1348 define nat64_prefix_details {
1350  vl_api_ip6_prefix_t prefix;
1352 };
1353 
1354 /** \brief Add/delete NAT64 pool address from specific interfce
1355  @param client_index - opaque cookie to identify the sender
1356  @param context - sender context, to match reply w/ request
1357  @param is_add - true if add, false if delete
1358  @param sw_if_index - software index of the interface
1359 */
1360 autoreply define nat64_add_del_interface_addr {
1363  bool is_add;
1364  vl_api_interface_index_t sw_if_index;
1365 };
1366 
1367 /*
1368  * DS-Lite APIs
1369  */
1370 
1371 /** \brief Add/delete address range to DS-Lite pool
1372  @param client_index - opaque cookie to identify the sender
1373  @param context - sender context, to match reply w/ request
1374  @param start_addr - start IPv4 address of the range
1375  @param end_addr - end IPv4 address of the range
1376  @param is_add - true if add, false if delete
1377 */
1378 autoreply define dslite_add_del_pool_addr_range {
1381  vl_api_ip4_address_t start_addr;
1382  vl_api_ip4_address_t end_addr;
1383  bool is_add;
1384 };
1385 
1386 /** \brief Dump DS-Lite addresses
1387  @param client_index - opaque cookie to identify the sender
1388  @param context - sender context, to match reply w/ request
1389 */
1390 define dslite_address_dump {
1393 };
1394 
1395 /** \brief DS-Lite address details response
1396  @param context - sender context, to match reply w/ request
1397  @param ip_address - IPv4 address
1398 */
1399 define dslite_address_details {
1401  vl_api_ip4_address_t ip_address;
1402 };
1403 
1404 /** \brief Set AFTR IPv6 and IPv4 addresses
1405  @param client_index - opaque cookie to identify the sender
1406  @param context - sender context, to match reply w/ request
1407  @param ip4_addr - IPv4 address
1408  @param ip6_addr - IPv6 address
1409 */
1410 autoreply define dslite_set_aftr_addr {
1413  vl_api_ip4_address_t ip4_addr;
1414  vl_api_ip6_address_t ip6_addr;
1415 };
1416 
1417 /** \brief Get AFTR IPv6 and IPv4 addresses
1418  @param client_index - opaque cookie to identify the sender
1419  @param context - sender context, to match reply w/ request
1420 */
1421 define dslite_get_aftr_addr {
1424 };
1425 
1426 /** \brief Response to get AFTR IPv6 and IPv4 addresses
1427  @param context - sender context, to match reply w/ request
1428  @param retval - return code
1429  @param ip4_addr - IPv4 address
1430  @param ip6_addr - IPv6 address
1431 */
1432 define dslite_get_aftr_addr_reply {
1435  vl_api_ip4_address_t ip4_addr;
1436  vl_api_ip6_address_t ip6_addr;
1437 };
1438 
1439 /** \brief Set B4 IPv6 and IPv4 addresses
1440  @param client_index - opaque cookie to identify the sender
1441  @param context - sender context, to match reply w/ request
1442  @param ip4_addr - IPv4 address
1443  @param ip6_addr - IPv6 address
1444 */
1445 autoreply define dslite_set_b4_addr {
1448  vl_api_ip4_address_t ip4_addr;
1449  vl_api_ip6_address_t ip6_addr;
1450 };
1451 
1452 /** \brief Get B4 IPv6 and IPv4 addresses
1453  @param client_index - opaque cookie to identify the sender
1454  @param context - sender context, to match reply w/ request
1455 */
1456 define dslite_get_b4_addr {
1459 };
1460 
1461 /** \brief Response to get B4 IPv6 and IPv4 addresses
1462  @param context - sender context, to match reply w/ request
1463  @param retval - return code
1464  @param ip4_addr - IPv4 address
1465  @param ip6_addr - IPv6 address
1466 */
1467 define dslite_get_b4_addr_reply {
1470  vl_api_ip4_address_t ip4_addr;
1471  vl_api_ip6_address_t ip6_addr;
1472 };
1473 
1474 /*
1475  * NAT66 APIs
1476  */
1477 /** \brief Enable/disable NAT66 feature on the interface
1478  @param client_index - opaque cookie to identify the sender
1479  @param context - sender context, to match reply w/ request
1480  @param is_add - true if add, false if delete
1481  @param flags - flag NAT_IS_INSIDE if interface is inside or
1482  interface is outside,
1483  @param sw_if_index - software index of the interface
1484 */
1485 autoreply define nat66_add_del_interface {
1488  bool is_add;
1489  vl_api_nat_config_flags_t flags;
1490  vl_api_interface_index_t sw_if_index;
1491 };
1492 
1493 /** \brief Dump interfaces with NAT66 feature
1494  @param client_index - opaque cookie to identify the sender
1495  @param context - sender context, to match reply w/ request
1496 */
1497 define nat66_interface_dump {
1500 };
1501 
1502 /** \brief NAT66 interface details response
1503  @param context - sender context, to match reply w/ request
1504  @param flags - flag NAT_IS_INSIDE if interface is inside or
1505  interface is outside,
1506  @param sw_if_index - software index of the interface
1507 */
1508 define nat66_interface_details {
1510  vl_api_nat_config_flags_t flags;
1511  vl_api_interface_index_t sw_if_index;
1512 };
1513 
1514 /** \brief Add/delete 1:1 NAT66
1515  @param client_index - opaque cookie to identify the sender
1516  @param context - sender context, to match reply w/ request
1517  @param is_add - true if add, false if delete
1518  @param local_ip_address - local IPv6 address
1519  @param external_ip_address - external IPv6 address
1520  @param vrf_id - VRF id of tenant
1521 */
1522 autoreply define nat66_add_del_static_mapping {
1525  bool is_add;
1526  vl_api_ip6_address_t local_ip_address;
1527  vl_api_ip6_address_t external_ip_address;
1529 };
1530 
1531 /** \brief Dump NAT66 static mappings
1532  @param client_index - opaque cookie to identify the sender
1533  @param context - sender context, to match reply w/ request
1534 */
1535 define nat66_static_mapping_dump {
1538 };
1539 
1540 /** \brief NAT66 static mapping details response
1541  @param context - sender context, to match reply w/ request
1542  @param local_ip_address - local IPv6 address
1543  @param external_ip_address - external IPv6 address
1544  @param vrf_id - VRF id of tenant
1545  @param total_bytes - count of bytes sent through static mapping
1546  @param total_pkts - count of pakets sent through static mapping
1547 */
1548 define nat66_static_mapping_details {
1550  vl_api_ip6_address_t local_ip_address;
1551  vl_api_ip6_address_t external_ip_address;
1555 };
vl_api_ip4_address_t ext_host_address
Definition: nat.api:805
vl_api_ip4_address_t ext_addr
Definition: nat.api:1103
vl_api_interface_index_t sw_if_index
Definition: nat.api:711
vl_api_ip4_address_t out_addr
Definition: nat.api:1016
vl_api_nat_config_flags_t flags
Definition: nat.api:1510
vl_api_ip4_address_t external_addr
Definition: nat.api:902
vl_api_interface_index_t external_sw_if_index
Definition: nat.api:600
vl_api_interface_index_t sw_if_index
Definition: nat.api:505
vl_api_ip4_address_t external_addr
Definition: nat.api:847
vl_api_ip4_address_t out_addr
Definition: nat.api:989
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:418
vl_api_ip4_address_t ip4_addr
Definition: nat.api:1448
vl_api_nat_config_flags_t flags
Definition: nat.api:661
vl_api_nat_config_flags_t flags
Definition: nat.api:1275
vl_api_nat_config_flags_t flags
Definition: nat.api:527
vl_api_ip6_address_t external_ip_address
Definition: nat.api:1551
vl_api_ip4_address_t local_ip_address
Definition: nat.api:595
vl_api_ip4_address_t ip_address
Definition: nat.api:400
vl_api_ip6_prefix_t prefix
Definition: nat.api:1350
vl_api_nat_config_flags_t flags
Definition: nat.api:504
vl_api_ip4_address_t first_ip_address
Definition: nat.api:463
vl_api_ip4_address_t or_addr
Definition: nat.api:1313
vl_api_ip4_address_t ip_address
Definition: nat.api:692
vhost_vring_addr_t addr
Definition: vhost_user.h:147
vl_api_ip4_address_t start_addr
Definition: nat.api:1381
vl_api_nat_config_flags_t flags
Definition: nat.api:733
unsigned char u8
Definition: types.h:56
vl_api_ip4_address_t out_addr
Definition: nat.api:1029
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:1185
nat_log_level
Definition: nat.api:123
vl_api_ip4_address_t ip4_addr
Definition: nat.api:1470
vl_api_interface_index_t sw_if_index
Definition: nat.api:1364
vl_api_nat_config_flags_t flags
Definition: nat.api:1190
vl_api_ip6_address_t ir_addr
Definition: nat.api:1312
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:1232
vl_api_nat_config_flags_t flags
Definition: nat.api:691
u8 probability
Definition: nat.api:820
vl_api_ip6_address_t i_addr
Definition: nat.api:1231
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:769
vl_api_ip6_address_t local_ip_address
Definition: nat.api:1526
vl_api_ip4_address_t ext_addr
Definition: nat.api:1130
vl_api_nat_config_flags_t flags
Definition: nat.api:933
vl_api_nat_config_flags_t flags
Definition: nat.api:801
vl_api_nat_config_flags_t flags
Definition: nat.api:467
service
Definition: nat.api:442
vl_api_nat_config_flags_t flags
Definition: nat.api:846
vl_api_nat_config_flags_t flags
Definition: nat.api:633
vl_api_nat_config_flags_t flags
Definition: nat.api:905
unsigned short u16
Definition: types.h:57
vl_api_ip4_address_t external_ip_address
Definition: nat.api:635
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:1269
vl_api_ip4_address_t ext_host_nat_address
Definition: nat.api:807
vl_api_ip4_address_t outside_ip_address
Definition: nat.api:796
vl_api_ip4_address_t address
Definition: nat.api:929
vl_api_ip4_address_t in_addr
Definition: nat.api:1101
vl_api_ip6_address_t il_addr
Definition: nat.api:1308
vl_api_ip6_address_t external_ip_address
Definition: nat.api:1527
vl_api_ip4_address_t last_ip_address
Definition: nat.api:464
vl_api_interface_index_t sw_if_index
Definition: nat.api:1214
vl_api_ip4_address_t ip_address
Definition: nat.api:487
vl_api_ip4_address_t ext_addr
Definition: nat.api:1086
vl_api_interface_index_t sw_if_index
Definition: nat.api:1490
vl_api_ip4_address_t ip4_addr
Definition: nat.api:1413
vl_api_ip4_address_t ip_address
Definition: nat.api:335
vl_api_ip4_address_t ip_address
Definition: nat.api:1401
int nat64_add_del_prefix(ip6_address_t *prefix, u8 plen, u32 vrf_id, u8 is_add)
Add/delete NAT64 prefix.
Definition: nat64.c:980
u16 port
Definition: nat.api:819
vl_api_ip4_address_t out_addr
Definition: nat.api:1084
vl_api_ip4_address_t ol_addr
Definition: nat.api:1309
vl_api_nat_config_flags_t flags
Definition: nat.api:712
vl_api_ip6_address_t ip6_addr
Definition: nat.api:1449
vl_api_nat_config_flags_t flags
Definition: nat.api:1489
vl_api_ip4_address_t ext_host_address
Definition: nat.api:934
string name[64]
Definition: ip.api:44
vl_api_ip4_address_t in_addr
Definition: nat.api:1001
vl_api_ip4_address_t end_addr
Definition: nat.api:1382
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:1436
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:1471
vl_api_ip4_address_t in_addr
Definition: nat.api:1064
vl_api_ip6_address_t ip6_addr
Definition: nat.api:1414
typedef nat44_lb_addr_port
NAT44 load-balancing address and port pair.
Definition: nat.api:817
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:4228
vl_api_ip4_address_t ip4_addr
Definition: nat.api:1435
vl_api_ip4_address_t o_addr
Definition: nat.api:1270
vl_api_nat_config_flags_t flags
Definition: nat.api:594
vl_api_interface_index_t sw_if_index
Definition: nat.api:695
vl_api_ip4_address_t start_addr
Definition: nat.api:1152
vl_api_interface_index_t external_sw_if_index
Definition: nat.api:639
vl_api_interface_index_t sw_if_index
Definition: nat.api:528
vl_api_interface_index_t sw_if_index
Definition: nat.api:1191
vl_api_interface_index_t sw_if_index
Definition: nat.api:1511
vl_api_ip4_address_t ip_address
Definition: nat.api:662
vl_api_interface_index_t sw_if_index
Definition: nat.api:732
vl_api_ip4_address_t ip_address
Definition: nat.api:755
vl_api_ip4_address_t end_addr
Definition: nat.api:1153
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:351
vl_api_interface_index_t sw_if_index
Definition: nat.api:665
vl_api_ip4_address_t external_ip_address
Definition: nat.api:596
vl_api_ip4_address_t inside_ip_address
Definition: nat.api:798
vl_api_ip6_prefix_t prefix
Definition: nat.api:1329
vl_api_ip4_address_t address
Definition: nat.api:1174
vl_api_nat_config_flags_t flags
Definition: nat.api:488
u32 vrf_id
Definition: nat.api:821
vl_api_ip4_address_t local_ip_address
Definition: nat.api:634
vl_api_ip4_address_t user_addr
Definition: nat.api:1115
vl_api_ip4_address_t in_addr
Definition: nat.api:1040
vl_api_nat_log_level_t log_level
Definition: nat.api:141
vl_api_interface_index_t sw_if_index
Definition: nat.api:566
vl_api_interface_index_t sw_if_index
Definition: nat.api:545
vl_api_ip4_address_t in_addr
Definition: nat.api:987
vl_api_ip4_address_t out_addr
Definition: nat.api:1066
vl_api_nat44_lb_addr_port_t local
Definition: nat.api:872
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:1462
vl_api_ip6_address_t local_ip_address
Definition: nat.api:1550
vl_api_nat_config_flags_t flags
Definition: nat.api:1213
vl_api_ip4_address_t ip_address
Definition: nat.api:375