ssh2_pkt_send(ssh, pktout);
ssh2_pkt_send_noqueue(ssh, pktout);
static void ssh_special(void *handle, Telnet_Special code){    Ssh ssh = (Ssh) handle;    struct Packet *pktout;    if (code == TS_EOF) {	if (ssh->state != SSH_STATE_SESSION) {	    /*	     * Buffer the EOF in case we are pre-SESSION, so we can	     * send it as soon as we reach SESSION.	     */	    if (code == TS_EOF)		ssh->eof_needed = TRUE;	    return;	}	if (ssh->version == 1) {	    send_packet(ssh, SSH1_CMSG_EOF, PKT_END);	} else if (ssh->mainchan) {	    struct Packet *pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_EOF);	    ssh2_pkt_adduint32(pktout, ssh->mainchan->remoteid);	    ssh2_pkt_send(ssh, pktout);	}	logevent("Sent EOF message");    } else if (code == TS_PING || code == TS_NOP) {	if (ssh->state == SSH_STATE_CLOSED	    || ssh->state == SSH_STATE_PREPACKET) return;	if (ssh->version == 1) {	    if (!(ssh->remote_bugs & BUG_CHOKES_ON_SSH1_IGNORE))		send_packet(ssh, SSH1_MSG_IGNORE, PKT_STR, "", PKT_END);	} else {	    pktout = ssh2_pkt_init(SSH2_MSG_IGNORE);	    ssh2_pkt_addstring_start(pktout);	    ssh2_pkt_send(ssh, pktout);	}    } else if (code == TS_BRK) {	if (ssh->state == SSH_STATE_CLOSED	    || ssh->state == SSH_STATE_PREPACKET) return;	if (ssh->version == 1) {	    logevent("Unable to send BREAK signal in SSH1");	} else if (ssh->mainchan) {	    pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST);	    ssh2_pkt_adduint32(pktout, ssh->mainchan->remoteid);	    ssh2_pkt_addstring(pktout, "break");	    ssh2_pkt_addbool(pktout, 0);	    ssh2_pkt_adduint32(pktout, 0);   /* default break length */	    ssh2_pkt_send(ssh, pktout);	}    } else {	/* Is is a POSIX signal? */	char *signame = NULL;	if (code == TS_SIGABRT) signame = "ABRT";	if (code == TS_SIGALRM) signame = "ALRM";	if (code == TS_SIGFPE)  signame = "FPE";	if (code == TS_SIGHUP)  signame = "HUP";	if (code == TS_SIGILL)  signame = "ILL";	if (code == TS_SIGINT)  signame = "INT";	if (code == TS_SIGKILL) signame = "KILL";	if (code == TS_SIGPIPE) signame = "PIPE";	if (code == TS_SIGQUIT) signame = "QUIT";	if (code == TS_SIGSEGV) signame = "SEGV";	if (code == TS_SIGTERM) signame = "TERM";	if (code == TS_SIGUSR1) signame = "USR1";	if (code == TS_SIGUSR2) signame = "USR2";	/* The SSH-2 protocol does in principle support arbitrary named	 * signals, including signame@domain, but we don't support those. */	if (signame) {	    /* It's a signal. */	    if (ssh->version == 2 && ssh->mainchan) {		pktout = ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST);		ssh2_pkt_adduint32(pktout, ssh->mainchan->remoteid);		ssh2_pkt_addstring(pktout, "signal");		ssh2_pkt_addbool(pktout, 0);		ssh2_pkt_addstring(pktout, signame);		ssh2_pkt_send(ssh, pktout);		logeventf(ssh, "Sent signal SIG%s", signame);	    }	} else {	    /* Never heard of it. Do nothing */	}    }}