2 * Supporting routines used in common by all the various components of
13 /* ----------------------------------------------------------------------
14 * Centralised standard methods for other channel implementations to
18 void chan_remotely_opened_confirmation(Channel
*chan
)
20 unreachable("this channel type should never receive OPEN_CONFIRMATION");
23 void chan_remotely_opened_failure(Channel
*chan
, const char *errtext
)
25 unreachable("this channel type should never receive OPEN_FAILURE");
28 bool chan_default_want_close(
29 Channel
*chan
, bool sent_local_eof
, bool rcvd_remote_eof
)
32 * Default close policy: we start initiating the CHANNEL_CLOSE
33 * procedure as soon as both sides of the channel have seen EOF.
35 return sent_local_eof
&& rcvd_remote_eof
;
38 bool chan_no_exit_status(Channel
*chan
, int status
)
43 bool chan_no_exit_signal(
44 Channel
*chan
, ptrlen signame
, bool core_dumped
, ptrlen msg
)
49 bool chan_no_exit_signal_numeric(
50 Channel
*chan
, int signum
, bool core_dumped
, ptrlen msg
)
55 bool chan_no_run_shell(Channel
*chan
)
60 bool chan_no_run_command(Channel
*chan
, ptrlen command
)
65 bool chan_no_run_subsystem(Channel
*chan
, ptrlen subsys
)
70 bool chan_no_enable_x11_forwarding(
71 Channel
*chan
, bool oneshot
, ptrlen authproto
, ptrlen authdata
,
72 unsigned screen_number
)
77 bool chan_no_enable_agent_forwarding(Channel
*chan
)
82 bool chan_no_allocate_pty(
83 Channel
*chan
, ptrlen termtype
, unsigned width
, unsigned height
,
84 unsigned pixwidth
, unsigned pixheight
, struct ssh_ttymodes modes
)
89 bool chan_no_set_env(Channel
*chan
, ptrlen var
, ptrlen value
)
94 bool chan_no_send_break(Channel
*chan
, unsigned length
)
99 bool chan_no_send_signal(Channel
*chan
, ptrlen signame
)
104 bool chan_no_change_window_size(
105 Channel
*chan
, unsigned width
, unsigned height
,
106 unsigned pixwidth
, unsigned pixheight
)
111 void chan_no_request_response(Channel
*chan
, bool success
)
113 unreachable("this channel type should never send a want-reply request");
116 /* ----------------------------------------------------------------------
117 * Other miscellaneous utility functions.
120 void free_rportfwd(struct ssh_rportfwd
*rpf
)
123 sfree(rpf
->log_description
);