aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/hicn.api
diff options
context:
space:
mode:
authorAlberto Compagno <acompagn+fdio@cisco.com>2019-11-17 12:50:48 +0100
committerAlberto Compagno <acompagn+fdio@cisco.com>2019-11-18 11:16:44 +0100
commitfb81ea88640de69820f2b2d24e29e5743e4f301b (patch)
tree51b929825d7d68b4105ac63ea0cea32dd48ae269 /hicn-plugin/src/hicn.api
parent547acf3eed92d3564139cccf205c852178bcc310 (diff)
[HICN-225] Added generic binary api for handling faces
Supported messages are add, del, get, dump, get. Each message contains a face id and the expected message has different fields based on the face type. The binary api specific for ip faces is still available for compatibility but deprecated. Change-Id: I899c6cf31a56abd39ad287ea3128993857997fcb Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Diffstat (limited to 'hicn-plugin/src/hicn.api')
-rw-r--r--hicn-plugin/src/hicn.api187
1 files changed, 168 insertions, 19 deletions
diff --git a/hicn-plugin/src/hicn.api b/hicn-plugin/src/hicn.api
index 4f3047b0a..9a194b97f 100644
--- a/hicn-plugin/src/hicn.api
+++ b/hicn-plugin/src/hicn.api
@@ -16,6 +16,56 @@
option version = "5.1.0";
import "vnet/ip/ip_types.api";
+enum face_type : u8 {
+ IP_FACE = 0,
+ UDP_FACE,
+};
+
+typedef hicn_face_ip {
+ /* IP local address */
+ vl_api_address_t local_addr;
+
+ /* IP remote address */
+ vl_api_address_t remote_addr;
+
+ /* IPv4 local port number */
+ u32 swif;
+
+ /* Face flags */
+ u32 flags;
+
+ /* Name of the interface */
+ u8 if_name[30];
+};
+
+typedef hicn_face_udp {
+ /* IP local address */
+ vl_api_address_t local_addr;
+
+ /* IP remote address */
+ vl_api_address_t remote_addr;
+
+ /* Local port */
+ u16 lport;
+
+ /* Remote port */
+ u16 rport;
+
+ /* IPv4 local port number */
+ u32 swif;
+
+ /* Face flags */
+ u32 flags;
+
+ /* Name of the interface */
+ u8 if_name[30];
+};
+
+typedef hicn_face_union {
+ vl_api_hicn_face_ip_t ip;
+ vl_api_hicn_face_udp_t udp;
+};
+
define hicn_api_node_params_set
{
/* Client identifier, set from api_main.my_client_index */
@@ -160,13 +210,7 @@ define hicn_api_face_ip_add
u32 context;
/* IP local address */
- vl_api_address_t local_addr;
-
- /* IP remote address */
- vl_api_address_t remote_addr;
-
- /* IPv4 local port number */
- u32 swif;
+ vl_api_hicn_face_ip_t face;
};
define hicn_api_face_ip_add_reply
@@ -202,18 +246,6 @@ define hicn_api_face_ip_del_reply
i32 retval;
};
-define hicn_api_face_ip_params_get
-{
- /* Client identifier, set from api_main.my_client_index */
- u32 client_index;
-
- /* Arbitrary context, so client can match reply to request */
- u32 context;
-
- /* A Face to be retrieved */
- u32 faceid;
-};
-
define hicn_api_face_stats_details
{
/* From the request */
@@ -255,6 +287,18 @@ define hicn_api_face_stats_dump
u32 context;
};
+define hicn_api_face_ip_params_get
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* A Face to be retrieved */
+ u32 faceid;
+};
+
define hicn_api_face_ip_params_get_reply
{
/* From the request */
@@ -279,6 +323,111 @@ define hicn_api_face_ip_params_get_reply
u32 flags;
};
+define hicn_api_face_add
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Type of face to add */
+ vl_api_face_type_t type;
+
+ /* Face to add */
+ vl_api_hicn_face_union_t face;
+};
+
+define hicn_api_face_add_reply
+{
+ /* From the request */
+ u32 context;
+
+ /* Return value: new Face ID, ~0 means no Face was created */
+ u32 faceid;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+};
+
+define hicn_api_face_del
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* A Face ID to be deleted */
+ u32 faceid;
+};
+
+define hicn_api_face_del_reply
+{
+ /* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+};
+
+define hicn_api_faces_details
+{
+/* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* Id of the face */
+ u32 faceid;
+
+ /* Type of face to add */
+ vl_api_face_type_t type;
+
+ /* Face to add */
+ vl_api_hicn_face_union_t face;
+};
+
+define hicn_api_faces_dump
+{
+/* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+};
+
+define hicn_api_face_get
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* A Face to be retrieved */
+ u32 faceid;
+};
+
+define hicn_api_face_get_reply
+{
+ /* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* Id of the face */
+ u32 faceid;
+
+ /* Type of face to add */
+ vl_api_face_type_t type;
+
+ /* Face to add */
+ vl_api_hicn_face_union_t face;
+};
+
define hicn_api_route_nhops_add
{
/* Client identifier, set from api_main.my_client_index */