prg_djk_next_hops_get()
Abstract
Given a vertex and a destination vertex, returns the set of next hop edges to take in order to get to the destination vertex along the shortest path.
Syntax
prg_djk_next_hops_get (src_vertex_ptr, dest_vertex_ptr)
| Argument | Type | Description |
|---|---|---|
src_vertex_ptr |
PrgT_Graph_Vertex * |
The source vertex of interest. |
dest_vertex_ptr |
PrgT_Graph_Vertex * |
The destination vertex that one would like to get to. |
Return Type
PrgT_Vector *
Vector of PrgT_Graph_Edge* edges that are next hops from this src_vertex_ptr to the dest_vertex_ptr. The vector is owned by the caller and must be destroyed using prg_vector_destroy (hops_vptr, 0).
Header
prg_djk.h
Details
Returns a vector of PrgT_Graph_Edge* elements, where each element is a possible interface to take in order to get to the destination along the shortest path. There can be more than one element if there is more than one shortest path to the destination from the source.
This function can be called only if a routing table exists at the src_vertex_ptr. The routing table is built up either by calling prg_djk_single_source_compute() or prg_djk_all_sources_compute().
It is the caller’s responsibility to deallocate the return value when it is not needed.