Lines Matching +full:int +full:- +full:fwd +full:- +full:mask

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 */
90 typedef void channel_open_fn(struct ssh *, int, int, void *);
91 typedef void channel_callback_fn(struct ssh *, int, int, void *);
92 typedef int channel_infilter_fn(struct ssh *, struct Channel *, char *, int);
93 typedef void channel_filter_cleanup_fn(struct ssh *, int, void *);
98 typedef void channel_confirm_cb(struct ssh *, int, struct Channel *, void *);
108 /* Context for non-blocking connects */
111 int port;
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
126 int type; /* channel type/state */
128 int self; /* my own channel identifier */
130 int have_remote_id; /* non-zero if remote_id is valid */
134 int flags; /* close sent/rcvd */
135 int rfd; /* read fd */
136 int wfd; /* write fd */
137 int efd; /* extended fd */
138 int sock; /* sock fd */
141 int pfds[4]; /* pollfd entries for rfd/wfd/efd/sock */
142 int ctl_chan; /* control channel (multiplexed connections) */
143 int isatty; /* rfd is a tty */
145 int wfd_isatty; /* wfd is a tty */
147 int client_tty; /* (client) TTY has been requested */
148 int force_drain; /* force close on iEOF */
150 int delayed; /* post-IO handlers for newly created
152 * to a matching pre-IO handler.
153 * this way post-IO handlers are not
155 int restore_block; /* fd mask to restore blocking status */
156 int restore_flags[3];/* flags to restore */
165 int listening_port; /* port being listened for forwards */
167 int host_port; /* remote port to connect for forwards */
177 int extended_usage;
178 int single_connection;
180 char *ctype; /* const type - NB. not freed on channel_free */
187 int detach_close;
197 int datagram;
199 /* non-blocking connect */
206 int mux_pause;
207 int mux_downstream_id;
214 int inactive_deadline;
221 /* default window/packet sizes for tcp/x11-fwd-channel */
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))
284 Channel *channel_by_id(struct ssh *, int);
286 Channel *channel_lookup(struct ssh *, int);
287 Channel *channel_new(struct ssh *, char *, int, int, int, int,
288 u_int, u_int, int, const char *, int);
289 void channel_set_fds(struct ssh *, int, int, int, int, int,
290 int, int, u_int);
294 void channel_force_close(struct ssh *, Channel *, int);
295 void channel_set_xtype(struct ssh *, int, const char *);
297 void channel_send_open(struct ssh *, int);
298 void channel_request_start(struct ssh *, int, char *, int);
299 void channel_register_cleanup(struct ssh *, int,
300 channel_callback_fn *, int);
301 void channel_register_open_confirm(struct ssh *, int,
303 void channel_register_filter(struct ssh *, int, channel_infilter_fn *,
305 void channel_register_status_confirm(struct ssh *, int,
307 void channel_cancel_cleanup(struct ssh *, int);
308 int channel_close_fd(struct ssh *, Channel *, int *);
312 void channel_add_timeout(struct ssh *, const char *, int);
317 int channel_proxy_downstream(struct ssh *, Channel *mc);
318 int channel_proxy_upstream(Channel *, int, u_int32_t, struct ssh *);
322 int channel_input_data(int, u_int32_t, struct ssh *);
323 int channel_input_extended_data(int, u_int32_t, struct ssh *);
324 int channel_input_ieof(int, u_int32_t, struct ssh *);
325 int channel_input_oclose(int, u_int32_t, struct ssh *);
326 int channel_input_open_confirmation(int, u_int32_t, struct ssh *);
327 int channel_input_open_failure(int, u_int32_t, struct ssh *);
328 int channel_input_port_open(int, u_int32_t, struct ssh *);
329 int channel_input_window_adjust(int, u_int32_t, struct ssh *);
330 int channel_input_status_confirm(int, u_int32_t, struct ssh *);
339 int channel_output_poll(struct ssh *);
341 int channel_not_very_much_buffered_data(struct ssh *);
343 int channel_still_open(struct ssh *);
344 int channel_tty_open(struct ssh *);
347 int channel_find_open(struct ssh *);
352 void channel_set_af(struct ssh *, int af);
353 void channel_permit_all(struct ssh *, int);
354 void channel_add_permission(struct ssh *, int, int, char *, int);
355 void channel_clear_permission(struct ssh *, int, int);
356 void channel_disable_admin(struct ssh *, int);
357 void channel_update_permission(struct ssh *, int, int);
359 char *, char *, int *, const char **);
362 int, int, int, int);
367 int channel_request_remote_forwarding(struct ssh *, struct Forward *);
368 int channel_setup_local_fwd_listener(struct ssh *, struct Forward *,
370 int channel_request_rforward_cancel(struct ssh *, struct Forward *);
371 int channel_setup_remote_fwd_listener(struct ssh *, struct Forward *,
372 int *, struct ForwardOptions *);
373 int channel_cancel_rport_listener(struct ssh *, struct Forward *);
374 int channel_cancel_lport_listener(struct ssh *, struct Forward *,
375 int, struct ForwardOptions *);
376 int permitopen_port(const char *);
381 int x11_connect_display(struct ssh *);
382 int x11_create_display_inet(struct ssh *, int, int, int, u_int *, int **);
383 void x11_request_forwarding_with_spoofing(struct ssh *, int,
384 const char *, const char *, const char *, int);
388 int chan_is_dead(struct ssh *, Channel *, int);