+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* This is an implementation of Segment Routing for IS-IS as per RFC 8667
*
*
* Author: Olivier Dugeon <olivier.dugeon@orange.com>
* Contributor: Renato Westphal <renato@opensourcerouting.org> for NetDEF
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <zebra.h>
if (!cap)
continue;
- ttable_add_row(
- tt, "%s|%u - %u|%u - %u|%s|%u",
- sysid_print(lsp->hdr.lsp_id), cap->srgb.lower_bound,
- cap->srgb.lower_bound + cap->srgb.range_size - 1,
- cap->srlb.lower_bound,
- cap->srlb.lower_bound + cap->srlb.range_size - 1,
- cap->algo[0] == SR_ALGORITHM_SPF ? "SPF" : "S-SPF",
- cap->msd);
+ ttable_add_row(tt, "%pSY|%u - %u|%u - %u|%s|%u",
+ lsp->hdr.lsp_id, cap->srgb.lower_bound,
+ cap->srgb.lower_bound + cap->srgb.range_size - 1,
+ cap->srlb.lower_bound,
+ cap->srlb.lower_bound + cap->srlb.range_size - 1,
+ cap->algo[0] == SR_ALGORITHM_SPF ? "SPF"
+ : "S-SPF",
+ cap->msd);
}
/* Dump the generated table. */
*
* @return 1 on success
*/
-static void sr_start_label_manager(struct thread *start)
+static void sr_start_label_manager(struct event *start)
{
struct isis_area *area;
- area = THREAD_ARG(start);
+ area = EVENT_ARG(start);
/* re-attempt to start SR & Label Manager connection */
isis_sr_start(area);
if (!isis_zebra_label_manager_ready())
if (isis_zebra_label_manager_connect() < 0) {
/* Re-attempt to connect to Label Manager in 1 sec. */
- thread_add_timer(master, sr_start_label_manager, area,
- 1, &srdb->t_start_lm);
+ event_add_timer(master, sr_start_label_manager, area, 1,
+ &srdb->t_start_lm);
return -1;
}
area->area_tag);
/* Disable any re-attempt to connect to Label Manager */
- THREAD_OFF(srdb->t_start_lm);
+ EVENT_OFF(srdb->t_start_lm);
/* Uninstall all local Adjacency-SIDs. */
for (ALL_LIST_ELEMENTS(area->srdb.adj_sids, node, nnode, sra))