int bo_getblk_nc(struct channel *chn, char **blk1, int *len1, char **blk2, int *len2);
+/* returns a pointer to the session the channel belongs to */
+static inline struct session *chn_sess(const struct channel *chn)
+{
+ if (chn->flags & CF_ISRESP)
+ return LIST_ELEM(chn, struct session *, res);
+ else
+ return LIST_ELEM(chn, struct session *, req);
+}
+
/* returns a pointer to the stream interface feeding the channel (producer) */
static inline struct stream_interface *chn_prod(const struct channel *chn)
{