diff options
author | 2005-12-30 15:56:36 +0000 | |
---|---|---|
committer | 2005-12-30 15:56:36 +0000 | |
commit | a1bcc0815ed72437eab4dcf5622c7593d99035ea (patch) | |
tree | 7fce1d084e81f0b930a1f55ddfccf6c9009d62e1 /usr.bin/ssh/channels.h | |
parent | Use sys/hash.h instead of own built functions that work similar. (diff) | |
download | wireguard-openbsd-a1bcc0815ed72437eab4dcf5622c7593d99035ea.tar.xz wireguard-openbsd-a1bcc0815ed72437eab4dcf5622c7593d99035ea.zip |
add channel output filter interface.
ok djm@, suggested by markus@
Diffstat (limited to 'usr.bin/ssh/channels.h')
-rw-r--r-- | usr.bin/ssh/channels.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/ssh/channels.h b/usr.bin/ssh/channels.h index b0316991023..51d28b77224 100644 --- a/usr.bin/ssh/channels.h +++ b/usr.bin/ssh/channels.h @@ -1,4 +1,4 @@ -/* $OpenBSD: channels.h,v 1.82 2005/12/12 13:46:18 markus Exp $ */ +/* $OpenBSD: channels.h,v 1.83 2005/12/30 15:56:37 reyk Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> @@ -63,7 +63,8 @@ struct Channel; typedef struct Channel Channel; typedef void channel_callback_fn(int, void *); -typedef int channel_filter_fn(struct Channel *, char *, int); +typedef int channel_infilter_fn(struct Channel *, char *, int); +typedef u_char *channel_outfilter_fn(struct Channel *, u_char **, u_int *); struct Channel { int type; /* channel type/state */ @@ -110,7 +111,8 @@ struct Channel { int detach_close; /* filter */ - channel_filter_fn *input_filter; + channel_infilter_fn *input_filter; + channel_outfilter_fn *output_filter; int datagram; /* keep boundaries */ }; @@ -144,6 +146,8 @@ struct Channel { #define CHAN_EOF_SENT 0x04 #define CHAN_EOF_RCVD 0x08 +#define CHAN_RBUF 16*1024 + /* check whether 'efd' is still in use */ #define CHANNEL_EFD_INPUT_ACTIVE(c) \ (compat20 && c->extended_usage == CHAN_EXTENDED_READ && \ @@ -168,7 +172,7 @@ void channel_send_open(int); void channel_request_start(int, char *, int); void channel_register_cleanup(int, channel_callback_fn *, int); void channel_register_confirm(int, channel_callback_fn *, void *); -void channel_register_filter(int, channel_filter_fn *); +void channel_register_filter(int, channel_infilter_fn *, channel_outfilter_fn *); void channel_cancel_cleanup(int); int channel_close_fd(int *); void channel_send_window_changes(void); |