filter_can_write (struct backend *b, struct connection *conn)
{
  struct backend_filter *f = container_of (b, struct backend_filter, backend);
  void *handle = connection_get_handle (conn, b->i);
  struct b_conn nxdata = { .b = b->next, .conn = conn };

  if (f->filter.can_write)
    return f->filter.can_write (&next_ops, &nxdata, handle);
  else
    return backend_can_write (b->next, conn);
}
filter_can_write (struct backend *b, struct connection *conn)
{
  struct backend_filter *f = container_of (b, struct backend_filter, backend);
  void *handle = connection_get_handle (conn, b->i);
  struct b_conn nxdata = { .b = b->next, .conn = conn };

  if (f->filter.can_write)
    return f->filter.can_write (&next_ops, &nxdata, handle);
  else
    return backend_can_write (b->next, conn);
}