summaryrefslogtreecommitdiff
path: root/channels.h
diff options
context:
space:
mode:
Diffstat (limited to 'channels.h')
-rw-r--r--channels.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/channels.h b/channels.h
index 9629124b9..9acdf5810 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
1/* RCSID("$OpenBSD: channels.h,v 1.14 2000/06/20 01:39:40 markus Exp $"); */ 1/* RCSID("$OpenBSD: channels.h,v 1.16 2000/08/19 21:55:51 markus Exp $"); */
2 2
3#ifndef CHANNELS_H 3#ifndef CHANNELS_H
4#define CHANNELS_H 4#define CHANNELS_H
@@ -21,9 +21,13 @@
21 * Data structure for channel data. This is iniailized in channel_allocate 21 * Data structure for channel data. This is iniailized in channel_allocate
22 * and cleared in channel_free. 22 * and cleared in channel_free.
23 */ 23 */
24struct Channel;
25typedef struct Channel Channel;
26
24typedef void channel_callback_fn(int id, void *arg); 27typedef void channel_callback_fn(int id, void *arg);
28typedef int channel_filter_fn(struct Channel *c, char *buf, int len);
25 29
26typedef struct Channel { 30struct Channel {
27 int type; /* channel type/state */ 31 int type; /* channel type/state */
28 int self; /* my own channel identifier */ 32 int self; /* my own channel identifier */
29 int remote_id; /* channel identifier for remote peer */ 33 int remote_id; /* channel identifier for remote peer */
@@ -61,7 +65,10 @@ typedef struct Channel {
61 void *cb_arg; 65 void *cb_arg;
62 int cb_event; 66 int cb_event;
63 channel_callback_fn *dettach_user; 67 channel_callback_fn *dettach_user;
64} Channel; 68
69 /* filter */
70 channel_filter_fn *input_filter;
71};
65 72
66#define CHAN_EXTENDED_IGNORE 0 73#define CHAN_EXTENDED_IGNORE 0
67#define CHAN_EXTENDED_READ 1 74#define CHAN_EXTENDED_READ 1
@@ -73,6 +80,7 @@ void channel_request(int id, char *service, int wantconfirm);
73void channel_request_start(int id, char *service, int wantconfirm); 80void channel_request_start(int id, char *service, int wantconfirm);
74void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg); 81void channel_register_callback(int id, int mtype, channel_callback_fn *fn, void *arg);
75void channel_register_cleanup(int id, channel_callback_fn *fn); 82void channel_register_cleanup(int id, channel_callback_fn *fn);
83void channel_register_filter(int id, channel_filter_fn *fn);
76void channel_cancel_cleanup(int id); 84void channel_cancel_cleanup(int id);
77Channel *channel_lookup(int id); 85Channel *channel_lookup(int id);
78 86