-channel_new(char *ctype, int type, int rfd, int wfd, int efd,
- int window, int maxpack, int extended_usage, char *remote_name,
- int nonblock);
-void
-channel_set_fds(int id, int rfd, int wfd, int efd,
- int extusage, int nonblock);
-
-void deny_input_open(int type, int plen, void *ctxt);
-
-void channel_input_channel_request(int type, int plen, void *ctxt);
-void channel_input_close(int type, int plen, void *ctxt);
-void channel_input_close_confirmation(int type, int plen, void *ctxt);
-void channel_input_data(int type, int plen, void *ctxt);
-void channel_input_extended_data(int type, int plen, void *ctxt);
-void channel_input_ieof(int type, int plen, void *ctxt);
-void channel_input_oclose(int type, int plen, void *ctxt);
-void channel_input_open_confirmation(int type, int plen, void *ctxt);
-void channel_input_open_failure(int type, int plen, void *ctxt);
-void channel_input_port_open(int type, int plen, void *ctxt);
-void channel_input_window_adjust(int type, int plen, void *ctxt);
-
-/* Sets specific protocol options. */
-void channel_set_options(int hostname_in_open);
-
-/*
- * Allocate a new channel object and set its type and socket. Remote_name
- * must have been allocated with xmalloc; this will free it when the channel
- * is freed.
- */
-int channel_allocate(int type, int sock, char *remote_name);
-
-/* Free the channel and close its socket. */
-void channel_free(int channel);
-
-/* Add any bits relevant to channels in select bitmasks. */
-void channel_prepare_select(fd_set * readset, fd_set * writeset);
-
-/*
- * After select, perform any appropriate operations for channels which have
- * events pending.
- */
-void channel_after_select(fd_set * readset, fd_set * writeset);
-
-/* If there is data to send to the connection, send some of it now. */
-void channel_output_poll(void);
-
-/* Returns true if no channel has too much buffered data. */
-int channel_not_very_much_buffered_data(void);
-
-/* This closes any sockets that are listening for connections; this removes
- any unix domain sockets. */
-void channel_stop_listening(void);
-
-/*
- * Closes the sockets of all channels. This is used to close extra file
- * descriptors after a fork.
- */
-void channel_close_all(void);
-
-/* Returns the maximum file descriptor number used by the channels. */
-int channel_max_fd(void);
-
-/* Returns true if there is still an open channel over the connection. */
-int channel_still_open(void);
-
-/*
- * Returns a string containing a list of all open channels. The list is
- * suitable for displaying to the user. It uses crlf instead of newlines.
- * The caller should free the string with xfree.
- */
-char *channel_open_message(void);
-
-/*
- * Initiate forwarding of connections to local port "port" through the secure
- * channel to host:port from remote side.
- */
-void
-channel_request_local_forwarding(u_short listen_port,
- const char *host_to_connect, u_short port_to_connect, int gateway_ports);
-void
-channel_request_forwarding(const char *listen_address, u_short listen_port,
- const char *host_to_connect, u_short port_to_connect, int gateway_ports,
- int remote_fwd);
-
-/*
- * Initiate forwarding of connections to port "port" on remote host through
- * the secure channel to host:port from local side. This never returns if
- * there was an error. This registers that open requests for that port are
- * permitted.
- */
-void
-channel_request_remote_forwarding(u_short port, const char *host,
- u_short remote_port);
-
-/*
- * Permits opening to any host/port in SSH_MSG_PORT_OPEN. This is usually
- * called by the server, because the user could connect to any port anyway,
- * and the server has no way to know but to trust the client anyway.
- */
-void channel_permit_all_opens(void);
-
-/*
- * This is called after receiving CHANNEL_FORWARDING_REQUEST. This initates
- * 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);
-
-/*
- * Creates a port for X11 connections, and starts listening for it. Returns
- * the display name, or NULL if an error was encountered.
- */
-char *x11_create_display(int screen);