mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 20:42:48 -05:00
Retired the #ifdef DUMP_PACKETS stuff in ssh.c because I'm utterly
sick of recompiling to enable packet dumps. SSH packet dumping is now provided as a logging option, and dumps to putty.log like all the other logging options. While I'm at it I cleaned up the format so that packet types are translated into strings for easy browsing. POSSIBLE SIDE EFFECT: in the course of this work I had to re-enable the SSH1 packet length checks which it turns out hadn't actually been active for some time, so it's possible things might break as a result. If need be I can always disable those checks for the 0.52 release and think about it more carefully later. [originally from svn r1493]
This commit is contained in:
10
putty.h
10
putty.h
@ -130,7 +130,8 @@ GLOBAL unsigned char unitab_ctrl[256];
|
||||
#define LGXF_ASK -1 /* existing logfile ask */
|
||||
#define LGTYP_NONE 0 /* logmode: no logging */
|
||||
#define LGTYP_ASCII 1 /* logmode: pure ascii */
|
||||
#define LGTYP_DEBUG 2 /* logmode: all chars of taffic */
|
||||
#define LGTYP_DEBUG 2 /* logmode: all chars of traffic */
|
||||
#define LGTYP_PACKETS 3 /* logmode: SSH data packets */
|
||||
GLOBAL char *logfile;
|
||||
|
||||
/*
|
||||
@ -485,6 +486,13 @@ void logfopen(void);
|
||||
void logfclose(void);
|
||||
void term_copyall(void);
|
||||
|
||||
/*
|
||||
* Exports from logging.c.
|
||||
*/
|
||||
void logtraffic(unsigned char c, int logmode);
|
||||
enum { PKT_INCOMING, PKT_OUTGOING };
|
||||
void log_packet(int direction, int type, char *texttype, void *data, int len);
|
||||
|
||||
/*
|
||||
* Exports from raw.c.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user