=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/channels.h,v retrieving revision 1.12 retrieving revision 1.12.2.2 diff -u -r1.12 -r1.12.2.2 --- src/usr.bin/ssh/channels.h 2000/05/03 18:03:06 1.12 +++ src/usr.bin/ssh/channels.h 2000/09/01 18:23:18 1.12.2.2 @@ -1,4 +1,4 @@ -/* RCSID("$Id: channels.h,v 1.12 2000/05/03 18:03:06 markus Exp $"); */ +/* RCSID("$OpenBSD: channels.h,v 1.12.2.2 2000/09/01 18:23:18 jason Exp $"); */ #ifndef CHANNELS_H #define CHANNELS_H @@ -21,9 +21,13 @@ * Data structure for channel data. This is iniailized in channel_allocate * and cleared in channel_free. */ +struct Channel; +typedef struct Channel Channel; + typedef void channel_callback_fn(int id, void *arg); +typedef int channel_filter_fn(struct Channel *c, char *buf, int len); -typedef struct Channel { +struct Channel { int type; /* channel type/state */ int self; /* my own channel identifier */ int remote_id; /* channel identifier for remote peer */ @@ -61,8 +65,11 @@ void *cb_arg; int cb_event; channel_callback_fn *dettach_user; -} Channel; + /* filter */ + channel_filter_fn *input_filter; +}; + #define CHAN_EXTENDED_IGNORE 0 #define CHAN_EXTENDED_READ 1 #define CHAN_EXTENDED_WRITE 2 @@ -73,6 +80,7 @@ void channel_request_start(int id, char *service, int wantconfirm); void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg); void channel_register_cleanup(int id, channel_callback_fn *fn); +void channel_register_filter(int id, channel_filter_fn *fn); void channel_cancel_cleanup(int id); Channel *channel_lookup(int id); @@ -222,10 +230,10 @@ char *auth_get_socket_name(void); /* - * This if called to process SSH_CMSG_AGENT_REQUEST_FORWARDING on the server. + * This is called to process SSH_CMSG_AGENT_REQUEST_FORWARDING on the server. * This starts forwarding authentication requests. */ -void auth_input_request_forwarding(struct passwd * pw); +int auth_input_request_forwarding(struct passwd * pw); /* This is called to process an SSH_SMSG_AGENT_OPEN message. */ void auth_input_open_request(int type, int plen);