diff options
author | 2019-12-12 16:05:13 +0100 | |
---|---|---|
committer | 2019-12-12 17:09:06 +0100 | |
commit | a0f325f0b6ca0129ed339ac4ac94d7159e926977 (patch) | |
tree | 81e6b447bc44d418c6625fdf66c03a42096476d2 /ctrl/sysrepo-plugins/hicn-plugin/plugin/hicn_vpp_comm.h | |
parent | 02be1b9403b12c03fc4c03ef872fb71ec37b2c1c (diff) |
[HICN-440] Add comments to hicn sysrepo plugin code
Signed-off-by: mhemmatp <mhemmatp@cisco.com>
Change-Id: I0ed0c5b0b9cd7714b46867e4d4fe0324945cf418
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.h | 40 |
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__ |