ssh->protocol_initial_phase_done = FALSE;
static const char *ssh_init(void *frontend_handle, void **backend_handle,			    Config *cfg,			    char *host, int port, char **realhost, int nodelay,			    int keepalive){    const char *p;    Ssh ssh;    ssh = snew(struct ssh_tag);    ssh->cfg = *cfg;		       /* STRUCTURE COPY */    ssh->version = 0;		       /* when not ready yet */    ssh->s = NULL;    ssh->cipher = NULL;    ssh->v1_cipher_ctx = NULL;    ssh->crcda_ctx = NULL;    ssh->cscipher = NULL;    ssh->cs_cipher_ctx = NULL;    ssh->sccipher = NULL;    ssh->sc_cipher_ctx = NULL;    ssh->csmac = NULL;    ssh->cs_mac_ctx = NULL;    ssh->scmac = NULL;    ssh->sc_mac_ctx = NULL;    ssh->cscomp = NULL;    ssh->cs_comp_ctx = NULL;    ssh->sccomp = NULL;    ssh->sc_comp_ctx = NULL;    ssh->kex = NULL;    ssh->kex_ctx = NULL;    ssh->hostkey = NULL;    ssh->exitcode = -1;    ssh->state = SSH_STATE_PREPACKET;    ssh->size_needed = FALSE;    ssh->eof_needed = FALSE;    ssh->ldisc = NULL;    ssh->logctx = NULL;    ssh->deferred_send_data = NULL;    ssh->deferred_len = 0;    ssh->deferred_size = 0;    ssh->fallback_cmd = 0;    ssh->pkt_ctx = 0;    ssh->x11auth = NULL;    ssh->v1_compressing = FALSE;    ssh->v2_outgoing_sequence = 0;    ssh->ssh1_rdpkt_crstate = 0;    ssh->ssh2_rdpkt_crstate = 0;    ssh->do_ssh_init_crstate = 0;    ssh->ssh_gotdata_crstate = 0;    ssh->ssh1_protocol_crstate = 0;    ssh->do_ssh1_login_crstate = 0;    ssh->do_ssh2_transport_crstate = 0;    ssh->do_ssh2_authconn_crstate = 0;    ssh->do_ssh_init_state = NULL;    ssh->do_ssh1_login_state = NULL;    ssh->do_ssh2_transport_state = NULL;    ssh->do_ssh2_authconn_state = NULL;    ssh->mainchan = NULL;    ssh->throttled_all = 0;    ssh->v1_stdout_throttling = 0;    ssh->queue = NULL;    ssh->queuelen = ssh->queuesize = 0;    ssh->queueing = FALSE;    *backend_handle = ssh;#ifdef MSCRYPTOAPI    if (crypto_startup() == 0)	return "Microsoft high encryption pack not installed!";#endif    ssh->frontend = frontend_handle;    ssh->term_width = ssh->cfg.width;    ssh->term_height = ssh->cfg.height;    ssh->channels = NULL;    ssh->rportfwds = NULL;    ssh->send_ok = 0;    ssh->editing = 0;    ssh->echoing = 0;    ssh->v1_throttle_count = 0;    ssh->overall_bufsize = 0;    ssh->fallback_cmd = 0;    ssh->protocol = NULL;    p = connect_to_host(ssh, host, port, realhost, nodelay, keepalive);    if (p != NULL)	return p;    return NULL;}