summaryrefslogtreecommitdiffstats
path: root/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h
diff options
context:
space:
mode:
Diffstat (limited to 'ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h')
-rw-r--r--ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h40
1 files changed, 33 insertions, 7 deletions
diff --git a/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h
index 720bd6835..9abe4e5d4 100644
--- a/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h
+++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h
@@ -13,6 +13,13 @@
* limitations under the License.
*/
+
+/**
+ * @file hicn_vpp_comm.h
+ * @brief This file contains binary api to connect to the VPP.
+ */
+
+
#ifndef __HICN_VPP_COMMM_H__
#define __HICN_VPP_COMMM_H__
#include <sysrepo.h>
@@ -27,15 +34,25 @@
#endif
#endif
-// ctx vpp connect
+/**
+ * @brief This is the context to connect to the vpp
+ */
+
extern vapi_ctx_t g_vapi_ctx_instance;
-//Here it is the definition
+/**
+ * @brief This macro is interface.c to communicate with vpp
+ */
#define VPP_INTFC_NAME_LEN 64
#define VPP_MAC_ADDRESS_LEN 8
#define VPP_IP6_ADDRESS_LEN 16
+
+
+/**
+ * @brief This macro checks the arg is NULL or not, if the arg is NULL it returns retval
+ */
#define ARG_CHECK(retval, arg) \
do { \
if (NULL == (arg)) { \
@@ -45,21 +62,30 @@ extern vapi_ctx_t g_vapi_ctx_instance;
} while (0)
-
+/**
+ * @brief Please check ARG_CHECK
+ */
#define ARG_CHECK2(retval, arg1, arg2) \
ARG_CHECK(retval, arg1); \
ARG_CHECK(retval, arg2)
-#define ARG_CHECK7(retval, arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
+/**
+ * @brief This Macro is the multiple check of ARG_CHECK
+ */
+#define ARG_CHECK5(retval, arg1, arg2, arg3, arg4, arg5) \
ARG_CHECK(retval, arg1); \
ARG_CHECK(retval, arg2); \
ARG_CHECK(retval, arg3); \
ARG_CHECK(retval, arg4); \
- ARG_CHECK(retval, arg5); \
- ARG_CHECK(retval, arg6); \
- ARG_CHECK(retval, arg7)
+ ARG_CHECK(retval, arg5)
+/**
+ * @brief This function is used to connect to the vpp
+ */
int hicn_connect_vpp();
+/**
+ * @brief This function is used to close the connection of the vpp
+ */
int hicn_disconnect_vpp();
#endif //__HICN_VPP_COMMM_H__