char buf[200], addrbuf[100];
char addrbuf[100];
static char *connect_to_host(Ssh ssh, char *host, int port,			     char **realhost, int nodelay){    static const struct plug_function_table fn_table = {	ssh_closing,	ssh_receive,	ssh_sent,	NULL    };    SockAddr addr;    char *err;    ssh->savedhost = smalloc(1 + strlen(host));    if (!ssh->savedhost)	fatalbox("Out of memory");    strcpy(ssh->savedhost, host);    if (port < 0)	port = 22;		       /* default ssh port */    ssh->savedport = port;    /*     * Try to find host.     */    {	char buf[200];	sprintf(buf, "Looking up host \"%.170s\"", host);	logevent(buf);    }    addr = sk_namelookup(host, realhost);    if ((err = sk_addr_error(addr)))	return err;    /*     * Open socket.     */    {	char buf[200], addrbuf[100];	sk_getaddr(addr, addrbuf, 100);	sprintf(buf, "Connecting to %.100s port %d", addrbuf, port);	logevent(buf);    }    ssh->fn = &fn_table;    ssh->s = new_connection(addr, *realhost, port, 0, 1, nodelay, (Plug) ssh);    if ((err = sk_socket_error(ssh->s))) {	ssh->s = NULL;	return err;    }    return NULL;}