=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/channels.h,v retrieving revision 1.12.2.1 retrieving revision 1.12.2.2 diff -u -r1.12.2.1 -r1.12.2.2 --- src/usr.bin/ssh/channels.h 2000/06/12 02:37:32 1.12.2.1 +++ 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.2.1 2000/06/12 02:37:32 jason 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);