RouterDiscovery
Introduction
The RouterDiscovery module implements RFC1256 Router Discovery for multiple interfaces as hosts or routers. The action of the RouterDiscovery must be triggered by the user in order to be used. It is expected that address configuration clients will perform this trigger when appropriate. ZeroConf would be expected to trigger RouterDiscovery if no other address has been configured. DHCP would be expected to trigger RouterDiscovery if the relevant options are returned in the DHCP packets from the configuration server.
The module will monitor interface changes and resend solicitations or advertisements as appropriate. Non-availability of the router system is not currently checked for.
Multiple interfaces are supported.
SWIs
RouterDiscovery_Control (&57D80)
On entry
R0 = control operation
0 = activate Host mode for interface
1 = activate Router mode for interface
2 = deactivate interface
Other registers dependent on operation
This SWI is used to control the operation of the RouterDiscovery module.
RouterDiscovery_Control 0
On entry
R0 = 0 (activate 'Host' mode for interface)
R1 = pointer to interface name
R2 = address to use for solicitations :
0 to use appropriate address based on interface
&FFFFFFFF to use broadcast address
&E0000002 to use 'all routers' multicast group
This SWI is used to allow the RouterDiscovery module to control the operation of an interface as a Host. Solicitations will be sent when the interface changes state and a default route will be configured based on those addresses.
Interface names will not be validated, allowing the interfaces to become available at a future point. Absent interfaces will cause the module to become quiescent until the interfaces become available.
RouterDiscovery_Control 1
On entry
R0 = 1 (activate 'Router' mode for interface)
R1 = pointer to interface name
R2 = address to use for advertisements :
0 to use appropriate address based on interface
&FFFFFFFF to use broadcast address
&E0000001 to use 'all hosts' multicast group
R3 = minimum advertisement interval in seconds, or 0 for default
R4 = minimum advertisement interval in seconds, or 0 for default
R5 = pointer to a list of router/preference pairs, terminated by a 0 word.
A null pointer will mean that the address of the interface will be used,
however the interface must be present for this to function.
This SWI is used to allow the RouterDiscovery module to issue advertisements of router addresses on an interface. Advertisements will be sent regularly, as specified, or when the interface changes state.
Interface names will not be validated unless the pointer in R5 is 0. Absent interfaces will cause the module to become quiescent until the interfaces become available.
RouterDiscovery_Control 0
On entry
R0 = 2 (deactivate control of interface)
R1 = pointer to interface name
This SWI is used to stop an interface being monitored by the RouterDiscovery module.
An interface being killed will not implicitly cause this to happen in order that interfaces can be restarted without affecting the operation of RouterDiscovery.
RouterDiscovery_Status (&57D81)
On entry
R0 = operation code, none defined
This SWI is not implemented.
Services
Service_InternetStatus &40 (Service Call &B0)
On entry
R0 = &40 (subreason code)
R1 = &B0 (reason code)
R2 = new state (0 = ending monitoring,
1 = starting soliciting,
2 = starting monitoring)
R3 = pointer to interface name
On exit
R0-R3 preserved
This service call is issued by the RouterDiscovery module when it starts monitoring an interface for router advertisement packets. The module will start by issuing solicitations. Once an advertisement is received the module will modify the default route appropriately.
This service should never be claimed.
Service_InternetStatus &41 (Service Call &B0)
On entry
R0 = &41 (subreason code)
R1 = &B0 (reason code)
R2 = new state (0 = ending advertisements, 1 = starting advertisements)
R3 = pointer to interface name
R4 = number of routers being advertised
R5 = pointer to router/preference pairs for routers being advertised
On exit
R0-R5 preserved.
This service call is issued by the RouterDiscovery module when it starts issuing advertisements on an interface. The module will initially issue a few advertisements, before settling into a much more leisurely advertisement every 10 minutes. If a solicitation is received from a host, an advertisement will be made.
This service should never be claimed.
Service_InternetStatus &42 (Service Call &B0)
On entry
R0 = &42 (subreason code)
R1 = &B0 (reason code)
R2 = pointer to interface name
R3 = IP address of gateway through which packets will be routed,
or 0 if the default route has been deleted due to non-responsiveness.
On exit
R0-R5 preserved.
This service call is issued by the RouterDiscovery module when it changes the default route based on information provided from RouterDiscovery operations.
This service should never be claimed.
|