9 #include <gpxe/stream.h>
11 /** A filter stream */
12 struct filter_stream {
15 * This is the end pointing towards the bottom-level
16 * connection (e.g. TCP).
18 struct stream_application downstream;
21 * This is the end pointing towards the top-level application
24 struct stream_connection upstream;
27 extern void filter_connected ( struct stream_application *app );
28 extern void filter_closed ( struct stream_application *app, int rc );
29 extern void filter_senddata ( struct stream_application *app,
30 void *data, size_t len );
31 extern void filter_acked ( struct stream_application *app, size_t len );
32 extern void filter_newdata ( struct stream_application *app,
33 void *data, size_t len );
35 extern int filter_bind ( struct stream_connection *conn,
36 struct sockaddr *local );
37 extern int filter_connect ( struct stream_connection *conn,
38 struct sockaddr *peer );
39 extern void filter_close ( struct stream_connection *conn );
40 extern int filter_send ( struct stream_connection *conn,
41 void *data, size_t len );
42 extern int filter_kick ( struct stream_connection *conn );
44 extern int insert_filter ( struct stream_application *app,
45 struct filter_stream *filter );
47 #endif /* _GPXE_FILTER_H */