Lines Matching +full:channel +full:- +full:use

17  * Redistribution and use in source and binary forms, with or without
31 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
41 /* Definitions for channel types. */
45 #define SSH_CHANNEL_OPEN 4 /* normal open two-way channel */
50 #define SSH_CHANNEL_RPORT_LISTENER 11 /* Listening to a R-style port */
58 #define SSH_CHANNEL_RUNIX_LISTENER 19 /* Listening to a R-style domain socket. */
59 #define SSH_CHANNEL_MUX_PROXY 20 /* proxy channel for mux-client */
64 #define CHANNEL_CANCEL_PORT_STATIC -1
67 #define CHANNEL_NONBLOCK_LEAVE 0 /* don't modify non-blocking state */
68 #define CHANNEL_NONBLOCK_SET 1 /* set non-blocking state */
69 #define CHANNEL_NONBLOCK_STDIO 2 /* set non-blocking and restore on close */
71 /* c->restore_block mask flags */
86 struct Channel;
87 typedef struct Channel Channel; typedef
92 typedef int channel_infilter_fn(struct ssh *, struct Channel *, char *, int);
94 typedef u_char *channel_outfilter_fn(struct ssh *, struct Channel *,
97 /* Channel success/failure callbacks */
98 typedef void channel_confirm_cb(struct ssh *, int, struct Channel *, void *);
99 typedef void channel_confirm_abandon_cb(struct ssh *, struct Channel *, void *);
108 /* Context for non-blocking connects */
115 /* Callbacks for mux channels back into client-specific code */
116 typedef int mux_callback_fn(struct ssh *, struct Channel *);
119 * NB. channel IDs on the wire and in c->remote_id are uint32, but local
120 * channel IDs (e.g. c->self) only ever use the int32 subset of this range,
121 * because we use local channel ID -1 for housekeeping. Remote channels have
125 struct Channel { struct
126 int type; /* channel type/state */
128 int self; /* my own channel identifier */
129 uint32_t remote_id; /* channel identifier for remote peer */
130 int have_remote_id; /* non-zero if remote_id is valid */
132 u_int istate; /* input from channel (state of receive half) */
133 u_int ostate; /* output to channel (state of transmit half) */
142 int ctl_chan; /* control channel (multiplexed connections) */
150 int delayed; /* post-IO handlers for newly created
152 * to a matching pre-IO handler.
153 * this way post-IO handlers are not
180 char *ctype; /* const type - NB. not freed on channel_free */
199 /* non-blocking connect */
221 /* default window/packet sizes for tcp/x11-fwd-channel */
263 /* Maximum channel input buffer size */
269 /* check whether 'efd' is still in use */
271 (c->extended_usage == CHAN_EXTENDED_READ && \
272 (c->efd != -1 || \
273 sshbuf_len(c->extended) > 0))
275 (c->extended_usage == CHAN_EXTENDED_WRITE && \
276 c->efd != -1 && (!(c->flags & (CHAN_EOF_RCVD|CHAN_CLOSE_RCVD)) || \
277 sshbuf_len(c->extended) > 0))
279 /* Add channel management structures to SSH transport instance */
282 /* channel management */
284 Channel *channel_by_id(struct ssh *, int);
285 Channel *channel_by_remote_id(struct ssh *, u_int);
286 Channel *channel_lookup(struct ssh *, int);
287 Channel *channel_new(struct ssh *, char *, int, int, int, int,
291 void channel_free(struct ssh *, Channel *);
294 void channel_force_close(struct ssh *, Channel *, int);
308 int channel_close_fd(struct ssh *, Channel *, int *);
311 /* channel inactivity timeouts */
317 int channel_proxy_downstream(struct ssh *, Channel *mc);
318 int channel_proxy_upstream(Channel *, int, u_int32_t, struct ssh *);
345 const char *channel_format_extended_usage(const Channel *);
358 Channel *channel_connect_to_port(struct ssh *, const char *, u_short,
360 Channel *channel_connect_to_path(struct ssh *, const char *, char *, char *);
361 Channel *channel_connect_stdio_fwd(struct ssh *, const char*,
363 Channel *channel_connect_by_listen_address(struct ssh *, const char *,
365 Channel *channel_connect_by_listen_path(struct ssh *, const char *,
386 /* channel close */
388 int chan_is_dead(struct ssh *, Channel *, int);
389 void chan_mark_dead(struct ssh *, Channel *);
391 /* channel events */
393 void chan_rcvd_oclose(struct ssh *, Channel *);
394 void chan_rcvd_eow(struct ssh *, Channel *);
395 void chan_read_failed(struct ssh *, Channel *);
396 void chan_ibuf_empty(struct ssh *, Channel *);
397 void chan_rcvd_ieof(struct ssh *, Channel *);
398 void chan_write_failed(struct ssh *, Channel *);
399 void chan_obuf_empty(struct ssh *, Channel *);