summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.api
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-08-23 22:55:18 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-09-03 20:04:13 +0000
commite5ff5a36dd126ee57dca4e0b03da2f7704e0a4f5 (patch)
tree2108baa60e8a697624288fe2c3050be29697bc88 /src/plugins/nat/nat.api
parentb6fde4a8bae474c6b73d08d223028f42e396d452 (diff)
api: enforce vla is last and fixed string type
Enforce that variable length fields are the last element of API messages. Add a 'fixed' version of string type, since dealing with multiple variable length strings turned out too painful for the C language bindings. The string type is now: { string name[64]; // NUL terminated C-string. Essentially decays to u8 name[64] string name[]; // Variable length string with embedded len field (vl_api_string_t) }; The latter notation could be made available to other types as well. e.g. { vl_api_address_t addresses[]; } instead of { u32 n_addr; vl_api_address_t addresses[n_addr]; }; Type: fix Change-Id: I18fa17ef47227633752ab50453e8d20a652a9f9b Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.api')
-rw-r--r--src/plugins/nat/nat.api16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/nat/nat.api b/src/plugins/nat/nat.api
index bd880a6498d..8cf26d4900d 100644
--- a/src/plugins/nat/nat.api
+++ b/src/plugins/nat/nat.api
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-option version = "5.1.0";
+option version = "5.2.0";
import "vnet/ip/ip_types.api";
import "vnet/interface_types.api";
@@ -171,7 +171,7 @@ define nat_worker_details {
u32 context;
u32 worker_index;
u32 lcore_id;
- string name;
+ string name[64];
};
/** \brief Enable/disable NAT IPFIX logging
@@ -678,7 +678,7 @@ autoreply define nat44_add_del_static_mapping {
u16 external_port;
vl_api_interface_index_t external_sw_if_index;
u32 vrf_id;
- string tag;
+ string tag[64];
};
/** \brief Dump NAT44 static mappings
@@ -717,7 +717,7 @@ define nat44_static_mapping_details {
u16 external_port;
vl_api_interface_index_t external_sw_if_index;
u32 vrf_id;
- string tag;
+ string tag[64];
};
/** \brief Add/delete NAT44 identity mapping
@@ -743,7 +743,7 @@ autoreply define nat44_add_del_identity_mapping {
u16 port;
vl_api_interface_index_t sw_if_index;
u32 vrf_id;
- string tag;
+ string tag[64];
};
/** \brief Dump NAT44 identity mappings
@@ -773,7 +773,7 @@ define nat44_identity_mapping_details {
u16 port;
vl_api_interface_index_t sw_if_index;
u32 vrf_id;
- string tag;
+ string tag[64];
};
/** \brief Add/delete NAT44 pool address from specific interfce
@@ -927,9 +927,9 @@ autoreply manual_endian define nat44_add_del_lb_static_mapping {
u16 external_port;
u8 protocol;
u32 affinity;
+ string tag[64];
u32 local_num;
vl_api_nat44_lb_addr_port_t locals[local_num];
- string tag;
};
/** \brief Add/delete NAT44 load-balancing static mapping rule backend
@@ -983,9 +983,9 @@ manual_endian define nat44_lb_static_mapping_details {
u8 protocol;
vl_api_nat_config_flags_t flags;
u32 affinity;
+ string tag[64];
u32 local_num;
vl_api_nat44_lb_addr_port_t locals[local_num];
- string tag;
};
/** \brief Delete NAT44 session