diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:02:36 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-07-04 04:02:36 +0000 |
commit | 16ae3d0dba5f81e5602798b915105284033dea75 (patch) | |
tree | ce0c2bf0d7e961b1015d43d1a07269d81e7a9ce9 /channels.h | |
parent | 90279d80f57c79ac6566051172a94a2cca9674b1 (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.h | 103 |
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 @@ | |||
65 | struct Channel; | 65 | struct Channel; |
66 | typedef struct Channel Channel; | 66 | typedef struct Channel Channel; |
67 | 67 | ||
68 | typedef void channel_callback_fn(int id, void *arg); | 68 | typedef void channel_callback_fn(int, void *); |
69 | typedef int channel_filter_fn(struct Channel *c, char *buf, int len); | 69 | typedef int channel_filter_fn(struct Channel *, char *, int); |
70 | 70 | ||
71 | struct Channel { | 71 | struct 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 | ||
145 | Channel *channel_lookup(int id); | 145 | Channel *channel_lookup(int); |
146 | Channel * | 146 | Channel *channel_new(char *, int, int, int, int, int, int, int, char *, int); |
147 | channel_new(char *ctype, int type, int rfd, int wfd, int efd, | 147 | void channel_set_fds(int, int, int, int, int, int); |
148 | int window, int maxpack, int extusage, char *remote_name, int nonblock); | 148 | void channel_free(Channel *); |
149 | void | ||
150 | channel_set_fds(int id, int rfd, int wfd, int efd, | ||
151 | int extusage, int nonblock); | ||
152 | void channel_free(Channel *c); | ||
153 | void channel_free_all(void); | 149 | void channel_free_all(void); |
154 | 150 | ||
155 | void channel_send_open(int id); | 151 | void channel_send_open(int); |
156 | void channel_request(int id, char *service, int wantconfirm); | 152 | void channel_request(int, char *, int); |
157 | void channel_request_start(int id, char *service, int wantconfirm); | 153 | void channel_request_start(int, char *, int); |
158 | void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg); | 154 | void channel_register_callback(int, int mtype, channel_callback_fn *, void *); |
159 | void channel_register_cleanup(int id, channel_callback_fn *fn); | 155 | void channel_register_cleanup(int, channel_callback_fn *); |
160 | void channel_register_filter(int id, channel_filter_fn *fn); | 156 | void channel_register_filter(int, channel_filter_fn *); |
161 | void channel_cancel_cleanup(int id); | 157 | void channel_cancel_cleanup(int); |
162 | 158 | ||
163 | /* protocol handler */ | 159 | /* protocol handler */ |
164 | 160 | ||
165 | void channel_input_channel_request(int type, int plen, void *ctxt); | 161 | void channel_input_channel_request(int, int, void *); |
166 | void channel_input_close(int type, int plen, void *ctxt); | 162 | void channel_input_close(int, int, void *); |
167 | void channel_input_close_confirmation(int type, int plen, void *ctxt); | 163 | void channel_input_close_confirmation(int, int, void *); |
168 | void channel_input_data(int type, int plen, void *ctxt); | 164 | void channel_input_data(int, int, void *); |
169 | void channel_input_extended_data(int type, int plen, void *ctxt); | 165 | void channel_input_extended_data(int, int, void *); |
170 | void channel_input_ieof(int type, int plen, void *ctxt); | 166 | void channel_input_ieof(int, int, void *); |
171 | void channel_input_oclose(int type, int plen, void *ctxt); | 167 | void channel_input_oclose(int, int, void *); |
172 | void channel_input_open_confirmation(int type, int plen, void *ctxt); | 168 | void channel_input_open_confirmation(int, int, void *); |
173 | void channel_input_open_failure(int type, int plen, void *ctxt); | 169 | void channel_input_open_failure(int, int, void *); |
174 | void channel_input_port_open(int type, int plen, void *ctxt); | 170 | void channel_input_port_open(int, int, void *); |
175 | void channel_input_window_adjust(int type, int plen, void *ctxt); | 171 | void channel_input_window_adjust(int, int, void *); |
176 | 172 | ||
177 | /* file descriptor handling (read/write) */ | 173 | /* file descriptor handling (read/write) */ |
178 | 174 | ||
179 | void | 175 | void |
180 | channel_prepare_select(fd_set **readsetp, fd_set **writesetp, int *maxfdp, | 176 | channel_prepare_select(fd_set **, fd_set **, int *, int); |
181 | int rekeying); | 177 | void channel_after_select(fd_set *, fd_set *); |
182 | void channel_after_select(fd_set * readset, fd_set * writeset); | ||
183 | void channel_output_poll(void); | 178 | void channel_output_poll(void); |
184 | 179 | ||
185 | int channel_not_very_much_buffered_data(void); | 180 | int 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 */ |
193 | int | 188 | int |
194 | channel_request_local_forwarding(u_short listen_port, | 189 | channel_request_local_forwarding(u_short, const char *, u_short, int); |
195 | const char *host_to_connect, u_short port_to_connect, int gateway_ports); | ||
196 | int | 190 | int |
197 | channel_request_forwarding(const char *listen_address, u_short listen_port, | 191 | channel_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); | ||
200 | void | 193 | void |
201 | channel_request_remote_forwarding(u_short port, const char *host, | 194 | channel_request_remote_forwarding(u_short, const char *, u_short); |
202 | u_short remote_port); | ||
203 | void channel_permit_all_opens(void); | 195 | void channel_permit_all_opens(void); |
204 | void channel_add_permitted_opens(char *host, int port); | 196 | void channel_add_permitted_opens(char *, int); |
205 | void channel_clear_permitted_opens(void); | 197 | void channel_clear_permitted_opens(void); |
206 | void channel_input_port_forward_request(int is_root, int gateway_ports); | 198 | void channel_input_port_forward_request(int, int); |
207 | int channel_connect_to(const char *host, u_short host_port); | 199 | int channel_connect_to(const char *, u_short); |
208 | int channel_connect_by_listen_adress(u_short listen_port); | 200 | int channel_connect_by_listen_adress(u_short); |
209 | 201 | ||
210 | /* x11 forwarding */ | 202 | /* x11 forwarding */ |
211 | 203 | ||
212 | int x11_connect_display(void); | 204 | int x11_connect_display(void); |
213 | char *x11_create_display(int screen); | 205 | char *x11_create_display(int); |
214 | char *x11_create_display_inet(int screen, int x11_display_offset); | 206 | char *x11_create_display_inet(int, int); |
215 | void x11_input_open(int type, int plen, void *ctxt); | 207 | void x11_input_open(int, int, void *); |
216 | void x11_request_forwarding(void); | 208 | void x11_request_forwarding(void); |
217 | void | 209 | void |
218 | x11_request_forwarding_with_spoofing(int client_session_id, | 210 | x11_request_forwarding_with_spoofing(int, const char *, const char *); |
219 | const char *proto, const char *data); | 211 | void deny_input_open(int, int, void *); |
220 | void deny_input_open(int type, int plen, void *ctxt); | ||
221 | 212 | ||
222 | /* agent forwarding */ | 213 | /* agent forwarding */ |
223 | 214 | ||
224 | void auth_request_forwarding(void); | 215 | void auth_request_forwarding(void); |
225 | char *auth_get_socket_name(void); | 216 | char *auth_get_socket_name(void); |
226 | void auth_sock_cleanup_proc(void *pw); | 217 | void auth_sock_cleanup_proc(void *); |
227 | int auth_input_request_forwarding(struct passwd * pw); | 218 | int auth_input_request_forwarding(struct passwd *); |
228 | void auth_input_open_request(int type, int plen, void *ctxt); | 219 | void auth_input_open_request(int, int, void *); |
229 | 220 | ||
230 | /* channel close */ | 221 | /* channel close */ |
231 | 222 | ||
232 | typedef void chan_event_fn(Channel * c); | 223 | typedef void chan_event_fn(Channel *); |
233 | 224 | ||
234 | /* for the input state */ | 225 | /* for the input state */ |
235 | extern chan_event_fn *chan_rcvd_oclose; | 226 | extern chan_event_fn *chan_rcvd_oclose; |
@@ -241,9 +232,9 @@ extern chan_event_fn *chan_rcvd_ieof; | |||
241 | extern chan_event_fn *chan_write_failed; | 232 | extern chan_event_fn *chan_write_failed; |
242 | extern chan_event_fn *chan_obuf_empty; | 233 | extern chan_event_fn *chan_obuf_empty; |
243 | 234 | ||
244 | int chan_is_dead(Channel * c); | 235 | int chan_is_dead(Channel *); |
245 | void chan_mark_dead(Channel * c); | 236 | void chan_mark_dead(Channel *); |
246 | void chan_init_iostates(Channel * c); | 237 | void chan_init_iostates(Channel *); |
247 | void chan_init(void); | 238 | void chan_init(void); |
248 | 239 | ||
249 | #endif | 240 | #endif |