1 /*
2  * Copyright (c) 2014 Travis Geiselbrecht
3  *
4  * Use of this source code is governed by a MIT-style
5  * license that can be found in the LICENSE file or at
6  * https://opensource.org/licenses/MIT
7  */
8 #pragma once
9 
10 #include <lk/compiler.h>
11 #include <stddef.h>
12 #include <sys/types.h>
13 
14 __BEGIN_CDECLS
15 
16 typedef struct iovec {
17     void *iov_base;
18     size_t iov_len;
19 } iovec_t;
20 
21 ssize_t iovec_size(const iovec_t *iov, uint iov_cnt);
22 
23 ssize_t iovec_to_membuf(uint8_t *buf, uint buf_len,
24                         const iovec_t *iov, uint iov_cnt, uint iov_pos);
25 
26 __END_CDECLS
27 
28