* Register filedescriptors for a channel, used when allocating a channel or
* when the channel consumer/producer is ready, e.g. shell exec'd
*/
-
static void
channel_register_fds(Channel *c, int rfd, int wfd, int efd,
int extusage, int nonblock)
* Allocate a new channel object and set its type and socket. This will cause
* remote_name to be freed.
*/
-
Channel *
channel_new(char *ctype, int type, int rfd, int wfd, int efd,
u_int window, u_int maxpack, int extusage, char *remote_name, int nonblock)
}
/* Close all channel fd/socket. */
-
static void
channel_close_fds(Channel *c)
{
}
/* Free the channel and close its fd/socket. */
-
void
channel_free(Channel *c)
{
* Closes the sockets/fds of all channels. This is used to close extra file
* descriptors after a fork.
*/
-
void
channel_close_all(void)
{
/*
* Stop listening to channels.
*/
-
void
channel_stop_listening(void)
{
* Returns true if no channel has too much buffered data, and false if one or
* more channel is overfull.
*/
-
int
channel_not_very_much_buffered_data(void)
{
}
/* Returns true if any channel is still open. */
-
int
channel_still_open(void)
{
}
/* Returns the id of an open channel suitable for keepaliving */
-
int
channel_find_open(void)
{
* suitable for sending to the client. The message contains crlf pairs for
* newlines.
*/
-
char *
channel_open_message(void)
{
packet_put_cstring(service);
packet_put_char(wantconfirm);
}
+
void
channel_register_confirm(int id, channel_callback_fn *fn, void *ctx)
{
c->confirm = fn;
c->confirm_ctx = ctx;
}
+
void
channel_register_cleanup(int id, channel_callback_fn *fn, int do_close)
{
c->detach_user = fn;
c->detach_close = do_close;
}
+
void
channel_cancel_cleanup(int id)
{
c->detach_user = NULL;
c->detach_close = 0;
}
+
void
channel_register_filter(int id, channel_infilter_fn *ifn,
channel_outfilter_fn *ofn)
}
return 1;
}
+
static int
channel_handle_wfd(Channel *c, fd_set *readset, fd_set *writeset)
{
}
return 1;
}
+
static int
channel_handle_efd(Channel *c, fd_set *readset, fd_set *writeset)
{
}
return 1;
}
+
static int
channel_handle_ctl(Channel *c, fd_set *readset, fd_set *writeset)
{
}
return 1;
}
+
static int
channel_check_window(Channel *c)
{
/* If there is data to send to the connection, enqueue some of it now. */
-
void
channel_output_poll(void)
{
/* -- protocol input */
-
void
channel_input_data(int type, u_int32_t seq, void *ctxt)
{
* listening for the port, and sends back a success reply (or disconnect
* message if there was an error). This never returns if there was an error.
*/
-
void
channel_input_port_forward_request(int is_root, int gateway_ports)
{
}
-
/* return socket to remote host, port */
static int
connect_to(const char *host, u_short port)
enc->key_len = cipher_keylen(enc->cipher);
enc->block_size = cipher_blocksize(enc->cipher);
}
+
static void
choose_mac(Mac *mac, char *client, char *server)
{
mac->key = NULL;
mac->enabled = 0;
}
+
static void
choose_comp(Comp *comp, char *client, char *server)
{
}
comp->name = name;
}
+
static void
choose_kex(Kex *k, char *client, char *server)
{
for (mode = 0; mode < MODE_MAX; mode++) {
current_keys[mode] = kex->newkeys[mode];
kex->newkeys[mode] = NULL;
- ctos = (!kex->server && mode == MODE_OUT) || (kex->server && mode == MODE_IN);
+ ctos = (!kex->server && mode == MODE_OUT) ||
+ (kex->server && mode == MODE_IN);
current_keys[mode]->enc.iv = keys[ctos ? 0 : 1];
current_keys[mode]->enc.key = keys[ctos ? 2 : 3];
current_keys[mode]->mac.key = keys[ctos ? 4 : 5];
return (cipher_get_keyiv_len(cc));
}
+
void
packet_set_iv(int mode, u_char *dat)
{
cipher_set_keyiv(cc, dat);
}
+
int
packet_get_ssh1_cipher(void)
{
buffer_append(&outgoing_packet, &ch, 1);
}
+
void
packet_put_int(u_int value)
{
buffer_put_int(&outgoing_packet, value);
}
+
void
packet_put_string(const void *buf, u_int len)
{
buffer_put_string(&outgoing_packet, buf, len);
}
+
void
packet_put_cstring(const char *str)
{
buffer_put_cstring(&outgoing_packet, str);
}
+
void
packet_put_raw(const void *buf, u_int len)
{
buffer_append(&outgoing_packet, buf, len);
}
+
void
packet_put_bignum(BIGNUM * value)
{
buffer_put_bignum(&outgoing_packet, value);
}
+
void
packet_put_bignum2(BIGNUM * value)
{