HTCP/0.0 defines five opcodes: NOP, TST, MON, SET, and CLR. Note that ICP has different opcodes for queries and replies—for example, ICP_OP_QUERY and ICP_OP_MISS. HTCP, however, uses the same opcode for both messages. The previously described RR flag indicates whether a given message is a request or a response. The following sections describe each opcode, including how each one uses the OP-DATA field.
The NOP (null operation) opcode is similar to an ICMP echo or a “ping” message. It can be used to measure network delays between caches, as well as simply to find out if they are alive.
There is no OP-DATA for either NOP queries or responses, and the RESPONSE code is always zero.
The TST (test) opcode is similar to the ICP query operation. It tests for the existence of a cached response in a neighbor cache.
For a TST request, the OP-DATA is a SPECIFIER. Recall
that a SPECIFIER includes the HTTP request method, URI,
HTTP version, and the client’s request headers. The
request headers are important because the client may
have certain freshness requirements (
Table D-2 shows the RESPONSE codes defined for a TST response when F1 is not set.
Table D-2. HTCP TST Response Codes
|0||Entity is present in responder’s cache.|
|1||Entity is not present in responder’s cache.|
Note that the RESPONSE code indicates only the presence or absence of the object and says nothing about its freshness. If the cached object ...