2. General Description
The Host Monitoring Protocol is a transaction-oriented (i.e., connection-less) transport protocol. It was designed to facilitate certain simple interactions between two internet entities, one of which may be considered to be "monitoring" the other. (In discussing the protocol we will sometimes speak of a "monitoring host" and a "monitored entity".) HMP was intended to be a useful transport protocol for applications that involve any or all of the following three different kinds of interactions:
-
The monitored entity sometimes needs to send unsolicited datagrams to the monitoring host. The monitoring host should be able to tell when messages from the monitored entity have been lost in transit, and it should be able to determine the order in which the messages were sent, but the application does not require that all messages be received or that they be received strictly in the same sequence in which they were sent.
-
The monitoring host needs to gather data from the monitored entity by using a query-response protocol at the application level. It is important to be able to determine which query is being answered by a particular response, and to determine whether successive responses are duplicates of previous ones.
-
The monitoring host must be able to initiate certain control functions in the monitored entity, possibly including the setting of parameters in the monitored entity. The monitoring host needs to know if the control function has been carried out.
In addition, we assume that a given monitoring host may be monitoring several different types of entities simultaneously, and may be gathering several different types of data from a given type of monitored entity. Several different monitoring hosts may be monitoring a given entity, and several processes on the same host may even be monitoring the same entity.
Messages from the monitoring host to the monitored entity are called "polls". They need to contain enough information to allow the monitored entity to make the following determinations:
-
The monitored entity must be able to determine that this message is in fact a poll from a monitoring host. The "system type," "message type," and "password" fields in the HMP header have been defined to meet this need.
-
The monitored entity may need to be able to identify the particular process on the monitoring host that sent this poll, so it can send its response back to the right process. The "port number" field in the HMP header has been defined to meet this need.
-
The monitored entity must be able to indicate to the monitoring host, in its response, precisely which query is being answered by a particular response. The "sequence number field" has been defined to meet this need.
-
The monitored entity must be able to determine just what kind of action the monitoring host is requesting. That is, the HMP transport protocol must provide some way of multiplexing and demultiplexing the various higher-level applications which use it. The "R-message type" and "R-subtype" fields of the polling message have been defined to meet this need.
Messages from the monitored entity to the monitoring host need to contain enough information to enable the monitoring host to make the following determination:
-
The monitoring host must be able to route this message to the correct process. The "port number" field meets this need.
-
The monitoring host must be able to match up received messages with the polls, if any, that elicited them. The "returned sequence number" field in the HMP header has been defined to meet this need.
-
The monitoring host must be able to determine which higher level application should receive a particular message. The "system type" and "message type" fields are used for this purpose.
-
The monitoring host must be able to determine whether some messages of a given type were lost in transit, and whether messages have arrived out of sequence. Although this function, strictly speaking, belongs to the application and not to the transport layer, the HMP header contains a "sequence number" for this purpose.
In addition, a simple one's complement checksum is provided in the HMP header to detect data corruption during transmission.