Route Control Object
A-48
Route has been Redirected
MSG_RTC_REDIRECT
Parameter(s)
Param1 = Route IP
Param2 = New Destination Gateway IP
Description
Called when an ICMP redirect message is received for a given IP host ad-
dress. Since the invention of classless subnets, all redirects are treated as
HOST redirects. If the stack is configured to generate redirect routes automati-
cally (will do so by default), this message will occur after the new static host
redirect route has been created (which will also generate a MSG_RTC_NEW
message). If the stack does not create the redirect route, this message occurs
before the socket layer is notified so that if a new route is created as a result
of this message, the sockets layer will find it.
A Duplicate IP Address has been Detected in the System
MSG_RTC_DUPIP
Parameter(s)
Param1 = Duplicated IP
Param2 = Pointer to 6 byte MAC address of offending device
Description
Called when an ARP packet is received from a device that has an IP address
which is the same as the IP address of the stack on that physical interface. De-
pending on the age of the address, the application may wish to destroy the
binding.
A.12.3 Access Functions
Hook RTC Messages
RTCAddHook
Syntax
uint RTCAddHook ( void (*pfn)( uint, UINT32, UINT32 ) );
Return Value
1 if the hook was installed, or NULL on an error (too many hooks).
Description
Called to hook a message function to receive route control messages. The ar-
gument is a pointer to a message function of the type:
void MyMsgFun( uint Msg, UINT32 Param1, UINT32 Param2 );
The function returns 1 if the hook was installed, or NULL if not.
Note that the supplied callback function is called from within an llExit() / llEnt-
er() pair, and thus may call the stack API directly, but may not call any applica-
tions API functions, like sockets functions. If such action is required, the call-
back function may call llExit() when called and then llEnter() before returning.
When the hook is no longer required, the function may be unhooked by calling
RTCRemoveHook().