From a0f325f0b6ca0129ed339ac4ac94d7159e926977 Mon Sep 17 00:00:00 2001 From: mhemmatp Date: Thu, 12 Dec 2019 16:05:13 +0100 Subject: [HICN-440] Add comments to hicn sysrepo plugin code Signed-off-by: mhemmatp Change-Id: I0ed0c5b0b9cd7714b46867e4d4fe0324945cf418 --- .../hicn-plugin/plugin/hicn_vpp_comm.h | 40 ++++++++++++++++++---- 1 file changed, 33 insertions(+), 7 deletions(-) (limited to 'ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h') 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 @@ -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__ -- cgit 1.2.3-korg