Lines Matching full:channel

45  * SSH Protocol 1.5 aka New Channel Protocol
61 * i.e. both sides have to close the channel
70 /* functions manipulating channel states */
72 * EVENTS update channel input/output states execute ACTIONS
75 * ACTIONS: should never update the channel states
77 static void chan_send_eof2(struct ssh *, Channel *);
78 static void chan_send_eow2(struct ssh *, Channel *);
81 static void chan_shutdown_write(struct ssh *, Channel *);
82 static void chan_shutdown_read(struct ssh *, Channel *);
83 static void chan_shutdown_extended_read(struct ssh *, Channel *);
93 chan_set_istate(Channel *c, u_int next) in chan_set_istate()
97 debug2("channel %d: input %s -> %s", c->self, istates[c->istate], in chan_set_istate()
103 chan_set_ostate(Channel *c, u_int next) in chan_set_ostate()
107 debug2("channel %d: output %s -> %s", c->self, ostates[c->ostate], in chan_set_ostate()
113 chan_read_failed(struct ssh *ssh, Channel *c) in chan_read_failed()
115 debug2("channel %d: read failed", c->self); in chan_read_failed()
122 error("channel %d: chan_read_failed for istate %d", in chan_read_failed()
129 chan_ibuf_empty(struct ssh *ssh, Channel *c) in chan_ibuf_empty()
131 debug2("channel %d: ibuf empty", c->self); in chan_ibuf_empty()
133 error("channel %d: chan_ibuf_empty for non empty buffer", in chan_ibuf_empty()
144 error("channel %d: chan_ibuf_empty for istate %d", in chan_ibuf_empty()
151 chan_obuf_empty(struct ssh *ssh, Channel *c) in chan_obuf_empty()
153 debug2("channel %d: obuf empty", c->self); in chan_obuf_empty()
155 error("channel %d: chan_obuf_empty for non empty buffer", in chan_obuf_empty()
165 error("channel %d: internal error: obuf_empty for ostate %d", in chan_obuf_empty()
172 chan_rcvd_eow(struct ssh *ssh, Channel *c) in chan_rcvd_eow()
174 debug2("channel %d: rcvd eow", c->self); in chan_rcvd_eow()
184 chan_send_eof2(struct ssh *ssh, Channel *c) in chan_send_eof2()
188 debug2("channel %d: send eof", c->self); in chan_send_eof2()
192 fatal_f("channel %d: no remote_id", c->self); in chan_send_eof2()
200 error("channel %d: cannot send eof for istate %d", in chan_send_eof2()
207 chan_send_close2(struct ssh *ssh, Channel *c) in chan_send_close2()
211 debug2("channel %d: send close", c->self); in chan_send_close2()
214 error("channel %d: cannot send close for istate/ostate %d/%d", in chan_send_close2()
217 error("channel %d: already sent close", c->self); in chan_send_close2()
220 fatal_f("channel %d: no remote_id", c->self); in chan_send_close2()
230 chan_send_eow2(struct ssh *ssh, Channel *c) in chan_send_eow2()
234 debug2("channel %d: send eow", c->self); in chan_send_eow2()
236 error("channel %d: must not sent eow on closed output", in chan_send_eow2()
243 fatal_f("channel %d: no remote_id", c->self); in chan_send_eow2()
255 chan_rcvd_ieof(struct ssh *ssh, Channel *c) in chan_rcvd_ieof()
257 debug2("channel %d: rcvd eof", c->self); in chan_rcvd_ieof()
268 chan_rcvd_oclose(struct ssh *ssh, Channel *c) in chan_rcvd_oclose()
270 debug2("channel %d: rcvd close", c->self); in chan_rcvd_oclose()
273 error("channel %d: protocol error: close rcvd twice", in chan_rcvd_oclose()
286 * wait until a data from the channel is consumed if a CLOSE in chan_rcvd_oclose()
308 chan_write_failed(struct ssh *ssh, Channel *c) in chan_write_failed()
310 debug2("channel %d: write failed", c->self); in chan_write_failed()
320 error("channel %d: chan_write_failed for ostate %d", in chan_write_failed()
327 chan_mark_dead(struct ssh *ssh, Channel *c) in chan_mark_dead()
333 chan_is_dead(struct ssh *ssh, Channel *c, int do_send) in chan_is_dead()
336 debug2("channel %d: zombie", c->self); in chan_is_dead()
345 debug2("channel %d: active efd: %d len %zu", in chan_is_dead()
350 debug2("channel %d: is dead (local)", c->self); in chan_is_dead()
357 /* channel would be dead if we sent a close */ in chan_is_dead()
359 debug2("channel %d: almost dead", in chan_is_dead()
367 debug2("channel %d: is dead", c->self); in chan_is_dead()
375 chan_shutdown_write(struct ssh *ssh, Channel *c) in chan_shutdown_write()
381 debug2_f("channel %d: (i%d o%d sock %d wfd %d efd %d [%s])", in chan_shutdown_write()
386 debug2_f("channel %d: shutdown() failed for " in chan_shutdown_write()
392 logit_f("channel %d: close() failed for " in chan_shutdown_write()
400 chan_shutdown_read(struct ssh *ssh, Channel *c) in chan_shutdown_read()
404 debug2_f("channel %d: (i%d o%d sock %d wfd %d efd %d [%s])", in chan_shutdown_read()
414 error_f("channel %d: shutdown() failed for " in chan_shutdown_read()
420 logit_f("channel %d: close() failed for " in chan_shutdown_read()
428 chan_shutdown_extended_read(struct ssh *ssh, Channel *c) in chan_shutdown_extended_read()
435 debug_f("channel %d: (i%d o%d sock %d wfd %d efd %d [%s])", in chan_shutdown_extended_read()
439 logit_f("channel %d: close() failed for " in chan_shutdown_extended_read()