|HTCP, Hyper Text Caching Protocol|
|Protocol type:||Application layer protocol.|
|Ports:||4827 (TCP, UDP).|
HTCP is a protocol for discovering HTTP caches and cached data, managing sets of HTTP caches, and monitoring cache activity.
Implementation over UDP is mandatory, TCP is optional.
|MAC header||IP header||TCP | UDP header||HTCP message|
|Major version||Minor version|
|Op data :::|
|Key name :::|
The length, inclusive of all header and data bytes, including this field. This field will be equal to the datagram payload size if a datagram protocol is in use, and can include padding.
The major version number of this protocol. The DATA section of an HTCP message need not be upward or downward compatible between different major version numbers.
The minor version number of this protocol. Feature levels and interpretation rules can vary depending on this field, in particular reserved fields can take on new (though optional) meaning in successive minor version numbers within the same major version number.
First field in the Data section. The number of bytes of the message which are reserved for the Data section, including the Data length field itself. This number can include padding, i.e., not all octets reserved by Data length need be used in Op data.
Opcode. 4 bits.
The operation code of an HTCP transaction. An HTCP transaction can consist of multiple HTCP messages, e.g., a request (sent by the initiator), or a response (sent by the responder).
Transaction reply code. It should be set to zero by requestors and ignored by responders. Each operation has its own set of response codes. The following response codes all indicate errors and all depend for their visibility on MO=1
|0||Authentication wasn't used but is required.|
|1||Authentication was used but unsatisfactorily.|
|2||Opcode not implemented.|
|3||Major version not supported.|
|4||Minor version not supported, major version is ok.|
|5||Inappropriate, disallowed, or undesirable opcode.|
reserved. 6 bits.
F1, RD/MO (Response Desired/Message Overall).
A multiplexed bit.
|0||Response not desired.|
|1||Response is desired.|
|0||Response is to be interpreted as a response to fields in the Op data.|
|1||Response is to be interpreted as a response to the overall message (fixed fields in DATA or any field of AUTH).|
RR, Request/Response. 1 bit.
|0||Request message. Interpret the F1 bit as RD.|
|1||Response message. Interpret the F1 bit as MO|
The combination of this field and the initiator's network address uniquely identifies this HTCP transaction. Care should be taken not to reuse Trans IDs within the life-time of a UDP datagram.
Meaning depends on the value of Opcode.
Auth length. 16 bits.
First field in the Auth section. The number of bytes used by the Auth section, including the Auth length field itself. If the optional Auth section is not being transmitted, this field should be set to 2. Auth length can include padding, which means that not all bytes reserved by this field will necessarily be consumed by Signature.
Sig time. 32 bits, unsigned.
The number of seconds since 00:00:00 1-Jan-70 UTC when the Signature was generated.
Sig expire. 32 bits, unsigned.
The number of seconds since 00:00:00 1-Jan-70 UTC when the Signature will expire.
Key name. Variable length.
Specifies the name of a shared secret.
Holds the HMAC-MD5 digest with a B value of 64, of the following elements, each of which is digested in its "on the wire" format, including transmitted padding if any is covered by a field's associated LENGTH
[RFC 2756] Hyper Text Caching Protocol (HTCP/0.0).