diff options
author | 2020-04-23 14:23:36 +0200 | |
---|---|---|
committer | 2020-05-04 15:19:41 +0200 | |
commit | 43d0ecbb1a1f7e1f72bf85441547b1678aed4350 (patch) | |
tree | 3da1d867acb6c8b735fbd76eeec51189b5d3996f /ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c | |
parent | c1b56d5861829a23289f42cecd716e681b520cf0 (diff) |
[HICN-603] Cleanup code for managing route
- Remove old code to add and remove hicn route. Routes are now
added only through the ip route commands/apis
- Adjusted the cli to set the strategy for a particular prefix
- Adjusted libtransport consumer and producer app creation
- Adjusted sysrepo plugin. Added hicn enable and disable and removed old
api related to hicn routes and hicn faces
- Adjusted libhicnctrl. Only routes api and listener are now available
for hicn-plugin
Signed-off-by: Alberto Compagno <acompagn+fdio@cisco.com>
Change-Id: Ib4f7f45ba0b99253d60a9da2b295d6e783e5cd51
Diffstat (limited to 'ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c')
-rw-r--r-- | ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c b/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c index b46b38b89..3e0c90cf9 100644 --- a/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c +++ b/ctrl/sysrepo-plugins/hicn-plugin/plugin/ietf/ietf_interface.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Cisco and/or its affiliates. + * Copyright (c) 2016-2020 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -442,7 +442,7 @@ ietf_interface_ipv46_address_change_cb(sr_session_ctx_t *session, const char *mo sr_change_oper_t op = SR_OP_CREATED; sr_val_t *old_val = NULL; sr_val_t *new_val = NULL; - sr_xpath_ctx_t xpath_ctx = { 0, }; + sr_xpath_ctx_t xpath_ctx = { 0 }; bool is_ipv6 = false, has_addr = false, has_prefix = false; uint8_t addr[16] = { 0, }; uint8_t prefix = 0; @@ -570,7 +570,8 @@ int ietf_subscribe_events(sr_session_ctx_t *session, goto error; } - rc = sr_module_change_subscribe(session, "ietf-interfaces","/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/address", ietf_interface_ipv46_address_change_cb, + //rc = sr_module_change_subscribe(session, "ietf-interfaces","/ietf-interfaces:interfaces/interface/ietf-ip:ipv4/address", ietf_interface_ipv46_address_change_cb, + rc = sr_module_change_subscribe(session, "ietf-interfaces","/ietf-interfaces:interfaces", ietf_interface_ipv46_address_change_cb, NULL, 99, SR_SUBSCR_CTX_REUSE | SR_SUBSCR_ENABLED, subscription); @@ -579,9 +580,9 @@ int ietf_subscribe_events(sr_session_ctx_t *session, goto error; } - rc = sr_module_change_subscribe(session, "ietf-interfaces","/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/address", ietf_interface_ipv46_address_change_cb, - NULL, - 98, SR_SUBSCR_CTX_REUSE | SR_SUBSCR_ENABLED, subscription); + //rc = sr_module_change_subscribe(session, "ietf-interfaces","/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/address", ietf_interface_ipv46_address_change_cb, + // NULL, + // 98, SR_SUBSCR_CTX_REUSE | SR_SUBSCR_ENABLED, subscription); if (rc != SR_ERR_OK) { SRP_LOG_DBGMSG("Problem in subscription /ietf-interfaces:interfaces/interface/ietf-ip:ipv6/address\n"); |