summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:46:56 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:46:56 +0000
commit4cc240dabbd81a308f06f2717b1942041fe0e205 (patch)
tree07291c8c2c467fc2ecec9166ed0d8ec1e75631a3 /channels.h
parent5bf5d67d497ed91c19851db6b904d54003afe67e (diff)
- markus@cvs.openbsd.org 2001/06/26 17:27:25
[authfd.h authfile.h auth.h auth-options.h bufaux.h buffer.h canohost.h channels.h cipher.h clientloop.h compat.h compress.h crc32.h deattack.h dh.h dispatch.h groupaccess.c groupaccess.h hostfile.h kex.h key.h log.c log.h mac.h misc.c misc.h mpaux.h packet.h radix.h readconf.h readpass.h rsa.h servconf.h serverloop.h session.h sftp-common.c sftp-common.h sftp-glob.h sftp-int.h sshconnect.h ssh-dss.h sshlogin.h sshpty.h ssh-rsa.h sshtty.h tildexpand.h uidswap.h uuencode.h xmalloc.h] remove comments from .h, since they are cut&paste from the .c files and out of sync
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h123
1 files changed, 57 insertions, 66 deletions
diff --git a/channels.h b/channels.h
index 3a114e070..98bba1aed 100644
--- a/channels.h
+++ b/channels.h
@@ -32,7 +32,7 @@
32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35/* RCSID("$OpenBSD: channels.h,v 1.41 2001/06/26 06:32:49 itojun Exp $"); */ 35/* RCSID("$OpenBSD: channels.h,v 1.42 2001/06/26 17:27:23 markus Exp $"); */
36 36
37#ifndef CHANNEL_H 37#ifndef CHANNEL_H
38#define CHANNEL_H 38#define CHANNEL_H
@@ -58,10 +58,6 @@
58 58
59#define SSH_CHANNEL_PATH_LEN 30 59#define SSH_CHANNEL_PATH_LEN 30
60 60
61/*
62 * Data structure for channel data. This is initialized in channel_new
63 * and cleared in channel_free.
64 */
65struct Channel; 61struct Channel;
66typedef struct Channel Channel; 62typedef struct Channel Channel;
67 63
@@ -139,87 +135,87 @@ struct Channel {
139#define CHAN_CLOSE_SENT 0x01 135#define CHAN_CLOSE_SENT 0x01
140#define CHAN_CLOSE_RCVD 0x02 136#define CHAN_CLOSE_RCVD 0x02
141 137
142
143/* channel management */ 138/* channel management */
144 139
145Channel *channel_lookup(int); 140Channel *channel_lookup(int);
146Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int); 141Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int);
147void channel_set_fds(int, int, int, int, int, int); 142void channel_set_fds(int, int, int, int, int, int);
148void channel_free(Channel *); 143void channel_free(Channel *);
149void channel_free_all(void); 144void channel_free_all(void);
150 145
151void channel_send_open(int); 146void channel_send_open(int);
152void channel_request(int, char *, int); 147void channel_request(int, char *, int);
153void channel_request_start(int, char *, int); 148void channel_request_start(int, char *, int);
154void channel_register_callback(int, int mtype, channel_callback_fn *, void *); 149void channel_register_callback(int, int mtype, channel_callback_fn *, void *);
155void channel_register_cleanup(int, channel_callback_fn *); 150void channel_register_cleanup(int, channel_callback_fn *);
156void channel_register_filter(int, channel_filter_fn *); 151void channel_register_filter(int, channel_filter_fn *);
157void channel_cancel_cleanup(int); 152void channel_cancel_cleanup(int);
158 153
159/* protocol handler */ 154/* protocol handler */
160 155
161void channel_input_channel_request(int, int, void *); 156void channel_input_channel_request(int, int, void *);
162void channel_input_close(int, int, void *); 157void channel_input_close(int, int, void *);
163void channel_input_close_confirmation(int, int, void *); 158void channel_input_close_confirmation(int, int, void *);
164void channel_input_data(int, int, void *); 159void channel_input_data(int, int, void *);
165void channel_input_extended_data(int, int, void *); 160void channel_input_extended_data(int, int, void *);
166void channel_input_ieof(int, int, void *); 161void channel_input_ieof(int, int, void *);
167void channel_input_oclose(int, int, void *); 162void channel_input_oclose(int, int, void *);
168void channel_input_open_confirmation(int, int, void *); 163void channel_input_open_confirmation(int, int, void *);
169void channel_input_open_failure(int, int, void *); 164void channel_input_open_failure(int, int, void *);
170void channel_input_port_open(int, int, void *); 165void channel_input_port_open(int, int, void *);
171void channel_input_window_adjust(int, int, void *); 166void channel_input_window_adjust(int, int, void *);
172 167
173/* file descriptor handling (read/write) */ 168/* file descriptor handling (read/write) */
174 169
175void 170void channel_prepare_select(fd_set **, fd_set **, int *, int);
176channel_prepare_select(fd_set **, fd_set **, int *, int); 171void channel_after_select(fd_set *, fd_set *);
177void channel_after_select(fd_set *, fd_set *); 172void channel_output_poll(void);
178void channel_output_poll(void);
179 173
180int channel_not_very_much_buffered_data(void); 174int channel_not_very_much_buffered_data(void);
181void channel_close_all(void); 175void channel_close_all(void);
182void channel_free_all(void); 176void channel_free_all(void);
183int channel_still_open(void); 177int channel_still_open(void);
184char *channel_open_message(void); 178char *channel_open_message(void);
185int channel_find_open(void); 179int channel_find_open(void);
186 180
187/* channel_tcpfwd.c */ 181/* channel_tcpfwd.c */
188int 182void channel_permit_all_opens(void);
189channel_request_local_forwarding(u_short, const char *, u_short, int); 183void channel_add_permitted_opens(char *, int);
184void channel_clear_permitted_opens(void);
185void channel_input_port_forward_request(int, int);
186int channel_connect_to(const char *, u_short);
187int channel_connect_by_listen_adress(u_short);
188void channel_request_remote_forwarding(u_short, const char *, u_short);
189int channel_request_local_forwarding(u_short, const char *, u_short, int);
190int 190int
191channel_request_forwarding(const char *, u_short, const char *, u_short, int, 191channel_request_forwarding(const char *, u_short, const char *, u_short, int,
192 int); 192 int);
193void
194channel_request_remote_forwarding(u_short, const char *, u_short);
195void channel_permit_all_opens(void);
196void channel_add_permitted_opens(char *, int);
197void channel_clear_permitted_opens(void);
198void channel_input_port_forward_request(int, int);
199int channel_connect_to(const char *, u_short);
200int channel_connect_by_listen_adress(u_short);
201 193
202/* x11 forwarding */ 194/* x11 forwarding */
203 195
204int x11_connect_display(void); 196int x11_connect_display(void);
205char *x11_create_display(int); 197char *x11_create_display(int);
206char *x11_create_display_inet(int, int); 198char *x11_create_display_inet(int, int);
207void x11_input_open(int, int, void *); 199void x11_input_open(int, int, void *);
208void x11_request_forwarding(void); 200void x11_request_forwarding(void);
209void 201void x11_request_forwarding_with_spoofing(int, const char *, const char *);
210x11_request_forwarding_with_spoofing(int, const char *, const char *); 202void deny_input_open(int, int, void *);
211void deny_input_open(int, int, void *);
212 203
213/* agent forwarding */ 204/* agent forwarding */
214 205
215void auth_request_forwarding(void); 206void auth_request_forwarding(void);
216char *auth_get_socket_name(void); 207char *auth_get_socket_name(void);
217void auth_sock_cleanup_proc(void *); 208void auth_sock_cleanup_proc(void *);
218int auth_input_request_forwarding(struct passwd *); 209int auth_input_request_forwarding(struct passwd *);
219void auth_input_open_request(int, int, void *); 210void auth_input_open_request(int, int, void *);
220 211
221/* channel close */ 212/* channel close */
222 213
214int chan_is_dead(Channel *);
215void chan_mark_dead(Channel *);
216void chan_init_iostates(Channel *);
217void chan_init(void);
218
223typedef void chan_event_fn(Channel *); 219typedef void chan_event_fn(Channel *);
224 220
225/* for the input state */ 221/* for the input state */
@@ -232,9 +228,4 @@ extern chan_event_fn *chan_rcvd_ieof;
232extern chan_event_fn *chan_write_failed; 228extern chan_event_fn *chan_write_failed;
233extern chan_event_fn *chan_obuf_empty; 229extern chan_event_fn *chan_obuf_empty;
234 230
235int chan_is_dead(Channel *);
236void chan_mark_dead(Channel *);
237void chan_init_iostates(Channel *);
238void chan_init(void);
239
240#endif 231#endif