Routing table
File: csp/csp_rtable.h
Description: Routing table. The routing table maps a CSP destination address to an interface (and optional a via address). Normal routing: If the route’s via address is set to #CSP_NO_VIA_ADDRESS, the packet will be sent directly to the destination address specified in the CSP header, otherwise the packet will be sent the to the route’s via address.
Interface Functions
-
csp_route_t *csp_rtable_search_backward(csp_route_t *start_route)
[source] Loop through routes backwards and find routes that match on addr and mask from start_route
-
int csp_rtable_set(uint16_t dest_address, int netmask, csp_iface_t *ifc, uint16_t via)
[source] Set route to destination address/node.
- Parameters:
dest_address – destination address.
netmask – number of bits in netmask (set to -1 for maximum number of bits)
ifc – interface.
via – assosicated via address.
- Returns:
#CSP_ERR_NONE on success, or an error code.