Revision: 14746
Author: adrian.chadd
Date: Thu Aug 5 05:25:41 2010
Log: Commit the pre-requisite work for logging the client TOS.
Right now client TOS is only set via the ZPH code.
This patch doesn't actually implement the _TOS_ logging itself,
so the TOS logging will always be 0 for now. Adding in the TOS
bit setting will be done in a future commit.
http://code.google.com/p/lusca-cache/source/detail?r=14746
Modified:
/branches/LUSCA_HEAD/src/access_log.c
/branches/LUSCA_HEAD/src/cf.data.pre
/branches/LUSCA_HEAD/src/client_side.c
/branches/LUSCA_HEAD/src/structs.h
=======================================
--- /branches/LUSCA_HEAD/src/access_log.c Mon Jul 12 01:02:49 2010
+++ /branches/LUSCA_HEAD/src/access_log.c Thu Aug 5 05:25:41 2010
@@ -323,6 +323,8 @@
LFT_EXT_FRESHNESS,
+ LFT_CLIENT_TOS,
+
LFT_PERCENT /* special string cases for escaped
chars */
} logformat_bcode_t;
@@ -436,6 +438,8 @@
{"ef", LFT_EXT_FRESHNESS},
+ {"ct", LFT_CLIENT_TOS},
+
{"%", LFT_PERCENT},
{NULL, LFT_NONE} /* this must be last */
@@ -722,6 +726,11 @@
quote = 1;
break;
+ case LFT_CLIENT_TOS:
+ outint = al->cache.client_tos;
+ doint = 1;
+ break;
+
case LFT_PERCENT:
out = "%";
break;
=======================================
--- /branches/LUSCA_HEAD/src/cf.data.pre Thu Mar 25 07:25:33 2010
+++ /branches/LUSCA_HEAD/src/cf.data.pre Thu Aug 5 05:25:41 2010
@@ -2345,6 +2345,11 @@
>st Request size including HTTP headers
st Request+Reply size including HTTP headers
sn Unique sequence number per log line entry
+ ct The client-facing TOS set by ZPH/TOS-map rules -
+ _NOT_ the TOS of the incoming connection itself.
+ This value is an integer, not a hex value.
+ It also defaults to "0" in the case where
ZPH/TOS-map
+ has not over-ridden the value.
% a literal % character
The default formats available (which do not need re-defining) are:
=======================================
--- /branches/LUSCA_HEAD/src/client_side.c Thu Jul 8 00:22:01 2010
+++ /branches/LUSCA_HEAD/src/client_side.c Thu Aug 5 05:25:41 2010
@@ -285,6 +285,7 @@
http->al.cache.code = http->log_type;
http->al.cache.msec = tvSubMsec(http->start, current_time);
http->al.cache.rq_size = http->req_sz;
+ http->al.cache.client_tos = http->client_tos;
if (request) {
http->al.cache.rq_size += request->content_length;
if (Config.onoff.log_mime_hdrs) {
=======================================
--- /branches/LUSCA_HEAD/src/structs.h Wed Apr 21 07:10:06 2010
+++ /branches/LUSCA_HEAD/src/structs.h Thu Aug 5 05:25:41 2010
@@ -950,6 +950,7 @@
#if USE_SSL
const char *ssluser;
#endif
+ int client_tos;
} cache;
struct {
char *request;
@@ -1016,6 +1017,7 @@
ushort delayAssignedPool;
mem_node_ref nr;
int is_modified;
+ int client_tos;
};
struct _ConnStateData {
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.