diff options
author | Matt Johnston <matt@ucc.asn.au> | 2008-09-14 06:47:51 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2008-09-14 06:47:51 +0000 |
commit | 1c72a35ddb79eede31657a450b8ba35aed24c79e (patch) | |
tree | e6f6ae8bac919e2696678d7a680dce410a1ea91a /session.h | |
parent | cdbe853595d1ba06be4127d86c60a9bc2e9e3545 (diff) | |
parent | 460bf4382257a262fda862f66d6fe97c749f5bb7 (diff) |
propagate from branch 'au.asn.ucc.matt.dropbear' (head f21045c791002d81fc6b8dde6537ea481e513eb2)
to branch 'au.asn.ucc.matt.dropbear.dbclient-netcat-alike' (head d1f69334581dc4c35f9ca16aa5355074c9dd315d)
--HG--
branch : dbclient-netcat-alike
extra : convert_revision : 22bbe895accc3995b48f07b556e45d546ff1ce5d
Diffstat (limited to 'session.h')
-rw-r--r-- | session.h | 28 |
1 files changed, 21 insertions, 7 deletions
@@ -45,6 +45,7 @@ void common_session_init(int sock, char* remotehost); void session_loop(void(*loophandler)()); void common_session_cleanup(); void session_identification(); +void send_msg_ignore(); /* Server */ @@ -81,13 +82,20 @@ struct key_context { }; +struct packetlist; +struct packetlist { + struct packetlist *next; + buffer * payload; +}; + struct sshsession { /* Is it a client or server? */ unsigned char isserver; - long connecttimeout; /* time to disconnect if we have a timeout (for - userauth etc), or 0 for no timeout */ + time_t connect_time; /* time the connection was established + (cleared after auth once we're not + respecting AUTH_TIMEOUT any more) */ int sock; @@ -123,7 +131,11 @@ struct sshsession { unsigned char lastpacket; /* What the last received packet type was */ - + int signal_pipe[2]; /* stores endpoints of a self-pipe used for + race-free signal handling */ + + time_t last_packet_time; /* time of the last packet transmission, for + keepalive purposes */ /* KEX/encryption related */ struct KEXState kexstate; @@ -136,6 +148,10 @@ struct sshsession { buffer* kexhashbuf; /* session hash buffer calculated from various packets*/ buffer* transkexinit; /* the kexinit packet we send should be kept so we can add it to the hash when generating keys */ + + /* a list of queued replies that should be sent after a KEX has + concluded (ie, while dataallowed was unset)*/ + struct packetlist *reply_queue_head, *reply_queue_tail; algo_type*(*buf_match_algo)(buffer*buf, algo_type localalgos[], int *goodguess); /* The function to use to choose which algorithm @@ -189,8 +205,7 @@ typedef enum { KEX_NOTHING, KEXINIT_RCVD, KEXDH_INIT_SENT, - KEXDONE, - + KEXDONE } cli_kex_state; typedef enum { @@ -202,8 +217,7 @@ typedef enum { USERAUTH_REQ_SENT, USERAUTH_FAIL_RCVD, USERAUTH_SUCCESS_RCVD, - SESSION_RUNNING, - + SESSION_RUNNING } cli_state; struct clientsession { |