diff options
Diffstat (limited to 'channels.h')
-rw-r--r-- | channels.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/channels.h b/channels.h index 1cb2c3a34..a97dd9007 100644 --- a/channels.h +++ b/channels.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: channels.h,v 1.79 2005/07/17 06:49:04 djm Exp $ */ | 1 | /* $OpenBSD: channels.h,v 1.83 2005/12/30 15:56:37 reyk Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
@@ -63,7 +63,8 @@ struct Channel; | |||
63 | typedef struct Channel Channel; | 63 | typedef struct Channel Channel; |
64 | 64 | ||
65 | typedef void channel_callback_fn(int, void *); | 65 | typedef void channel_callback_fn(int, void *); |
66 | typedef int channel_filter_fn(struct Channel *, char *, int); | 66 | typedef int channel_infilter_fn(struct Channel *, char *, int); |
67 | typedef u_char *channel_outfilter_fn(struct Channel *, u_char **, u_int *); | ||
67 | 68 | ||
68 | struct Channel { | 69 | struct Channel { |
69 | int type; /* channel type/state */ | 70 | int type; /* channel type/state */ |
@@ -106,11 +107,15 @@ struct Channel { | |||
106 | 107 | ||
107 | /* callback */ | 108 | /* callback */ |
108 | channel_callback_fn *confirm; | 109 | channel_callback_fn *confirm; |
109 | channel_callback_fn *detach_user; | ||
110 | void *confirm_ctx; | 110 | void *confirm_ctx; |
111 | channel_callback_fn *detach_user; | ||
112 | int detach_close; | ||
111 | 113 | ||
112 | /* filter */ | 114 | /* filter */ |
113 | channel_filter_fn *input_filter; | 115 | channel_infilter_fn *input_filter; |
116 | channel_outfilter_fn *output_filter; | ||
117 | |||
118 | int datagram; /* keep boundaries */ | ||
114 | }; | 119 | }; |
115 | 120 | ||
116 | #define CHAN_EXTENDED_IGNORE 0 | 121 | #define CHAN_EXTENDED_IGNORE 0 |
@@ -142,6 +147,8 @@ struct Channel { | |||
142 | #define CHAN_EOF_SENT 0x04 | 147 | #define CHAN_EOF_SENT 0x04 |
143 | #define CHAN_EOF_RCVD 0x08 | 148 | #define CHAN_EOF_RCVD 0x08 |
144 | 149 | ||
150 | #define CHAN_RBUF 16*1024 | ||
151 | |||
145 | /* check whether 'efd' is still in use */ | 152 | /* check whether 'efd' is still in use */ |
146 | #define CHANNEL_EFD_INPUT_ACTIVE(c) \ | 153 | #define CHANNEL_EFD_INPUT_ACTIVE(c) \ |
147 | (compat20 && c->extended_usage == CHAN_EXTENDED_READ && \ | 154 | (compat20 && c->extended_usage == CHAN_EXTENDED_READ && \ |
@@ -154,6 +161,7 @@ struct Channel { | |||
154 | 161 | ||
155 | /* channel management */ | 162 | /* channel management */ |
156 | 163 | ||
164 | Channel *channel_by_id(int); | ||
157 | Channel *channel_lookup(int); | 165 | Channel *channel_lookup(int); |
158 | Channel *channel_new(char *, int, int, int, int, u_int, u_int, int, char *, int); | 166 | Channel *channel_new(char *, int, int, int, int, u_int, u_int, int, char *, int); |
159 | void channel_set_fds(int, int, int, int, int, int, u_int); | 167 | void channel_set_fds(int, int, int, int, int, int, u_int); |
@@ -163,9 +171,9 @@ void channel_stop_listening(void); | |||
163 | 171 | ||
164 | void channel_send_open(int); | 172 | void channel_send_open(int); |
165 | void channel_request_start(int, char *, int); | 173 | void channel_request_start(int, char *, int); |
166 | void channel_register_cleanup(int, channel_callback_fn *); | 174 | void channel_register_cleanup(int, channel_callback_fn *, int); |
167 | void channel_register_confirm(int, channel_callback_fn *, void *); | 175 | void channel_register_confirm(int, channel_callback_fn *, void *); |
168 | void channel_register_filter(int, channel_filter_fn *); | 176 | void channel_register_filter(int, channel_infilter_fn *, channel_outfilter_fn *); |
169 | void channel_cancel_cleanup(int); | 177 | void channel_cancel_cleanup(int); |
170 | int channel_close_fd(int *); | 178 | int channel_close_fd(int *); |
171 | void channel_send_window_changes(void); | 179 | void channel_send_window_changes(void); |