]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
adding
authorwessels <>
Thu, 5 Mar 1998 13:01:28 +0000 (13:01 +0000)
committerwessels <>
Thu, 5 Mar 1998 13:01:28 +0000 (13:01 +0000)
src/htcp.cc [new file with mode: 0644]

diff --git a/src/htcp.cc b/src/htcp.cc
new file mode 100644 (file)
index 0000000..6aaa3b9
--- /dev/null
@@ -0,0 +1,86 @@
+#include "squid.h"
+
+typedef struct _Countstr Countstr;
+typedef struct _htcpHeader htcpHeader;
+typedef struct _htcpDataHeader htcpDataHeader;
+typedef struct _htcpAuthHeader htcpAuthHeader;
+
+struct _Countstr {
+       u_short length;
+       char *text;
+};
+
+struct _htcpHeader {
+       u_short length;
+       u_char major;
+       u_char minor;
+};
+
+struct _htcpDataHeader {
+       u_short length; 
+       u_char opcode:4;
+       u_char response:4;
+       u_char reserved:6;
+       u_char F1:1;
+               /* RR == 0 --> F1 = RESPONSE DESIRED FLAG */
+               /* RR == 1 --> F1 = MESSAGE OVERALL FLAG */
+       u_char RR:1;
+               /* RR == 0 --> REQUEST */
+               /* RR == 1 --> RESPONSE */
+       u_num32 msg_id;
+};
+
+struct _htcpAuthHeader {
+       u_short length;
+       time_t sig_time;
+       time_t sig_expire;
+       Countstr key_name;
+       Countstr signature;
+};
+
+struct _Specifier {
+       Countstr method;
+       Countstr URI;
+       Countstr version;
+       Countstr req_hdrs;
+};
+
+struct _Detail {
+       Countstr resp_hdrs;
+       Countstr entity_hdrs;
+       Countstr cache_hdrs;
+};
+
+struct _Identity {
+       Specifier specifier;
+       Detail detail;
+};
+
+enum {
+       HTCP_NOP,
+       HTCP_TST,
+       HTCP_MON,
+       HTCP_SET,
+       HTCP_CLR
+};
+
+/*
+ * values for htcpDataHeader->response
+ */
+enum {
+       AUTH_REQUIRED,
+       AUTH_FAILURE,
+       OPCODE_UNIMPLEMENTED,
+       MAJOR_VERSION_UNSUPPORTED,
+       MINOR_VERSION_UNSUPPORTED,
+       INVALID_OPCODE
+};
+
+/*
+ * values for htcpDataHeader->RR
+ */
+enum {
+       RR_REQUEST,
+       RR_RESPONSE
+};
+