1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

Add timestamps to the 'SSH raw data' logging mode.

[originally from svn r9687]
This commit is contained in:
Simon Tatham 2012-10-10 18:32:23 +00:00
parent 8e56c52eaa
commit 36b8d450f0

View File

@ -258,8 +258,21 @@ void log_packet(void *handle, int direction, int type,
type, type, texttype);
}
} else {
logprintf(ctx, "%s raw data\r\n",
direction == PKT_INCOMING ? "Incoming" : "Outgoing");
/*
* Raw data is logged with a timestamp, so that it's possible
* to determine whether a mysterious delay occurred at the
* client or server end. (Timestamping the raw data avoids
* cluttering the normal case of only logging decrypted SSH
* messages, and also adds conceptual rigour in the case where
* an SSH message arrives in several pieces.)
*/
char buf[256];
struct tm tm;
tm = ltime();
strftime(buf, 24, "%Y-%m-%d %H:%M:%S", &tm);
logprintf(ctx, "%s raw data at %s\r\n",
direction == PKT_INCOMING ? "Incoming" : "Outgoing",
buf);
}
/*