diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:46:56 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:46:56 +0000 |
commit | 4cc240dabbd81a308f06f2717b1942041fe0e205 (patch) | |
tree | 07291c8c2c467fc2ecec9166ed0d8ec1e75631a3 /channels.h | |
parent | 5bf5d67d497ed91c19851db6b904d54003afe67e (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.h | 123 |
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 | */ | ||
65 | struct Channel; | 61 | struct Channel; |
66 | typedef struct Channel Channel; | 62 | typedef 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 | ||
145 | Channel *channel_lookup(int); | 140 | Channel *channel_lookup(int); |
146 | Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int); | 141 | Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int); |
147 | void channel_set_fds(int, int, int, int, int, int); | 142 | void channel_set_fds(int, int, int, int, int, int); |
148 | void channel_free(Channel *); | 143 | void channel_free(Channel *); |
149 | void channel_free_all(void); | 144 | void channel_free_all(void); |
150 | 145 | ||
151 | void channel_send_open(int); | 146 | void channel_send_open(int); |
152 | void channel_request(int, char *, int); | 147 | void channel_request(int, char *, int); |
153 | void channel_request_start(int, char *, int); | 148 | void channel_request_start(int, char *, int); |
154 | void channel_register_callback(int, int mtype, channel_callback_fn *, void *); | 149 | void channel_register_callback(int, int mtype, channel_callback_fn *, void *); |
155 | void channel_register_cleanup(int, channel_callback_fn *); | 150 | void channel_register_cleanup(int, channel_callback_fn *); |
156 | void channel_register_filter(int, channel_filter_fn *); | 151 | void channel_register_filter(int, channel_filter_fn *); |
157 | void channel_cancel_cleanup(int); | 152 | void channel_cancel_cleanup(int); |
158 | 153 | ||
159 | /* protocol handler */ | 154 | /* protocol handler */ |
160 | 155 | ||
161 | void channel_input_channel_request(int, int, void *); | 156 | void channel_input_channel_request(int, int, void *); |
162 | void channel_input_close(int, int, void *); | 157 | void channel_input_close(int, int, void *); |
163 | void channel_input_close_confirmation(int, int, void *); | 158 | void channel_input_close_confirmation(int, int, void *); |
164 | void channel_input_data(int, int, void *); | 159 | void channel_input_data(int, int, void *); |
165 | void channel_input_extended_data(int, int, void *); | 160 | void channel_input_extended_data(int, int, void *); |
166 | void channel_input_ieof(int, int, void *); | 161 | void channel_input_ieof(int, int, void *); |
167 | void channel_input_oclose(int, int, void *); | 162 | void channel_input_oclose(int, int, void *); |
168 | void channel_input_open_confirmation(int, int, void *); | 163 | void channel_input_open_confirmation(int, int, void *); |
169 | void channel_input_open_failure(int, int, void *); | 164 | void channel_input_open_failure(int, int, void *); |
170 | void channel_input_port_open(int, int, void *); | 165 | void channel_input_port_open(int, int, void *); |
171 | void channel_input_window_adjust(int, int, void *); | 166 | void channel_input_window_adjust(int, int, void *); |
172 | 167 | ||
173 | /* file descriptor handling (read/write) */ | 168 | /* file descriptor handling (read/write) */ |
174 | 169 | ||
175 | void | 170 | void channel_prepare_select(fd_set **, fd_set **, int *, int); |
176 | channel_prepare_select(fd_set **, fd_set **, int *, int); | 171 | void channel_after_select(fd_set *, fd_set *); |
177 | void channel_after_select(fd_set *, fd_set *); | 172 | void channel_output_poll(void); |
178 | void channel_output_poll(void); | ||
179 | 173 | ||
180 | int channel_not_very_much_buffered_data(void); | 174 | int channel_not_very_much_buffered_data(void); |
181 | void channel_close_all(void); | 175 | void channel_close_all(void); |
182 | void channel_free_all(void); | 176 | void channel_free_all(void); |
183 | int channel_still_open(void); | 177 | int channel_still_open(void); |
184 | char *channel_open_message(void); | 178 | char *channel_open_message(void); |
185 | int channel_find_open(void); | 179 | int channel_find_open(void); |
186 | 180 | ||
187 | /* channel_tcpfwd.c */ | 181 | /* channel_tcpfwd.c */ |
188 | int | 182 | void channel_permit_all_opens(void); |
189 | channel_request_local_forwarding(u_short, const char *, u_short, int); | 183 | void channel_add_permitted_opens(char *, int); |
184 | void channel_clear_permitted_opens(void); | ||
185 | void channel_input_port_forward_request(int, int); | ||
186 | int channel_connect_to(const char *, u_short); | ||
187 | int channel_connect_by_listen_adress(u_short); | ||
188 | void channel_request_remote_forwarding(u_short, const char *, u_short); | ||
189 | int channel_request_local_forwarding(u_short, const char *, u_short, int); | ||
190 | int | 190 | int |
191 | channel_request_forwarding(const char *, u_short, const char *, u_short, int, | 191 | channel_request_forwarding(const char *, u_short, const char *, u_short, int, |
192 | int); | 192 | int); |
193 | void | ||
194 | channel_request_remote_forwarding(u_short, const char *, u_short); | ||
195 | void channel_permit_all_opens(void); | ||
196 | void channel_add_permitted_opens(char *, int); | ||
197 | void channel_clear_permitted_opens(void); | ||
198 | void channel_input_port_forward_request(int, int); | ||
199 | int channel_connect_to(const char *, u_short); | ||
200 | int channel_connect_by_listen_adress(u_short); | ||
201 | 193 | ||
202 | /* x11 forwarding */ | 194 | /* x11 forwarding */ |
203 | 195 | ||
204 | int x11_connect_display(void); | 196 | int x11_connect_display(void); |
205 | char *x11_create_display(int); | 197 | char *x11_create_display(int); |
206 | char *x11_create_display_inet(int, int); | 198 | char *x11_create_display_inet(int, int); |
207 | void x11_input_open(int, int, void *); | 199 | void x11_input_open(int, int, void *); |
208 | void x11_request_forwarding(void); | 200 | void x11_request_forwarding(void); |
209 | void | 201 | void x11_request_forwarding_with_spoofing(int, const char *, const char *); |
210 | x11_request_forwarding_with_spoofing(int, const char *, const char *); | 202 | void deny_input_open(int, int, void *); |
211 | void deny_input_open(int, int, void *); | ||
212 | 203 | ||
213 | /* agent forwarding */ | 204 | /* agent forwarding */ |
214 | 205 | ||
215 | void auth_request_forwarding(void); | 206 | void auth_request_forwarding(void); |
216 | char *auth_get_socket_name(void); | 207 | char *auth_get_socket_name(void); |
217 | void auth_sock_cleanup_proc(void *); | 208 | void auth_sock_cleanup_proc(void *); |
218 | int auth_input_request_forwarding(struct passwd *); | 209 | int auth_input_request_forwarding(struct passwd *); |
219 | void auth_input_open_request(int, int, void *); | 210 | void auth_input_open_request(int, int, void *); |
220 | 211 | ||
221 | /* channel close */ | 212 | /* channel close */ |
222 | 213 | ||
214 | int chan_is_dead(Channel *); | ||
215 | void chan_mark_dead(Channel *); | ||
216 | void chan_init_iostates(Channel *); | ||
217 | void chan_init(void); | ||
218 | |||
223 | typedef void chan_event_fn(Channel *); | 219 | typedef 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; | |||
232 | extern chan_event_fn *chan_write_failed; | 228 | extern chan_event_fn *chan_write_failed; |
233 | extern chan_event_fn *chan_obuf_empty; | 229 | extern chan_event_fn *chan_obuf_empty; |
234 | 230 | ||
235 | int chan_is_dead(Channel *); | ||
236 | void chan_mark_dead(Channel *); | ||
237 | void chan_init_iostates(Channel *); | ||
238 | void chan_init(void); | ||
239 | |||
240 | #endif | 231 | #endif |