aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/sc_interface.c39
-rw-r--r--src/plugins/sc_plugins.c6
2 files changed, 4 insertions, 41 deletions
diff --git a/src/plugins/sc_interface.c b/src/plugins/sc_interface.c
index 36f3f05..41d7e01 100644
--- a/src/plugins/sc_interface.c
+++ b/src/plugins/sc_interface.c
@@ -25,8 +25,11 @@
#include <sysrepo/values.h>
#include <sysrepo/xpath.h>
#include <vnet/interface.h>
+#include <vnet/vnet.h>
+#include <vnet/ip/ip.h>
#include <vapi/interface.api.vapi.h>
+
DEFINE_VAPI_MSG_IDS_INTERFACE_API_JSON;
/**
@@ -232,42 +235,6 @@ sc_sw_interface_dump_cb (struct vapi_ctx_s *ctx, void *callback_ctx,
#define ONE_MEGABIT (uint64_t)1000000
switch (reply->link_speed << VNET_HW_INTERFACE_FLAG_SPEED_SHIFT)
{
- case VNET_HW_INTERFACE_FLAG_SPEED_10M:
- dctx->intfcArray[dctx->num_ifs].link_speed = 10 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_100M:
- dctx->intfcArray[dctx->num_ifs].link_speed = 100 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_1G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 1000 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_2_5G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 2500 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_5G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 5000 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_10G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 10000 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_20G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 20000 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_25G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 25000 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_40G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 40000 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_50G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 50000 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_56G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 56000 * ONE_MEGABIT;
- break;
- case VNET_HW_INTERFACE_FLAG_SPEED_100G:
- dctx->intfcArray[dctx->num_ifs].link_speed = 100000 * ONE_MEGABIT;
- break;
default:
dctx->intfcArray[dctx->num_ifs].link_speed = 0;
break;
diff --git a/src/plugins/sc_plugins.c b/src/plugins/sc_plugins.c
index 1a09654..0f79c16 100644
--- a/src/plugins/sc_plugins.c
+++ b/src/plugins/sc_plugins.c
@@ -16,23 +16,19 @@
#include <vapi/vpe.api.vapi.h>
#include <vapi/interface.api.vapi.h>
#include <vapi/l2.api.vapi.h>
-#include <vapi/stats.api.vapi.h>
#include <vapi/ip.api.vapi.h>
#include <vapi/tap.api.vapi.h>
#include <vapi/ipsec.api.vapi.h>
#include <vapi/vxlan.api.vapi.h>
-#include <vapi/hc.api.vapi.h>
#include <vnet/interface.h>
#include <vnet/mpls/mpls_types.h>
DEFINE_VAPI_MSG_IDS_VPE_API_JSON;
DEFINE_VAPI_MSG_IDS_INTERFACE_API_JSON;
DEFINE_VAPI_MSG_IDS_L2_API_JSON;
-DEFINE_VAPI_MSG_IDS_STATS_API_JSON;
DEFINE_VAPI_MSG_IDS_IP_API_JSON;
DEFINE_VAPI_MSG_IDS_TAP_API_JSON;
DEFINE_VAPI_MSG_IDS_IPSEC_API_JSON;
DEFINE_VAPI_MSG_IDS_VXLAN_API_JSON;
-DEFINE_VAPI_MSG_IDS_HC_API_JSON;
#include "sc_plugins.h"
@@ -76,7 +72,7 @@ void sr_plugin_cleanup_cb(sr_session_ctx_t *session, void *private_ctx)
{
SC_INVOKE_BEGIN;
- openconfig_plugin_clean();
+ openconfig_plugin_cleanup();
/* subscription was set as our private context */
sr_unsubscribe(session, private_ctx);