Skip to main content

pamoja_router_cost

Function pamoja_router_cost 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_router_cost( router: *const PamojaRouter, dst: u32, out_cost: *mut u16, ) -> bool
Expand description

Returns what the known route to a node costs.

§Arguments

  • router - the routing table.
  • dst - the node to reach.
  • out_cost - receives the cost.

§Returns

true when a route is known, with *out_cost written, or false otherwise.

§Safety

router must be a live handle from pamoja_router_new, or null, and out_cost must point to a writable uint16_t.