Hybrid ICN (hICN) plugin
v21.06-rc0-4-g18fa668
ctrl
sysrepo-plugins
hicn-plugin
plugin
hicn_vpp_comm.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2019 Cisco and/or its affiliates.
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at:
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
23
#ifndef __HICN_VPP_COMMM_H__
24
#define __HICN_VPP_COMMM_H__
25
#include <sysrepo.h>
26
#include <sysrepo/values.h>
27
#include <vapi/vapi.h>
28
29
#ifndef HICN_THIS_FUNC
30
#ifdef __FUNCTION__
31
#define HICN_THIS_FUNC __FUNCTION__
32
#else
33
#define HICN_THIS_FUNC __func__
34
#endif
35
#endif
36
41
extern
vapi_ctx_t
g_vapi_ctx_instance
;
42
43
47
#define VPP_INTFC_NAME_LEN 64
48
#define VPP_MAC_ADDRESS_LEN 8
49
#define VPP_IP6_ADDRESS_LEN 16
50
51
52
56
#define ARG_CHECK(retval, arg) \
57
do { \
58
if (NULL == (arg)) { \
59
SRP_LOG_DBGMSG("NULL pointer passed."); \
60
return (retval); \
61
} \
62
} while (0)
63
64
68
#define ARG_CHECK2(retval, arg1, arg2) \
69
ARG_CHECK(retval, arg1); \
70
ARG_CHECK(retval, arg2)
71
75
#define ARG_CHECK5(retval, arg1, arg2, arg3, arg4, arg5) \
76
ARG_CHECK(retval, arg1); \
77
ARG_CHECK(retval, arg2); \
78
ARG_CHECK(retval, arg3); \
79
ARG_CHECK(retval, arg4); \
80
ARG_CHECK(retval, arg5)
81
85
int
hicn_connect_vpp
();
89
int
hicn_disconnect_vpp
();
90
91
#endif //__HICN_VPP_COMMM_H__
hicn_connect_vpp
int hicn_connect_vpp()
This function is used to connect to the vpp.
hicn_disconnect_vpp
int hicn_disconnect_vpp()
This function is used to close the connection of the vpp.
g_vapi_ctx_instance
vapi_ctx_t g_vapi_ctx_instance
This is the context to connect to the vpp.
Generated by
1.8.17