summaryrefslogtreecommitdiffstats
path: root/hicn-plugin/src/hicn.api
diff options
context:
space:
mode:
Diffstat (limited to 'hicn-plugin/src/hicn.api')
-rw-r--r--hicn-plugin/src/hicn.api579
1 files changed, 579 insertions, 0 deletions
diff --git a/hicn-plugin/src/hicn.api b/hicn-plugin/src/hicn.api
new file mode 100644
index 000000000..9643f2098
--- /dev/null
+++ b/hicn-plugin/src/hicn.api
@@ -0,0 +1,579 @@
+/*
+ * Copyright (c) 2017-2020 Cisco and/or its affiliates.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+option version = "5.1.0";
+import "vnet/ip/ip_types.api";
+
+enum hicn_action_type
+{
+ HICN_DISABLE = 0,
+ HICN_ENABLE,
+};
+
+typedef hicn_face
+{
+ /* IP local address */
+ vl_api_address_t nat_addr;
+
+ /* IPv4 local port number */
+ u32 swif;
+
+ /* Face flags */
+ u32 flags;
+
+ /* Name of the interface */
+ u8 if_name[30];
+};
+
+define hicn_api_node_params_set
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Enable / disable ICN forwarder in VPP */
+ u8 enable_disable;
+
+ /* PIT maximum size, otherwise -1 to assign default value */
+ i32 pit_max_size;
+
+ /* CS maximum size, otherwise -1 to assign default value */
+ i32 cs_max_size;
+
+ /* Upper bound on PIT entry lifetime, otherwise -1 to assign default value */
+ f64 pit_max_lifetime_sec;
+};
+
+define hicn_api_node_params_set_reply
+{
+ /* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+};
+
+define hicn_api_node_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;
+};
+
+define hicn_api_node_params_get_reply
+{
+ /* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* Enabled / disabled flag */
+ u8 is_enabled;
+
+ /* compile-time plugin features */
+ u8 feature_cs;
+
+ /* Number of VPP workers */
+ u32 worker_count;
+
+ /* PIT maximum size, otherwise -1 to assign default value */
+ u32 pit_max_size;
+
+ /* CS maximum size, otherwise -1 to assign default value */
+ u32 cs_max_size;
+
+ /* Upper bound on PIT entry lifetime */
+ f64 pit_max_lifetime_sec;
+};
+
+define hicn_api_node_stats_get
+{
+ /* 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_node_stats_get_reply
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* ICN packets processed */
+ u64 pkts_processed;
+
+ /* ICN interests forwarded */
+ u64 pkts_interest_count;
+
+ /* ICN data msgs forwarded */
+ u64 pkts_data_count;
+
+ /* ICN cached data msg replies */
+ u64 pkts_from_cache_count;
+
+ /* ICN no PIT entry drops */
+ u64 pkts_no_pit_count;
+
+ /* ICN expired PIT entries */
+ u64 pit_expired_count;
+
+ /* ICN expired CS entries */
+ u64 cs_expired_count;
+
+ /* ICN LRU CS entries freed */
+ u64 cs_lru_count;
+
+ /* ICN msgs dropped due to no packet buffers */
+ u64 pkts_drop_no_buf;
+
+ /* ICN Interest messages aggregated in PIT */
+ u64 interests_aggregated;
+
+ /* ICN Interest messages retransmitted */
+ u64 interests_retx;
+
+ /* ICN Interest messages colliding in hashtb */
+ u64 interests_hash_collision;
+
+ /* Number of entries in PIT at the present moment */
+ u64 pit_entries_count;
+
+ /* Number of entries in CS at the present moment */
+ u64 cs_entries_count;
+
+ /* Number of entries in CS at the present moment */
+ u64 cs_entries_ntw_count;
+};
+
+define hicn_api_face_stats_details
+{
+/* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* Id of the face */
+ u32 faceid;
+
+ /* Interest rx */
+ u64 irx_packets;
+
+ u64 irx_bytes;
+
+ /* Interest tx */
+ u64 itx_packets;
+
+ u64 itx_bytes;
+
+ /* data rx */
+ u64 drx_packets;
+
+ u64 drx_bytes;
+
+ /* data tx */
+ u64 dtx_packets;
+
+ u64 dtx_bytes;
+};
+
+define hicn_api_face_stats_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_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_params_get_reply
+{
+ /* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* The face required */
+ u32 faceid;
+
+ /* IP local address */
+ vl_api_address_t nat_addr;
+
+ /* VPP interface (index) associated with the face */
+ u32 swif;
+
+ /* Face flags */
+ u32 flags;
+};
+
+define hicn_api_faces_details
+{
+/* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* Id of the face */
+ u32 faceid;
+
+ /* Face to add */
+ vl_api_hicn_face_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;
+
+ /* Face to add */
+ vl_api_hicn_face_t face;
+};
+
+define hicn_api_route_get
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Route prefix */
+ vl_api_prefix_t prefix;
+};
+
+define hicn_api_route_get_reply
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* List of faces pointing to the next hops */
+ u32 faceids[5];
+
+ /* Number of valid faceids */
+ u8 nfaces;
+
+ /* Strategy */
+ u32 strategy_id;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+};
+
+define hicn_api_routes_details
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Route prefix */
+ vl_api_prefix_t prefix;
+
+ /* List of faces pointing to the next hops */
+ u32 faceids[5];
+
+ /* Number of valid faceids */
+ u8 nfaces;
+
+ /* Strategy */
+ u32 strategy_id;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+};
+
+define hicn_api_routes_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_strategies_get
+{
+ /* 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_strategies_get_reply
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Number of available strategies */
+ u8 n_strategies;
+
+ /* Strategies */
+ u32 strategy_id[256];
+
+ /* Return value, zero means all OK */
+ i32 retval;
+};
+
+define hicn_api_strategy_get
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Route prefix */
+ u32 strategy_id;
+};
+
+define hicn_api_strategy_get_reply
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Strategy description */
+ u8 description[200];
+
+ /* Return value, zero means all OK */
+ i32 retval;
+};
+
+define hicn_api_enable_disable
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Enable or disable enable/disable hICN*/
+ vl_api_hicn_action_type_t enable_disable;
+
+ /* Prefix on which we enable/disable hICN*/
+ vl_api_prefix_t prefix;
+};
+
+define hicn_api_enable_disable_reply
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+/* Return value, zero means all OK */
+ i32 retval;
+};
+
+define hicn_api_register_prod_app
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Prefix to match */
+ vl_api_prefix_t prefix;
+
+ /* sw_if id */
+ u32 swif;
+
+ /* CS memory reserved -- in number of packets */
+ u32 cs_reserved;
+};
+
+define hicn_api_register_prod_app_reply
+{
+ /* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* Actual CS memory reserved -- in number of packets */
+ u32 cs_reserved;
+
+ /* Prod address (ipv4 or ipv6) */
+ vl_api_address_t prod_addr;
+
+ /* Return value: new Face ID, ~0 means no Face was created */
+ u32 faceid;
+};
+
+autoreply define hicn_api_face_prod_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_register_cons_app
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* swif */
+ u32 swif;
+};
+
+define hicn_api_register_cons_app_reply
+{
+ /* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* Ip4 address */
+ vl_api_address_t src_addr4;
+
+ /* Ip6 address */
+ vl_api_address_t src_addr6;
+
+ /* Return value: new Face ID, ~0 means no Face was created */
+ u32 faceid1;
+
+ /* Return value: new Face ID, ~0 means no Face was created */
+ u32 faceid2;
+};
+
+autoreply define hicn_api_face_cons_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_udp_tunnel_add_del
+{
+ /* Client identifier, set from api_main.my_client_index */
+ u32 client_index;
+
+ /* Arbitrary context, so client can match reply to request */
+ u32 context;
+
+ /* Source address */
+ vl_api_address_t src_addr;
+
+ /* Destination address */
+ vl_api_address_t dst_addr;
+
+ /* Source port */
+ u16 src_port;
+
+ /* Destination port */
+ u16 dst_port;
+
+ /* Add or remove the tunnel*/
+ u8 is_add;
+};
+
+define hicn_api_udp_tunnel_add_del_reply
+{
+ /* From the request */
+ u32 context;
+
+ /* Return value, zero means all OK */
+ i32 retval;
+
+ /* Udp encap index */
+ u32 uei;
+};
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */