7. Relay Agent/Server Message Formats
7. Relay Agent/Server Message Formats
Relay agents exchange messages with servers to relay messages between clients and servers that are not attached to the same link.
All values in message headers and options are in network byte order.
Options are stored sequentially in the options field, with no padding between options. Options are byte-aligned, but are not aligned in any other way, such as on 2- or 4-byte boundaries.
There are two relay agent messages, which share the following format:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| msg-type | hop-count | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
| link-address |
| |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
| |
| peer-address |
| |
| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-|
| | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
. .
. options (variable number and length) .... .
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
The following sections describe the use of relay agent message headers.
7.1. Relay-forward Message
The following table defines the use of message fields in the Relay-forward message.
msg-type (message type)
RELAY-FORW
hop-count (hop count)
The number of relay agents that have relayed this message.
link-address (link address)
A global or site-local address that the server will use to identify the link on which the client is located.
peer-address (peer address)
The address of the client or relay agent from which the message to be relayed was received.
options (options)
MUST contain a "Relay Message option" (see section 22.10); may contain other options added by the relay agent.
7.2. Relay-reply Message
The following table defines the use of message fields in the Relay-reply message.
msg-type (message type)
RELAY-REPL
hop-count (hop count)
Copied from the Relay-forward message
link-address (link address)
Copied from the Relay-forward message
peer-address (peer address)
Copied from the Relay-forward message
options (options)
MUST contain a "Relay Message option"; see section 22.10; may contain other options