c->remoteid = -1;
c->halfopen = TRUE;
void *new_sock_channel(void *handle, Socket s){    Ssh ssh = (Ssh) handle;    struct ssh_channel *c;    c = snew(struct ssh_channel);    c->ssh = ssh;    if (c) {	c->remoteid = -1;	       /* to be set when open confirmed */	c->localid = alloc_channel_id(ssh);	c->closes = 0;	c->type = CHAN_SOCKDATA_DORMANT;/* identify channel type */	c->u.pfd.s = s;	bufchain_init(&c->v.v2.outbuffer);	add234(ssh->channels, c);    }    return c;}