Exemple #1
0
static void do_test(struct bgp_table *table, const char *prefix,
		    uint32_t maxlen, ...)
{
	va_list arglist;
	struct list *list = list_new();
	struct prefix p;

	list->del = (void (*)(void *))bgp_unlock_node;

	va_start(arglist, maxlen);
	printf("\nDoing lookup for %s-%d\n", prefix, maxlen);
	if (str2prefix(prefix, &p) <= 0)
		assert(0);
	bgp_table_range_lookup(table, &p, maxlen, list);
	print_range_result(list);

	check_lookup_result(list, arglist);

	list_delete_and_null(&list);

	va_end(arglist);

	printf("Checks successfull\n");
}
Exemple #2
0
void pim_ssmpingd_destroy(struct pim_instance *pim)
{
	if (pim->ssmpingd_list)
		list_delete_and_null(&pim->ssmpingd_list);
}