Route Object
A-42
When there is more than one route with the same subnet mask, the following
matching guidelines are used (listed from BEST to WORST):
-
Route has a local destination (occurs with host addresses only).
-
Route has a gateway destination.
-
Route has a subnet destination on a connected interface
Sometimes a search is desired where particular matches are desired. The fol-
lowing flags can be combined with the value of CallFlags to change the behav-
ior of the seach:
FLG_RTF_CLONE
Clone a network route to a host route if host not
found
FLG_RTF_HOST
Find only non-gateway host routes
Set the Timeout for a Non-Static Route
RtSetTimeout
Syntax
void RtSetTimeout( HANLE hRt, UINT32 dwTimeOut );
Description
This call allows an application to specify that the stack should timeout a refer-
enced route. When the route is added to the timeout list, the system will add
a reference. Thus once the application sets the timeout value, it should call
RtDeRef() to dereference the route. The route will stay valid until the timeout
value is exceeded, after which it is dereferenced by the system. Note that if this
function is called and the route is not dereferenced by the caller, it will still be
removed from the system route table when the expiration time elapses, but the
object will not be freed.
Set the Timeout for a Non-Static Route
RtSetFailure
Syntax
void RtSetFailure( HANLE hRt, uint CallFlags, uint FailCode );
Call Flags
FLG_RTF_REPORT
Reports the status change of the route
(UP or DOWN)
Description
This call allows an application to specify a particular error with a route, or clear
a previously indicated error. Setting an error clears the FLG_RTE_UP bit in the
flags. When use of the route is attempted, the specified error is returned. De-
fined error codes for the FailCode argument are:
NULL
Route is operating normally (sets
FLG_RTE_UP flag)
RTC_HOSTDOWN
Host is down