#ifndef KERNEL_IOVEC_H_ #define KERNEL_IOVEC_H_ #include #include struct iovec_iterator { /* if this is set, we are iterating over a list of iovecs stored in * userspace, and must go through this region to retrieve the data. */ struct vm_region *it_region; const kern_iovec_t *it_vecs; size_t it_nr_vecs; size_t it_vec_ptr; virt_addr_t it_base; size_t it_len; }; extern void iovec_iterator_begin( struct iovec_iterator *it, const kern_iovec_t *vecs, size_t nr_vecs); extern void iovec_iterator_begin_user( struct iovec_iterator *it, struct vm_region *address_space, const kern_iovec_t *vecs, size_t nr_vecs); extern void iovec_iterator_seek(struct iovec_iterator *it, size_t nr_bytes); #endif