The DHCPClient module provides an implementation of the 'Dynamic Host Configuration Protocol'. This allows a server to allocate addresses to a client based on its internal ethernet 'MAC' address.
The module is able to control multiple interfaces simultaneously. Information about the DHCP configuration process is recorded to the DHCP log.
R0 | = | 4 (sub-reason code> |
R1 | = | &B0 (reason code) |
R2 | = | Pointer to zero-terminated interface name |
R3 | = | Pointer to Device Information Block for interface |
R4 | = | Pointer to BootP/DHCP reply message buffer |
R5 | = | Size of BootP/DHCP reply |
R0 | preserved | |
R1 | = | 0 to claim service, else preserved |
R2-5 | preserved |
This service call is issued by the Internet module (version 5.28 or later) when a BOOTP/DHCP reply is received. Clients may inspect the contents of the buffer to extract any configuration information.
If you want to alter information in the buffer you may do so, but you must then claim the service call by setting R1 to zero on exit. If the service call is claimed the Internet module will reprocess the buffer as if it had just arrived from the network. Another Service_InternetStatus 4 will arrive in due course.
You should not normally claim this service call.
R0 | = | 5 (sub-reason code> |
R1 | = | &B0 (reason code) |
R2 | = | Pointer to zero-terminated interface name |
R3 | = | Pointer to Device Information Block for interface |
R4 | = | Pointer to DHCPOFFER message buffer |
R5 | = | Size of DHCPOFFER message |
R0 | preserved | |
R1 | = | 0 to claim service, else preserved |
R2-5 | preserved |
This service call is issued by the DHCPClient module whenever it receives an offer of an IP address lease which is better than its current best choice (or if it is the first acceptable offer). You may inspect the buffer, but it must not be modified.
If clients choose to retain information about offers they MUST use the value of OPTION_SERVERIDENTIFIER as an opaque key to identify which offer has been chosen.
If you claim this service the DHCPClient module will not accept the offer, but will wait for another offer to be made.
You should not normally claim this service call.
R0 | = | 48 (sub-reason code> |
R1 | = | &B0 (reason code) |
R2 | = | Pointer to zero-terminated interface name |
R3 | = | IP address assigned to interface |
R0-3 | preserved |
This service call is issued by the DHCPClient module (after 0.37) when it has successfully configured an interface with an address leased from a DHCP server. If the interface is reconfigured, the server releases the lease, the server fails to renew the lease, a duplicate address is identified, or the network stack is stopped, the lease will be lost and InternetStatus_DHCPLeaseLost will be issued. This service will not be reissued for renewals of the lease.
This service should never be claimed.
R0 | = | 49 (sub-reason code> |
R1 | = | &B0 (reason code) |
R2 | = | Pointer to zero-terminated interface name |
R3 | = | IP address that was assigned to interface |
R0-3 | preserved |
This service call is issued by the DHCPClient module (after 0.37) when it has lost the DHCP server leased address allocated to an interface. A new address may be established by the DHCPClient if the server responds, or the interface may be manually reconfigured (however, this service may have been issued because of a manual reconfiguration). See Service_InternetStatus 48 for details of circumstances in which this service will be issued.
This service should never be claimed.
R0 | = | Reason code:
| ||||||||
R1 | = | Pointer to zero-terminated interface name |
R0-1 | preserved |
This SWI is used to add or remove an interface from the DHCPClient's control. Once placed under the control of the DHCPClient the interface will continue to operate according to the DHCP protocol until either the interface is configured manually or it is removed from the module's control by being reconfigured.
R0 | = | Pointer to zero-terminated interface name | ||||||||||||||||||||||||||||||||||||||||||||||
R1 | = | Pointer to a list of information types as words, terminated by -1. Information types:
| ||||||||||||||||||||||||||||||||||||||||||||||
R2 | = | Pointer to buffer for returned data | ||||||||||||||||||||||||||||||||||||||||||||||
R3 | = | Size of the output buffer |
R0 | preserved | |
R1 | = | Pointer to invalid option, or -1 if all types are valid |
R2 | = | Pointer to first free byte in the output block |
R3 | = | Space left, or negative space needed if data would not fit |
This SWI is used to read the current DHCP client state for an interface. R1 points to a list of types which will be returned in the output buffer in the order in which they were supplied. If the block was not large enough, a 'Buffer overflow' error will be returned, with R3 set to the -ve size required. If the type of information requested was invalid, an error will return and R1 will point to the invalid entry.
R0 | = | Pointer to zero-terminated interface name of the last interface, or 0 initially |
R1 | = | Pointer to buffer for returned data |
R2 | = | Size of the output buffer |
R0 | = | Number of state transitions |
R1 | = | pointer to buffer on entry, or 0 if no interfaces remain |
R2 | = | Space left, or negative space needed if data would not fit |
This SWI enumerates the interfaces under DHCPClient control.
*DHCP
[-+]
<interface>
<interface> | - | Name of the interface to change management of. |
This command is used to control whether the DHCPClient module will configure the network automatically using the DHCP protocol.
If no prefix is applied to the interface name the interface will be added to the list of those controlled by the DHCP module.
If a '-' prefix is used, the interface name will be removed from those controlled by the DHCP module and any address which is in use will be removed.
If a '+' prefix is used, an existing DHCP lease on that interface will be renewed, or a new attempt to obtain a lease will be made.
*DHCP eh0
*DHCPStatus
This command is used to display information about interfaces controlled by the DHCPClient module.
*DHCP eh0
Maintainer(s): | Gerph <gerph@gerph.org> | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
History: |
| ||||||||||||
Related: | http://www.riscos.com/support/developers/riscos6/networking/dhcpclient.html | ||||||||||||
Disclaimer: |
© Gerph, 2021. |