RouterDiscovery


Contents


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.


Service calls


Service_InternetStatus &40
(Service &B0)

RouterDiscovery has changed its host behaviour for an interface
On entry
R0=&40 (sub-reason code)
R1=&B0 (reason code)
R2=

New state:

ValueMeaning
0No longer monitoring interface
1Starting soliciting on interface
2Starting monitoring interface

R3=Pointer to zero terminated interface name
On exit
R1-3preserved
Use

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.

Related APIs
None

Service_InternetStatus &41
(Service &B0)

RouterDiscovery has changed its router behaviour for an interface
On entry
R0=&41 (sub-reason code)
R1=&B0 (reason code)
R2=

New state:

ValueMeaning
0Ending advertisements
1Starting advertisements

R3=Pointer to zero terminated interface name
R4=Number of routes being advertised
R5=Pointer to router/preference pairs for routers being advertised
On exit
R1-5preserved
Use

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.

Related APIs
None

Service_InternetStatus &42
(Service &B0)

RouterDiscovery has changed the route
On entry
R0=&42 (sub-reason code)
R1=&B0 (reason code)
R2=Pointer to zero terminated 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
R1-3preserved
Use

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.

Related APIs
None

SWI calls


RouterDiscovery_Control
(SWI &57D80)

Control the operation of the RouterDiscovery module
On entry
R0=

Reason code:

ValueMeaning
0Activate Host mode for the interface
1Activate Router mode for the interface
2Deactivate control of interface

On exit
None
Interrupts
Interrupts are undefined
Fast interrupts are enabled
Processor mode
Processor is in SVC mode
Re-entrancy
SWI is not re-entrant
Use

This SWI is used to control the operation of the RouterDiscovery module.

Related APIs
None

RouterDiscovery_Control 0
(SWI &57D80)

Activate Host mode for the interface
On entry
R0=0 (reason code)
R1=Pointer to zero terminated interface name to activate on
R2=

IPv4 Aaddress to use for solicitations or special value:

ValueMeaning
&0use appropriate address based on interface
&FFFFFFFFuse broadcast address
&E0000002use 'all routers' multicast group

On exit
None
Interrupts
Interrupts are undefined
Fast interrupts are enabled
Processor mode
Processor is in SVC mode
Re-entrancy
SWI is not re-entrant
Use

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.

Related SWIs
RouterDiscovery_Control 2

RouterDiscovery_Control 1
(SWI &57D80)

Activate Router mode for the interface
On entry
R0=1 (reason code)
R1=Pointer to zero terminated interface name to activate on
R2=

IPv4 Aaddress to use for advertisements or special value:

ValueMeaning
&0use appropriate address based on interface
&FFFFFFFFuse broadcast address
&E0000001use 'all hosts' multicast group

R3=Minimum advertisement interval in seconds, or 0 for default
R4=Maximum advertisement interval in seconds, or 0 for default
R5=pointer to a list of router/preference pairs, terminated by a 0 word. A pointer of 0 will mean that the address of the interface will be used, however the interface must be present for this to function.
On exit
None
Interrupts
Interrupts are undefined
Fast interrupts are enabled
Processor mode
Processor is in SVC mode
Re-entrancy
SWI is not re-entrant
Use

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.

Related SWIs
RouterDiscovery_Control 2

RouterDiscovery_Control 2
(SWI &57D80)

Deactivate control of interface
On entry
R0=2 (reason code)
R1=Pointer to zero terminated interface name to deactivate
On exit
None
Interrupts
Interrupts are undefined
Fast interrupts are enabled
Processor mode
Processor is in SVC mode
Re-entrancy
SWI is not re-entrant
Use

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.

Related SWIs
RouterDiscovery_Control 0, RouterDiscovery_Control 1

RouterDiscovery_Status
(SWI &57D81)

Return information about the RouterDiscovery module
On entry
R0=

Reason code (none defined)

On exit
None
Interrupts
Interrupts are undefined
Fast interrupts are enabled
Processor mode
Processor is in SVC mode
Re-entrancy
SWI is not re-entrant
Use

This SWI is not implemented.

Related APIs
None

Document information

Maintainer(s):
History:
RevisionDateAuthorChanges
12006GerphInitial version
  • Released as RISC OS Select documentation.
209 May 2022GerphPRM-in-XML conversion
  • Created from original documentation for RISC OS Select.
Related:http://www.riscos.com/support/developers/riscos6/networking/routerdiscovery.html
Disclaimer:

© Gerph, 2022.