49 uword li_next, li_prev;
103 index = src_node - g->
nodes;
124 if (!
unformat (input,
"%d%d%d", &l->src, &l->dst, &l->distance))
127 _vec_len (links) -= 1;
143 u32 node_index = va_arg (*args,
u32);
148 s =
format (s,
"%d", node_index);
167 s =
format (s,
"%U (%d), ",
#define pool_foreach(VAR, POOL)
Iterate through pool.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
static void graph_dir_free(graph_dir_t *d)
description fragment has unexpected format
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
#define pool_validate_index(v, i)
static graph_link_t * graph_dir_get_link_to_node(graph_dir_t *d, u32 node_index)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define pool_put(P, E)
Free an object E in pool P.
void graph_del_link(graph_t *g, u32 src, u32 dst)
static uword graph_dir_add_link(graph_dir_t *d, u32 node_index, u32 distance)
#define vec_free(V)
Free vector's memory (no header).
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
uword unformat_graph(unformat_input_t *input, va_list *args)
uword graph_del_node(graph_t *g, u32 src)
format_function_t * format_node
static void graph_dir_del_link(graph_dir_t *d, u32 node_index)
u32 graph_set_link(graph_t *g, u32 src, u32 dst, u32 distance)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u8 * format_graph_node(u8 *s, va_list *args)
u8 * format_graph(u8 *s, va_list *args)
#define vec_foreach(var, vec)
Vector iterator.
static uword pool_elts(void *v)
Number of active elements in a pool.