1 /* Hey Emacs use -*- mode: C -*- */
3 * Copyright (c) 2016 Cisco and/or its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 This file defines the vpp control-plane API messages
19 used to control the ABF plugin
22 option version = "0.1.0";
23 import "vnet/ip/ip_types.api";
24 import "vnet/fib/fib_types.api";
25 import "vnet/interface_types.api";
27 enum cnat_translation_flags:u8
29 CNAT_TRANSLATION_ALLOC_PORT = 1,
32 /* An enpoint is either
34 * An interface, an address familiy and a port */
37 vl_api_address_t addr;
38 vl_api_interface_index_t sw_if_index;
39 vl_api_address_family_t if_af;
43 typedef cnat_endpoint_tuple
45 vl_api_cnat_endpoint_t dst_ep;
46 vl_api_cnat_endpoint_t src_ep;
49 typedef cnat_translation
51 vl_api_cnat_endpoint_t vip;
53 vl_api_ip_proto_t ip_proto;
57 vl_api_cnat_endpoint_tuple_t paths[n_paths];
60 define cnat_translation_update
64 vl_api_cnat_translation_t translation;
67 define cnat_translation_update_reply
74 autoreply define cnat_translation_del
81 define cnat_translation_details
84 vl_api_cnat_translation_t translation;
87 define cnat_translation_dump
93 autoreply define cnat_session_purge
101 vl_api_cnat_endpoint_t src;
102 vl_api_cnat_endpoint_t dst;
103 vl_api_cnat_endpoint_t new;
104 vl_api_ip_proto_t ip_proto;
109 define cnat_session_details
112 vl_api_cnat_session_t session;
115 define cnat_session_dump
121 autoreply define cnat_set_snat_addresses
125 vl_api_ip4_address_t snat_ip4;
126 vl_api_ip6_address_t snat_ip6;
127 vl_api_interface_index_t sw_if_index;
130 define cnat_get_snat_addresses
136 define cnat_get_snat_addresses_reply
141 vl_api_ip4_address_t snat_ip4;
142 vl_api_ip6_address_t snat_ip6;
143 vl_api_interface_index_t sw_if_index;
146 autoreply define cnat_add_del_snat_prefix
151 vl_api_prefix_t prefix;
155 * fd.io coding-style-patch-verification: ON
158 * eval: (c-set-style "gnu")