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_close2", 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()
221 debug2("channel %d: send close for remote id %u", c->self, in chan_send_close2()
232 chan_send_eow2(struct ssh *ssh, Channel *c) in chan_send_eow2()
236 debug2("channel %d: send eow", c->self); in chan_send_eow2()
238 error("channel %d: must not sent eow on closed output", in chan_send_eow2()
245 fatal_f("channel %d: no remote_id", c->self); in chan_send_eow2()
257 chan_rcvd_ieof(struct ssh *ssh, Channel *c) in chan_rcvd_ieof()
259 debug2("channel %d: rcvd eof", c->self); in chan_rcvd_ieof()
270 chan_rcvd_oclose(struct ssh *ssh, Channel *c) in chan_rcvd_oclose()
272 debug2("channel %d: rcvd close", c->self); in chan_rcvd_oclose()
275 error("channel %d: protocol error: close rcvd twice", in chan_rcvd_oclose()
288 * wait until a data from the channel is consumed if a CLOSE in chan_rcvd_oclose()
310 chan_write_failed(struct ssh *ssh, Channel *c) in chan_write_failed()
312 debug2("channel %d: write failed", c->self); in chan_write_failed()
322 error("channel %d: chan_write_failed for ostate %d", in chan_write_failed()
329 chan_mark_dead(struct ssh *ssh, Channel *c) in chan_mark_dead()
335 chan_is_dead(struct ssh *ssh, Channel *c, int do_send) in chan_is_dead()
338 debug2("channel %d: zombie", c->self); in chan_is_dead()
347 debug2("channel %d: active efd: %d len %zu", in chan_is_dead()
352 debug2("channel %d: is dead (local)", c->self); in chan_is_dead()
359 /* channel would be dead if we sent a close */ in chan_is_dead()
361 debug2("channel %d: almost dead", in chan_is_dead()
369 debug2("channel %d: is dead", c->self); in chan_is_dead()
377 chan_shutdown_write(struct ssh *ssh, Channel *c) in chan_shutdown_write()
383 debug2_f("channel %d: (i%d o%d sock %d wfd %d efd %d [%s])", in chan_shutdown_write()
388 debug2_f("channel %d: shutdown() failed for " in chan_shutdown_write()
394 logit_f("channel %d: close() failed for " in chan_shutdown_write()
402 chan_shutdown_read(struct ssh *ssh, Channel *c) in chan_shutdown_read()
406 debug2_f("channel %d: (i%d o%d sock %d wfd %d efd %d [%s])", in chan_shutdown_read()
416 error_f("channel %d: shutdown() failed for " in chan_shutdown_read()
422 logit_f("channel %d: close() failed for " in chan_shutdown_read()
430 chan_shutdown_extended_read(struct ssh *ssh, Channel *c) in chan_shutdown_extended_read()
437 debug_f("channel %d: (i%d o%d sock %d wfd %d efd %d [%s])", in chan_shutdown_extended_read()
441 logit_f("channel %d: close() failed for " in chan_shutdown_extended_read()