blob: 1a88dd7e02c9faf8963ed51bfa6d2fd354e071b7 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors
// Copyright (c) 2014 Travis Geiselbrecht
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT
#ifndef __IOVEC_H
#define __IOVEC_H
#include <magenta/compiler.h>
#include <stddef.h>
#include <sys/types.h>
__BEGIN_CDECLS;
typedef struct iovec {
void *iov_base;
size_t iov_len;
} iovec_t;
ssize_t iovec_size(const iovec_t *iov, uint iov_cnt);
ssize_t iovec_to_membuf(uint8_t *buf, uint buf_len,
const iovec_t *iov, uint iov_cnt, uint iov_pos);
__END_CDECLS;
#endif