2 * Copyright (c) 2021 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 = "0.0.1";
18 import "vnet/interface_types.api";
19 import "vnet/ip/ip_types.api";
29 enum pnat_attachment_point
33 PNAT_ATTACHMENT_POINT_MAX,
38 vl_api_ip4_address_t src;
39 vl_api_ip4_address_t dst;
40 vl_api_ip_proto_t proto;
43 vl_api_pnat_mask_t mask;
46 autoendian define pnat_binding_add
50 vl_api_pnat_5tuple_t match;
51 vl_api_pnat_5tuple_t rewrite;
54 autoendian define pnat_binding_add_reply
61 autoendian autoreply define pnat_binding_del
68 autoendian autoreply define pnat_binding_attach
72 vl_api_interface_index_t sw_if_index;
73 vl_api_pnat_attachment_point_t attachment;
77 autoendian autoreply define pnat_binding_detach
81 vl_api_interface_index_t sw_if_index;
82 vl_api_pnat_attachment_point_t attachment;
87 rpc pnat_bindings_get returns pnat_bindings_get_reply
88 stream pnat_bindings_details;
89 rpc pnat_interfaces_get returns pnat_interfaces_get_reply
90 stream pnat_interfaces_details;
93 define pnat_bindings_get
100 define pnat_bindings_get_reply
107 define pnat_bindings_details
110 vl_api_pnat_5tuple_t match;
111 vl_api_pnat_5tuple_t rewrite;
114 define pnat_interfaces_get
121 define pnat_interfaces_get_reply
128 define pnat_interfaces_details
131 vl_api_interface_index_t sw_if_index;
132 bool enabled[2]; /* PNAT_ATTACHMENT_POINT_MAX */
133 vl_api_pnat_mask_t lookup_mask[2]; /* PNAT_ATTACHMENT_POINT_MAX */
141 description "successfully rewritten";
148 description "rewrite failed";
153 "/err/pnat-input" "pnat";
154 "/err/pnat-output" "pnat";