summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:02:36 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-07-04 04:02:36 +0000
commit16ae3d0dba5f81e5602798b915105284033dea75 (patch)
treece0c2bf0d7e961b1015d43d1a07269d81e7a9ce9 /channels.h
parent90279d80f57c79ac6566051172a94a2cca9674b1 (diff)
- itojun@cvs.openbsd.org 2001/06/26 06:32:58
[atomicio.h 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.h hostfile.h kex.h key.h log.h mac.h match.h misc.h mpaux.h packet.h radix.h readconf.h readpass.h rsa.h] prototype pedant. not very creative... - () -> (void) - no variable names
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h103
1 files changed, 47 insertions, 56 deletions
diff --git a/channels.h b/channels.h
index 0ce8372bd..3a114e070 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.40 2001/06/25 08:25:36 markus Exp $"); */ 35/* RCSID("$OpenBSD: channels.h,v 1.41 2001/06/26 06:32:49 itojun Exp $"); */
36 36
37#ifndef CHANNEL_H 37#ifndef CHANNEL_H
38#define CHANNEL_H 38#define CHANNEL_H
@@ -65,8 +65,8 @@
65struct Channel; 65struct Channel;
66typedef struct Channel Channel; 66typedef struct Channel Channel;
67 67
68typedef void channel_callback_fn(int id, void *arg); 68typedef void channel_callback_fn(int, void *);
69typedef int channel_filter_fn(struct Channel *c, char *buf, int len); 69typedef int channel_filter_fn(struct Channel *, char *, int);
70 70
71struct Channel { 71struct Channel {
72 int type; /* channel type/state */ 72 int type; /* channel type/state */
@@ -142,44 +142,39 @@ struct Channel {
142 142
143/* channel management */ 143/* channel management */
144 144
145Channel *channel_lookup(int id); 145Channel *channel_lookup(int);
146Channel * 146Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int);
147channel_new(char *ctype, int type, int rfd, int wfd, int efd, 147void channel_set_fds(int, int, int, int, int, int);
148 int window, int maxpack, int extusage, char *remote_name, int nonblock); 148void channel_free(Channel *);
149void
150channel_set_fds(int id, int rfd, int wfd, int efd,
151 int extusage, int nonblock);
152void channel_free(Channel *c);
153void channel_free_all(void); 149void channel_free_all(void);
154 150
155void channel_send_open(int id); 151void channel_send_open(int);
156void channel_request(int id, char *service, int wantconfirm); 152void channel_request(int, char *, int);
157void channel_request_start(int id, char *service, int wantconfirm); 153void channel_request_start(int, char *, int);
158void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg); 154void channel_register_callback(int, int mtype, channel_callback_fn *, void *);
159void channel_register_cleanup(int id, channel_callback_fn *fn); 155void channel_register_cleanup(int, channel_callback_fn *);
160void channel_register_filter(int id, channel_filter_fn *fn); 156void channel_register_filter(int, channel_filter_fn *);
161void channel_cancel_cleanup(int id); 157void channel_cancel_cleanup(int);
162 158
163/* protocol handler */ 159/* protocol handler */
164 160
165void channel_input_channel_request(int type, int plen, void *ctxt); 161void channel_input_channel_request(int, int, void *);
166void channel_input_close(int type, int plen, void *ctxt); 162void channel_input_close(int, int, void *);
167void channel_input_close_confirmation(int type, int plen, void *ctxt); 163void channel_input_close_confirmation(int, int, void *);
168void channel_input_data(int type, int plen, void *ctxt); 164void channel_input_data(int, int, void *);
169void channel_input_extended_data(int type, int plen, void *ctxt); 165void channel_input_extended_data(int, int, void *);
170void channel_input_ieof(int type, int plen, void *ctxt); 166void channel_input_ieof(int, int, void *);
171void channel_input_oclose(int type, int plen, void *ctxt); 167void channel_input_oclose(int, int, void *);
172void channel_input_open_confirmation(int type, int plen, void *ctxt); 168void channel_input_open_confirmation(int, int, void *);
173void channel_input_open_failure(int type, int plen, void *ctxt); 169void channel_input_open_failure(int, int, void *);
174void channel_input_port_open(int type, int plen, void *ctxt); 170void channel_input_port_open(int, int, void *);
175void channel_input_window_adjust(int type, int plen, void *ctxt); 171void channel_input_window_adjust(int, int, void *);
176 172
177/* file descriptor handling (read/write) */ 173/* file descriptor handling (read/write) */
178 174
179void 175void
180channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, 176channel_prepare_select(fd_set **, fd_set **, int *, int);
181 int rekeying); 177void channel_after_select(fd_set *, fd_set *);
182void channel_after_select(fd_set * readset, fd_set * writeset);
183void channel_output_poll(void); 178void channel_output_poll(void);
184 179
185int channel_not_very_much_buffered_data(void); 180int channel_not_very_much_buffered_data(void);
@@ -191,45 +186,41 @@ int channel_find_open(void);
191 186
192/* channel_tcpfwd.c */ 187/* channel_tcpfwd.c */
193int 188int
194channel_request_local_forwarding(u_short listen_port, 189channel_request_local_forwarding(u_short, const char *, u_short, int);
195 const char *host_to_connect, u_short port_to_connect, int gateway_ports);
196int 190int
197channel_request_forwarding(const char *listen_address, u_short listen_port, 191channel_request_forwarding(const char *, u_short, const char *, u_short, int,
198 const char *host_to_connect, u_short port_to_connect, int gateway_ports, 192 int);
199 int remote_fwd);
200void 193void
201channel_request_remote_forwarding(u_short port, const char *host, 194channel_request_remote_forwarding(u_short, const char *, u_short);
202 u_short remote_port);
203void channel_permit_all_opens(void); 195void channel_permit_all_opens(void);
204void channel_add_permitted_opens(char *host, int port); 196void channel_add_permitted_opens(char *, int);
205void channel_clear_permitted_opens(void); 197void channel_clear_permitted_opens(void);
206void channel_input_port_forward_request(int is_root, int gateway_ports); 198void channel_input_port_forward_request(int, int);
207int channel_connect_to(const char *host, u_short host_port); 199int channel_connect_to(const char *, u_short);
208int channel_connect_by_listen_adress(u_short listen_port); 200int channel_connect_by_listen_adress(u_short);
209 201
210/* x11 forwarding */ 202/* x11 forwarding */
211 203
212int x11_connect_display(void); 204int x11_connect_display(void);
213char *x11_create_display(int screen); 205char *x11_create_display(int);
214char *x11_create_display_inet(int screen, int x11_display_offset); 206char *x11_create_display_inet(int, int);
215void x11_input_open(int type, int plen, void *ctxt); 207void x11_input_open(int, int, void *);
216void x11_request_forwarding(void); 208void x11_request_forwarding(void);
217void 209void
218x11_request_forwarding_with_spoofing(int client_session_id, 210x11_request_forwarding_with_spoofing(int, const char *, const char *);
219 const char *proto, const char *data); 211void deny_input_open(int, int, void *);
220void deny_input_open(int type, int plen, void *ctxt);
221 212
222/* agent forwarding */ 213/* agent forwarding */
223 214
224void auth_request_forwarding(void); 215void auth_request_forwarding(void);
225char *auth_get_socket_name(void); 216char *auth_get_socket_name(void);
226void auth_sock_cleanup_proc(void *pw); 217void auth_sock_cleanup_proc(void *);
227int auth_input_request_forwarding(struct passwd * pw); 218int auth_input_request_forwarding(struct passwd *);
228void auth_input_open_request(int type, int plen, void *ctxt); 219void auth_input_open_request(int, int, void *);
229 220
230/* channel close */ 221/* channel close */
231 222
232typedef void chan_event_fn(Channel * c); 223typedef void chan_event_fn(Channel *);
233 224
234/* for the input state */ 225/* for the input state */
235extern chan_event_fn *chan_rcvd_oclose; 226extern chan_event_fn *chan_rcvd_oclose;
@@ -241,9 +232,9 @@ extern chan_event_fn *chan_rcvd_ieof;
241extern chan_event_fn *chan_write_failed; 232extern chan_event_fn *chan_write_failed;
242extern chan_event_fn *chan_obuf_empty; 233extern chan_event_fn *chan_obuf_empty;
243 234
244int chan_is_dead(Channel * c); 235int chan_is_dead(Channel *);
245void chan_mark_dead(Channel * c); 236void chan_mark_dead(Channel *);
246void chan_init_iostates(Channel * c); 237void chan_init_iostates(Channel *);
247void chan_init(void); 238void chan_init(void);
248 239
249#endif 240#endif