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:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 option version = "2.5.0";
20 * @brief VPP control-plane API messages.
22 * This file defines VPP control-plane API messages which are generally
23 * called through a shared memory interface.
27 * Common NAT plugin APIs
30 /** \brief Control ping from client to api server request
31 @param client_index - opaque cookie to identify the sender
32 @param context - sender context, to match reply w/ request
34 define nat_control_ping
40 /** \brief Control ping from the client to the server response
41 @param client_index - opaque cookie to identify the sender
42 @param context - sender context, to match reply w/ request
43 @param retval - return code for the request
44 @param vpe_pid - the pid of the vpe, returned by the server
46 define nat_control_ping_reply
54 /** \brief Show NAT plugin startup config
55 @param client_index - opaque cookie to identify the sender
56 @param context - sender context, to match reply w/ request
58 define nat_show_config
64 /** \brief Show NAT plugin startup config reply
65 @param context - sender context, to match reply w/ request
66 @param retval - return code for the request
67 @param static_mapping_only - if 1 dynamic translations disabled
68 @param static_mapping_connection_tracking - if 1 create session data
69 @param deterministic - if 1 deterministic mapping
70 @param translation_buckets - number of translation hash buckets
71 @param translation_memory_size - translation hash memory size
72 @param user_buckets - number of user hash buckets
73 @param user_memory_size - user hash memory size
74 @param max_translations_per_user - maximum number of translations per user
75 @param outside_vrf_id - outside VRF id
76 @param inside_vrf_id - default inside VRF id
78 define nat_show_config_reply
82 u8 static_mapping_only;
83 u8 static_mapping_connection_tracking;
85 u32 translation_buckets;
86 u32 translation_memory_size;
89 u32 max_translations_per_user;
94 /** \brief Set NAT workers
95 @param client_index - opaque cookie to identify the sender
96 @param context - sender context, to match reply w/ request
97 @param worker_mask - NAT workers mask
99 autoreply define nat_set_workers {
105 /** \brief Dump NAT workers
106 @param client_index - opaque cookie to identify the sender
107 @param context - sender context, to match reply w/ request
109 define nat_worker_dump {
114 /** \brief NAT workers details response
115 @param context - sender context, to match reply w/ request
116 @param worker_index - worker index
117 @param lcore_id - lcore ID
118 @param name - worker name
120 define nat_worker_details {
127 /** \brief Enable/disable NAT IPFIX logging
128 @param client_index - opaque cookie to identify the sender
129 @param context - sender context, to match reply w/ request
130 @param domain_id - observation domain ID
131 @param src_port - source port number
132 @param enable - 1 if enable, 0 if disable
134 autoreply define nat_ipfix_enable_disable {
142 /** \brief Set NAT virtual fragmentation reassembly
143 @param client_index - opaque cookie to identify the sender
144 @param context - sender context, to match reply w/ request
145 @param timeout - reassembly timeout
146 @param max_reass - maximum number of concurrent reassemblies
147 @param max_frag - maximum number of fragmets per reassembly
148 @param drop_frag - if 0 translate fragments, otherwise drop fragments
149 @param is_ip6 - 1 if IPv6, 0 if IPv4
151 autoreply define nat_set_reass {
161 /** \brief Get NAT virtual fragmentation reassembly configuration
162 @param client_index - opaque cookie to identify the sender
163 @param context - sender context, to match reply w/ request
165 define nat_get_reass {
170 /** \brief Get NAT virtual fragmentation reassembly configuration reply
171 @param context - sender context, to match reply w/ request
172 @param retval - return code
173 @param ip4_timeout - reassembly timeout
174 @param ip4_max_reass - maximum number of concurrent reassemblies
175 @param ip4_max_frag - maximum number of fragmets per reassembly
176 @param ip4_drop_frag - if 0 translate fragments, otherwise drop fragments
177 @param ip6_timeout - reassembly timeout
178 @param ip6_max_reass - maximum number of concurrent reassemblies
179 @param ip6_max_frag - maximum number of fragmets per reassembly
180 @param ip6_drop_frag - if 0 translate fragments, otherwise drop fragments
182 define nat_get_reass_reply {
195 /** \brief Dump NAT virtual fragmentation reassemblies
196 @param client_index - opaque cookie to identify the sender
197 @param context - sender context, to match reply w/ request
199 define nat_reass_dump {
204 /** \brief NAT virtual fragmentation reassemblies response
205 @param context - sender context, to match reply w/ request
206 @param is_ip4 - 1 if address type is IPv4
207 @param src_addr - source IP address
208 @param dst_addr - destination IP address
209 @param frag_id - fragment ID
210 @param proto - protocol
211 @param frag_n - number of cached fragments
213 define nat_reass_details {
227 /** \brief Add/del NAT44 address range
228 @param client_index - opaque cookie to identify the sender
229 @param context - sender context, to match reply w/ request
230 @param first_ip_address - first IPv4 address
231 @param last_ip_address - last IPv4 address
232 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
233 @param twice_nat - twice NAT address range for extenal hosts
234 @param is_add - 1 if add, 0 if delete
236 autoreply define nat44_add_del_address_range {
239 u8 first_ip_address[4];
240 u8 last_ip_address[4];
246 /** \brief Dump NAT44 addresses
247 @param client_index - opaque cookie to identify the sender
248 @param context - sender context, to match reply w/ request
250 define nat44_address_dump {
255 /** \brief NAT44 address details response
256 @param context - sender context, to match reply w/ request
257 @param ip_address - IPv4 address
258 @param twice_nat - twice NAT address range for extenal hosts
259 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
261 define nat44_address_details {
268 /** \brief Enable/disable NAT44 feature on the interface
269 @param client_index - opaque cookie to identify the sender
270 @param context - sender context, to match reply w/ request
271 @param is_add - 1 if add, 0 if delete
272 @param is_inside - 1 if inside, 0 if outside
273 @param sw_if_index - software index of the interface
275 autoreply define nat44_interface_add_del_feature {
283 /** \brief Dump interfaces with NAT44 feature
284 @param client_index - opaque cookie to identify the sender
285 @param context - sender context, to match reply w/ request
287 define nat44_interface_dump {
292 /** \brief NAT44 interface details response
293 @param context - sender context, to match reply w/ request
294 @param is_inside - 1 if inside, 0 if outside, 2 if inside and outside
295 @param sw_if_index - software index of the interface
297 define nat44_interface_details {
303 /** \brief Enable/disbale NAT44 as an interface output feature (postrouting
305 @param client_index - opaque cookie to identify the sender
306 @param context - sender context, to match reply w/ request
307 @param is_add - 1 if add, 0 if delete
308 @param is_inside - 1 if inside, 0 if outside
309 @param sw_if_index - software index of the interface
311 autoreply define nat44_interface_add_del_output_feature {
319 /** \brief Dump interfaces with NAT44 output feature
320 @param client_index - opaque cookie to identify the sender
321 @param context - sender context, to match reply w/ request
323 define nat44_interface_output_feature_dump {
328 /** \brief NAT44 interface with output feature details response
329 @param context - sender context, to match reply w/ request
330 @param is_inside - 1 if inside, 0 if outside
331 @param sw_if_index - software index of the interface
333 define nat44_interface_output_feature_details {
339 /** \brief Add/delete NAT44 static mapping
340 @param client_index - opaque cookie to identify the sender
341 @param context - sender context, to match reply w/ request
342 @param is_add - 1 if add, 0 if delete
343 @param addr_only - 1 if address only mapping
344 @param local_ip_address - local IPv4 address
345 @param external_ip_address - external IPv4 address
346 @param protocol - IP protocol, used only if addr_only=0
347 @param local_port - local port number, used only if addr_only=0
348 @param external_port - external port number, used only if addr_only=0
349 @param external_sw_if_index - external interface (if set
350 external_ip_address is ignored, ~0 means not
352 @param vfr_id - VRF ID
353 @param twice_nat - if 1 translate external host address and port, only for
354 1:1 NAPT (addr_only must be 0)
355 @param self_twice_nat - if 1 translate external host address and port
356 whenever external host address equals
357 local address of internal host
358 @param out2in_only - if 1 rule match only out2in direction
359 @param tag - opaque string tag
361 autoreply define nat44_add_del_static_mapping {
366 u8 local_ip_address[4];
367 u8 external_ip_address[4];
371 u32 external_sw_if_index;
379 /** \brief Dump NAT44 static mappings
380 @param client_index - opaque cookie to identify the sender
381 @param context - sender context, to match reply w/ request
383 define nat44_static_mapping_dump {
388 /** \brief NAT44 static mapping details response
389 @param context - sender context, to match reply w/ request
390 @param addr_only - 1 if address only mapping
391 @param local_ip_address - local IPv4 address
392 @param external_ip_address - external IPv4 address
393 @param protocol - IP protocol, valid only if addr_only=0
394 @param local_port - local port number, valid only if addr_only=0
395 @param external_port - external port number, valid only if addr_only=0
396 @param external_sw_if_index - external interface
397 @param vfr_id - VRF ID
398 @param twice_nat - if 1 translate external host address and port
399 @param self_twice_nat - if 1 translate external host address and port
400 whenever external host address equals
401 local address of internal host
402 @param out2in_only - if 1 rule match only out2in direction
403 @param tag - opaque string tag
405 define nat44_static_mapping_details {
408 u8 local_ip_address[4];
409 u8 external_ip_address[4];
413 u32 external_sw_if_index;
421 /** \brief Add/delete NAT44 identity mapping
422 @param client_index - opaque cookie to identify the sender
423 @param context - sender context, to match reply w/ request
424 @param is_add - 1 if add, 0 if delete
425 @param addr_only - 1 if address only mapping
426 @param ip_address - IPv4 address
427 @param protocol - IP protocol
428 @param port - port number
429 @param sw_if_index - interface (if set ip_address is ignored, ~0 means not
431 @param vfr_id - VRF ID (if ~0 use default VRF)
432 @param tag - opaque string tag
434 autoreply define nat44_add_del_identity_mapping {
447 /** \brief Dump NAT44 identity mappings
448 @param client_index - opaque cookie to identify the sender
449 @param context - sender context, to match reply w/ request
451 define nat44_identity_mapping_dump {
456 /** \brief NAT44 identity mapping details response
457 @param context - sender context, to match reply w/ request
458 @param addr_only - 1 if address only mapping
459 @param ip_address - IPv4 address
460 @param protocol - IP protocol
461 @param port - port number
462 @param sw_if_index - interface
463 @param vfr_id - VRF ID
464 @param tag - opaque string tag
466 define nat44_identity_mapping_details {
477 /** \brief Add/delete NAT44 pool address from specific interfce
478 @param client_index - opaque cookie to identify the sender
479 @param context - sender context, to match reply w/ request
480 @param is_add - 1 if add, 0 if delete
481 @param twice_nat - twice NAT address for extenal hosts
482 @param sw_if_index - software index of the interface
484 autoreply define nat44_add_del_interface_addr {
492 /** \brief Dump NAT44 pool addresses interfaces
493 @param client_index - opaque cookie to identify the sender
494 @param context - sender context, to match reply w/ request
496 define nat44_interface_addr_dump {
501 /** \brief NAT44 pool addresses interfaces details response
502 @param context - sender context, to match reply w/ request
503 @param sw_if_index - software index of the interface
504 @param twice_nat - twice NAT address for extenal hosts
506 define nat44_interface_addr_details {
512 /** \brief Dump NAT44 users
513 @param client_index - opaque cookie to identify the sender
514 @param context - sender context, to match reply w/ request
516 define nat44_user_dump {
521 /** \brief NAT44 users response
522 @param context - sender context, to match reply w/ request
524 @param ip_adress - IPv4 address
525 @param nsessions - number of dynamic sessions
526 @param nstaticsessions - number of static sessions
528 define nat44_user_details {
536 /** \brief NAT44 user's sessions
537 @param client_index - opaque cookie to identify the sender
538 @param context - sender context, to match reply w/ request
539 @param is_ip4 - 1 if address type is IPv4
540 @param user_ip - IP address of the user to dump
541 @param vrf_id - VRF_ID
543 define nat44_user_session_dump {
550 /** \brief NAT44 user's sessions response
551 @param context - sender context, to match reply w/ request
552 @param outside_ip_address - outside IPv4 address
553 @param outside_port - outside port
554 @param inside_ip_address - inside IPv4 address
555 @param inside_port - inside port
556 @param protocol - protocol
557 @param is_static - 1 if session is static
558 @param last_heard - last heard timer
559 @param total_bytes - count of bytes sent through session
560 @param total_pkts - count of pakets sent through session
561 @param is_closed - 1 if TCP session is closed
563 define nat44_user_session_details {
565 u8 outside_ip_address[4];
567 u8 inside_ip_address[4];
577 /** \brief NAT44 load-balancing address and port pair
578 @param addr - IPv4 address of the internal node
579 @param port - L4 port number of the internal node
580 @param probability - probability of the internal node to be randomly matched
582 typeonly manual_endian define nat44_lb_addr_port {
588 /** \brief Add/delete NAT44 load-balancing static mapping rule
589 @param client_index - opaque cookie to identify the sender
590 @param context - sender context, to match reply w/ request
591 @param is_add - 1 if add, 0 if delete
592 @param external_addr - external IPv4 address of the service
593 @param external_port - external L4 port number of the service
594 @param protocol - IP protocol number of the service
595 @param vrf_id - internal network VRF ID
596 @param twice_nat - if 1 translate external host address and port
597 @param self_twice_nat - if 1 translate external host address and port
598 whenever external host address equals
599 local address of internal host
600 @param out2in_only - if 1 rule match only out2in direction
601 @param tag - opaque string tag
602 @param local_num - number of local network nodes
603 @param locals - local network nodes
605 autoreply manual_endian define nat44_add_del_lb_static_mapping {
618 vl_api_nat44_lb_addr_port_t locals[local_num];
621 /** \brief Dump NAT44 load-balancing static mapping rules
622 @param client_index - opaque cookie to identify the sender
623 @param context - sender context, to match reply w/ request
625 define nat44_lb_static_mapping_dump {
630 /** \brief NAT44 load-balancing static mapping rule details response
631 @param context - sender context, to match reply w/ request
632 @param is_add - 1 if add, 0 if delete
633 @param external_addr - external IPv4 address of the service
634 @param external_port - external L4 port number of the service
635 @param protocol - IP protocol number of the service
636 @param vrf_id - internal network VRF ID
637 @param twice_nat - if 1 translate external host address and port
638 @param self_twice_nat - if 1 translate external host address and port
639 whenever external host address equals
640 local address of internal host
641 @param out2in_only - if 1 rule match only out2in direction
642 @param tag - opaque string tag
643 @param local_num - number of local network nodes
644 @param locals - local network nodes
646 manual_endian define nat44_lb_static_mapping_details {
657 vl_api_nat44_lb_addr_port_t locals[local_num];
660 /** \brief Delete NAT44 session
661 @param client_index - opaque cookie to identify the sender
662 @param context - sender context, to match reply w/ request
663 @param is_in - 1 if inside network addres and port pari, 0 if outside
664 @param ip_address - IPv4 address
665 @param protocol - IP protocol
666 @param port - port number
667 @param vfr_id - VRF ID
669 autoreply define nat44_del_session {
679 /** \brief Enable/disable forwarding for NAT44
680 Forward packets which don't match existing translation
681 or static mapping instead of dropping them.
682 @param client_index - opaque cookie to identify the sender
683 @param context - sender context, to match reply w/ request
684 @param enable - 0 for enable, 1 for disable
686 autoreply define nat44_forwarding_enable_disable {
692 /** \brief Check if forwarding is enabled or disabled
693 @param client_index - opaque cookie to identify the sender
694 @param context - sender context, to match reply w/ request
696 define nat44_forwarding_is_enabled {
701 /** \brief Response to check if forwarding is enabled or disabled
702 @param context - sender context, to match reply w/ request
703 @param enabled - 1 if enabled, 0 if disabled
705 define nat44_forwarding_is_enabled_reply {
712 * Deterministic NAT (CGN) APIs
715 /** \brief Add/delete NAT deterministic mapping
716 @param client_index - opaque cookie to identify the sender
717 @param context - sender context, to match reply w/ request
718 @param is_add - 1 if add, 0 if delete
719 @param is_nat44 - 1 if NAT44
720 @param in_addr - inside IP address
721 @param in_plen - inside IP address prefix length
722 @param out_addr - outside IPv4 address
723 @param out_addr - outside IPv4 address prefix length
725 autoreply define nat_det_add_del_map {
737 /** \brief Get outside address and port range from inside address
738 @param client_index - opaque cookie to identify the sender
739 @param context - sender context, to match reply w/ request
740 @param is_nat44 - 1 if NAT44
741 @param in_addr - inside IP address
743 define nat_det_forward {
750 /** \brief Get outside address and port range from inside address
751 @param context - sender context, to match reply w/ request
752 @param retval - return code
753 @param out_port_lo - outside port range start
754 @param out_port_hi - outside port range end
755 @param out_addr - outside IPv4 address
757 define nat_det_forward_reply {
765 /** \brief Get inside address from outside address and port
766 @param client_index - opaque cookie to identify the sender
767 @param context - sender context, to match reply w/ request
768 @param out_port - outside port
769 @param out_addr - outside IPv4 address
771 define nat_det_reverse {
778 /** \brief Get inside address from outside address and port reply
779 @param context - sender context, to match reply w/ request
780 @param retval - return code
781 @param is_nat44 - 1 if NAT44
782 @param in_addr - inside IP address
784 define nat_det_reverse_reply {
791 /** \brief Dump NAT deterministic mappings
792 @param client_index - opaque cookie to identify the sender
793 @param context - sender context, to match reply w/ request
795 define nat_det_map_dump {
800 /** \brief NAT users response
801 @param context - sender context, to match reply w/ request
802 @param is_nat44 - 1 if NAT44
803 @param in_addr - inside IP address
804 @param in_plen - inside IP address prefix length
805 @param out_addr - outside IPv4 address
806 @param out_plen - outside IPv4 address prefix length
807 @param sharing_ratio - outside to inside address sharing ratio
808 @param ports_per_host - number of ports available to a host
809 @param ses_num - number of sessions belonging to this mapping
811 define nat_det_map_details {
823 /** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
824 @param client_index - opaque cookie to identify the sender
825 @param context - sender context, to match reply w/ request
826 @param udp - UDP timeout (default 300sec)
827 @param tcp_established - TCP established timeout (default 7440sec)
828 @param tcp_transitory - TCP transitory timeout (default 240sec)
829 @param icmp - ICMP timeout (default 60sec)
831 autoreply define nat_det_set_timeouts {
840 /** \brief Get values of timeouts for deterministic NAT (seconds)
841 @param client_index - opaque cookie to identify the sender
842 @param context - sender context, to match reply w/ request
844 define nat_det_get_timeouts {
849 /** \brief Get values of timeouts for deterministic NAT reply
850 @param context - sender context, to match reply w/ request
851 @param retval - return code
852 @param udp - UDP timeout (default 300sec)
853 @param tcp_established - TCP established timeout (default 7440sec)
854 @param tcp_transitory - TCP transitory timeout (default 240sec)
855 @param icmp - ICMP timeout (default 60sec)
857 define nat_det_get_timeouts_reply {
866 /** \brief Close deterministic NAT session by outside address and port
867 @param client_index - opaque cookie to identify the sender
868 @param context - sender context, to match reply w/ request
869 @param out_addr - outside IPv4 address
870 @param out_port - outside port
871 @param ext_addr - external host IPv4 address
872 @param ext_port - external host port
874 autoreply define nat_det_close_session_out {
883 /** \brief Close deterministic NAT session by inside address and port
884 @param client_index - opaque cookie to identify the sender
885 @param context - sender context, to match reply w/ request
886 @param is_nat44 - 1 if NAT44
887 @param in_addr - inside IP address
888 @param in_port - inside port
889 @param ext_addr - external host IP address
890 @param ext_port - external host port
892 autoreply define nat_det_close_session_in {
902 /** \brief Dump determinstic NAT sessions
903 @param client_index - opaque cookie to identify the sender
904 @param context - sender context, to match reply w/ request
905 @param is_nat44 - 1 if NAT44
906 @param user_addr - address of an inside user whose sessions to dump
908 define nat_det_session_dump {
915 /** \brief Deterministic NAT sessions reply
916 @param context - sender context, to match reply w/ request
917 @param in_port - inside port
918 @param ext_addr - external host address
919 @param ext_port - external host port
920 @param out_port - outside NAT port
921 @param state - session state
922 @param expire - session expiration timestamp
924 define nat_det_session_details {
939 /** \brief Add/delete address range to NAT64 pool
940 @param client_index - opaque cookie to identify the sender
941 @param context - sender context, to match reply w/ request
942 @param start_addr - start address of the range
943 @param end_addr - end address of the range
944 @param vrf_id - VRF id of tenant, ~0 means independent of VRF
945 @param is_add - 1 if add, 0 if delete
947 autoreply define nat64_add_del_pool_addr_range {
956 /** \brief Dump NAT64 pool addresses
957 @param client_index - opaque cookie to identify the sender
958 @param context - sender context, to match reply w/ request
960 define nat64_pool_addr_dump {
965 /** \brief NAT64 pool address details response
966 @param context - sender context, to match reply w/ request
967 @param address - IPv4 address
968 @param vfr_id - VRF id of tenant, ~0 means independent of VRF
970 define nat64_pool_addr_details {
976 /** \brief Enable/disable NAT64 feature on the interface
977 @param client_index - opaque cookie to identify the sender
978 @param context - sender context, to match reply w/ request
979 @param sw_if_index - index of the interface
980 @param is_inside - 1 if inside, 0 if outside
981 @param is_add - 1 if add, 0 if delete
983 autoreply define nat64_add_del_interface {
991 /** \brief Dump interfaces with NAT64 feature
992 @param client_index - opaque cookie to identify the sender
993 @param context - sender context, to match reply w/ request
995 define nat64_interface_dump {
1000 /** \brief NAT64 interface details response
1001 @param context - sender context, to match reply w/ request
1002 @param is_inside - 1 if inside, 0 if outside
1003 @param sw_if_index - index of the interface
1005 define nat64_interface_details {
1011 /** \brief Add/delete NAT64 static BIB entry
1012 @param client_index - opaque cookie to identify the sender
1013 @param context - sender context, to match reply w/ request
1014 @param i_addr - inside IPv6 address
1015 @param o_addr - outside IPv4 address
1016 @param i_port - inside port number
1017 @param o_port - outside port number
1018 @param vrf_id - VRF id of tenant
1019 @param proto - protocol number
1020 @param is_add - 1 if add, 0 if delete
1022 autoreply define nat64_add_del_static_bib {
1034 /** \brief Dump NAT64 BIB
1035 @param client_index - opaque cookie to identify the sender
1036 @param context - sender context, to match reply w/ request
1037 @param proto - protocol of the BIB: 255 - all BIBs
1041 otherwise - "unknown" protocol BIB
1043 define nat64_bib_dump {
1049 /** \brief NAT64 BIB details response
1050 @param context - sender context, to match reply w/ request
1051 @param i_addr - inside IPv6 address
1052 @param o_addr - outside IPv4 address
1053 @param i_port - inside port number
1054 @param o_port - outside port number
1055 @param vrf_id - VRF id of tenant
1056 @param proto - protocol number
1057 @param is_static - 1 if static BIB entry, 0 if dynamic
1058 @param ses_num - number of sessions associated with the BIB entry
1060 define nat64_bib_details {
1072 /** \brief Set values of timeouts for NAT64 (seconds, 0 = default)
1073 @param client_index - opaque cookie to identify the sender
1074 @param context - sender context, to match reply w/ request
1075 @param udp - UDP timeout (default 300sec)
1076 @param icmp - ICMP timeout (default 60sec)
1077 @param tcp_trans - TCP transitory timeout (default 240sec)
1078 @param tcp_est - TCP established timeout (default 7440sec)
1079 @param tcp_incoming_syn - TCP incoming SYN timeout (default 6sec)
1081 autoreply define nat64_set_timeouts {
1088 u32 tcp_incoming_syn;
1091 /** \brief Get values of timeouts for NAT64 (seconds)
1092 @param client_index - opaque cookie to identify the sender
1093 @param context - sender context, to match reply w/ request
1095 define nat64_get_timeouts {
1100 /** \brief Get values of timeouts for NAT64 reply
1101 @param context - sender context, to match reply w/ request
1102 @param retval - return code
1103 @param udp - UDP timeout
1104 @param icmp - ICMP timeout
1105 @param tcp_trans - TCP transitory timeout
1106 @param tcp_est - TCP established timeout
1107 @param tcp_incoming_syn - TCP incoming SYN timeout
1109 define nat64_get_timeouts_reply {
1116 u32 tcp_incoming_syn;
1119 /** \brief Dump NAT64 session table
1120 @param client_index - opaque cookie to identify the sender
1121 @param context - sender context, to match reply w/ request
1122 @param proto - protocol of the session table: 255 - all STs
1126 otherwise - "unknown" proto ST
1128 define nat64_st_dump {
1134 /** \brief NAT64 session table details response
1135 @param context - sender context, to match reply w/ request
1136 @param il_addr - inside IPv6 address of the local host
1137 @param ol_addr - outside IPv4 address of the local host
1138 @param il_port - inside port number id of the local host/inside ICMP id
1139 @param ol_port - outside port number of the local host/outside ICMP id
1140 @param il_addr - inside IPv6 address of the remote host
1141 @param ol_addr - outside IPv4 address of the remote host
1142 @param l_port - port number of the remote host (not used for ICMP)
1143 @param vrf_id - VRF id of tenant
1144 @param proto - protocol number
1146 define nat64_st_details {
1159 /** \brief Add/del NAT64 prefix
1160 @param client_index - opaque cookie to identify the sender
1161 @param context - sender context, to match reply w/ request
1162 @param prefix - NAT64 prefix
1163 @param prefix - NAT64 prefix length
1164 @param vrf_id - VRF id of tenant
1165 @param is_add - 1 if add, 0 if delete
1167 autoreply define nat64_add_del_prefix {
1176 /** \brief Dump NAT64 prefix
1177 @param client_index - opaque cookie to identify the sender
1178 @param context - sender context, to match reply w/ request
1180 define nat64_prefix_dump {
1185 /** \brief Dump NAT64 prefix details response
1186 @param context - sender context, to match reply w/ request
1187 @param prefix - NAT64 prefix
1188 @param prefix - NAT64 prefix length
1189 @param vrf_id - VRF id of tenant
1191 define nat64_prefix_details {
1198 /** \brief Add/delete NAT64 pool address from specific interfce
1199 @param client_index - opaque cookie to identify the sender
1200 @param context - sender context, to match reply w/ request
1201 @param is_add - 1 if add, 0 if delete
1202 @param sw_if_index - software index of the interface
1204 autoreply define nat64_add_del_interface_addr {
1217 /** \brief Add/delete address range to DS-Lite pool
1218 @param client_index - opaque cookie to identify the sender
1219 @param context - sender context, to match reply w/ request
1220 @param start_addr - start address of the range
1221 @param end_addr - end address of the range
1222 @param is_add - 1 if add, 0 if delete
1224 autoreply define dslite_add_del_pool_addr_range {
1232 /** \brief Dump DS-Lite addresses
1233 @param client_index - opaque cookie to identify the sender
1234 @param context - sender context, to match reply w/ request
1236 define dslite_address_dump {
1241 /** \brief DS-Lite address details response
1242 @param context - sender context, to match reply w/ request
1243 @param ip_address - IPv4 address
1245 define dslite_address_details {
1250 /** \brief Set AFTR IPv6 and IPv4 addresses
1251 @param client_index - opaque cookie to identify the sender
1252 @param context - sender context, to match reply w/ request
1253 @param ip4_addr - IPv4 address
1254 @param ip6_addr - IP64 address
1256 autoreply define dslite_set_aftr_addr {
1263 /** \brief Get AFTR IPv6 and IPv4 addresses
1264 @param client_index - opaque cookie to identify the sender
1265 @param context - sender context, to match reply w/ request
1267 define dslite_get_aftr_addr {
1272 /** \brief Response to get AFTR IPv6 and IPv4 addresses
1273 @param context - sender context, to match reply w/ request
1274 @param retval - return code
1275 @param ip4_addr - IPv4 address
1276 @param ip6_addr - IP64 address
1278 define dslite_get_aftr_addr_reply {
1285 /** \brief Set B4 IPv6 and IPv4 addresses
1286 @param client_index - opaque cookie to identify the sender
1287 @param context - sender context, to match reply w/ request
1288 @param ip4_addr - IPv4 address
1289 @param ip6_addr - IP64 address
1291 autoreply define dslite_set_b4_addr {
1298 /** \brief Get B4 IPv6 and IPv4 addresses
1299 @param client_index - opaque cookie to identify the sender
1300 @param context - sender context, to match reply w/ request
1302 define dslite_get_b4_addr {
1307 /** \brief Response to get B4 IPv6 and IPv4 addresses
1308 @param context - sender context, to match reply w/ request
1309 @param retval - return code
1310 @param ip4_addr - IPv4 address
1311 @param ip6_addr - IP64 address
1313 define dslite_get_b4_addr_reply {
1323 /** \brief Enable/disable NAT66 feature on the interface
1324 @param client_index - opaque cookie to identify the sender
1325 @param context - sender context, to match reply w/ request
1326 @param is_add - 1 if add, 0 if delete
1327 @param is_inside - 1 if inside, 0 if outside
1328 @param sw_if_index - software index of the interface
1330 autoreply define nat66_add_del_interface {
1338 /** \brief Dump interfaces with NAT66 feature
1339 @param client_index - opaque cookie to identify the sender
1340 @param context - sender context, to match reply w/ request
1342 define nat66_interface_dump {
1347 /** \brief NAT66 interface details response
1348 @param context - sender context, to match reply w/ request
1349 @param is_inside - 1 if inside, 0 if outside
1350 @param sw_if_index - software index of the interface
1352 define nat66_interface_details {
1358 /** \brief Add/delete 1:1 NAT66
1359 @param client_index - opaque cookie to identify the sender
1360 @param context - sender context, to match reply w/ request
1361 @param is_add - 1 if add, 0 if delete
1362 @param local_ip_address - local IPv6 address
1363 @param external_ip_address - external IPv6 address
1364 @param vrf_id - VRF id of tenant
1366 autoreply define nat66_add_del_static_mapping {
1370 u8 local_ip_address[16];
1371 u8 external_ip_address[16];
1375 /** \brief Dump NAT66 static mappings
1376 @param client_index - opaque cookie to identify the sender
1377 @param context - sender context, to match reply w/ request
1379 define nat66_static_mapping_dump {
1384 /** \brief NAT66 static mapping details response
1385 @param context - sender context, to match reply w/ request
1386 @param local_ip_address - local IPv6 address
1387 @param external_ip_address - external IPv6 address
1388 @param vrf_id - VRF id of tenant
1389 @param total_bytes - count of bytes sent through static mapping
1390 @param total_pkts - count of pakets sent through static mapping
1392 define nat66_static_mapping_details {
1394 u8 local_ip_address[16];
1395 u8 external_ip_address[16];