Files | |
file | fip_route6.c |
IPv6 Routing Functions. | |
Functions | |
fip_return_t | fip_route6_addRoute (const unsigned char route[], unsigned char routeLen, unsigned char metric, fip_ifnum_t interface, fip_vlifetime_t lifetime, const fip_ip6addr_t *const nextHop, fip_bool_t advRoute) |
Add a route to the route table, does not check if entry exists already. | |
fip_route6_searchStatus_t | fip_route6_findRouteByDestination (const unsigned char *route, unsigned char routeLen) |
Find an exact entry in the routing table, used to delete/modify that entry. | |
fip_route6_searchStatus_t | fip_route6_findRouteByNextHop (const fip_ip6addr_t *const nextHop) |
Find an exact entry in the routing table, used to delete/modify that entry. | |
fip_ds6_searchStatus_t | fip_route6_findBestRoute (const fip_ip6addr_t *const destination) |
Find the best route for the destination. | |
const fip_ip6addr_t * | fip_route6_getNextHop (void) |
ONLY called for unicast! | |
void | fip_route6_process (void) |
IPv6 Packet is not actually destined to use, BUT we have forwarding enabled. |
fip_return_t fip_route6_addRoute | ( | const unsigned char | route[], | |
unsigned char | routeLen, | |||
unsigned char | metric, | |||
fip_ifnum_t | interface, | |||
fip_vlifetime_t | lifetime, | |||
const fip_ip6addr_t *const | nextHop, | |||
fip_bool_t | advRoute | |||
) |
Add a route to the route table, does not check if entry exists already.
route | The destination of the route, for example 2001:1:2:: | |
routeLen | The length in bits that 'route' is valid for | |
metric | The route metric | |
interface | Interface on which the next hop is located | |
lifetime | Lifetime of the route, 0xffffffff or 0 are both infinite. | |
nextHop | The next-hop IP address | |
advRoute | For routers only, flag to indicate it route is advertised |
RV_OK | if added OK | |
RV_PARAMETER_RROR | if parameter had a fault | |
RV_MEMORY_ERROR | if routing table is full |
References fip_ip6addr_t::addr, fip_myip6route_t::advRoute, fip_myip6route_t::expireTime32S, fip_ip6addr_cpy, fip_memcpy_ucharLen, fip_myip6route_t::interfaceNext, fip_myip6route_t::length, fip_myip6route_t::metric, ROUTE_UNUSED, ROUTE_USED, RV_MEMORY_ERROR, RV_OK, RV_PARAMETER_ERROR, fip_myip6route_t::state, and fip_myip6route_t::validLifetime.
Referenced by fip_console_route().
fip_ds6_searchStatus_t fip_route6_findBestRoute | ( | const fip_ip6addr_t *const | destination | ) |
Find the best route for the destination.
destination | IP Address |
References fip_ip6addr_t::addr, fip_ds6_searchStatus_t::index, fip_ds6_searchStatus_t::itemFound, fip_myip6route_t::length, and ROUTE_UNUSED.
Referenced by fip_route6_getNextHop().
fip_route6_searchStatus_t fip_route6_findRouteByDestination | ( | const unsigned char * | route, | |
unsigned char | routeLen | |||
) |
Find an exact entry in the routing table, used to delete/modify that entry.
route | The destination of the route, for example 2001:1:2:: | |
routeLen | The length in bits that route is valid for |
References fip_ds6_searchStatus_t::index, fip_ds6_searchStatus_t::itemFound, and ROUTE_UNUSED.
fip_route6_searchStatus_t fip_route6_findRouteByNextHop | ( | const fip_ip6addr_t *const | nextHop | ) |
Find an exact entry in the routing table, used to delete/modify that entry.
nextHop | next hop IP Address |
References fip_ip6addr_t::addr, and fip_ds6_searchList().
const fip_ip6addr_t* fip_route6_getNextHop | ( | void | ) |
ONLY called for unicast!
FIXME
References fip_ip6addr_t::addr, fip_if6_isDestMyUnicast(), fip_memcpy_ucharLen, fip_nd6_neighbourCache_lookupByIp(), fip_packet_activeDrop(), fip_packet_getAttr, fip_packet_getFromIP6Hdr_destPtr, fip_packet_getFromIP6Hdr_isDestLinkLocal, fip_packet_setAttr, fip_packet_setLLDestAddr, fip_route6_findBestRoute(), fip_ds6_searchStatus_t::index, fip_myip6route_t::interfaceNext, fip_ds6_searchStatus_t::itemFound, fip_myip6route_t::nextHop, PS_PROCESSIP, RV_OK, and TRACE.
Referenced by fip_ip_send().