7. Relay Agent/Server Message Formats
-
Relay Agent/Server Message Formats
Relay agents exchange messages with servers to relay messages between clients and servers that are not connected to the same link.
All values in the message header and in options are in network byte order.
Options are stored serially in the options field, with no padding between the 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 the Relay Agent message header.
7.1. Relay-forward Message
The following table defines the use of message fields in a Relay- forward message.
msg-type RELAY-FORW
hop-count Number of relay agents that have relayed this
message.
link-address A global or site-local address that will be used by
the server to identify the link on which the client
is located.
peer-address The address of the client or relay agent from which
the message to be relayed was received.
options MUST include a "Relay Message option" (see
section 22.10); MAY include other options added by
the relay agent.
7.2. Relay-reply Message
The following table defines the use of message fields in a Relay-reply message.
msg-type RELAY-REPL
hop-count Copied from the Relay-forward message
link-address Copied from the Relay-forward message
peer-address Copied from the Relay-forward message
options MUST include a "Relay Message option"; see
section 22.10; MAY include other options