Statistics
| Branch: | Revision:

root / iov.h @ 9e37b9dc

History | View | Annotate | Download (907 Bytes)

1 e4d5639d Amit Shah
/*
2 e4d5639d Amit Shah
 * Helpers for getting linearized buffers from iov / filling buffers into iovs
3 e4d5639d Amit Shah
 *
4 e4d5639d Amit Shah
 * Copyright (C) 2010 Red Hat, Inc.
5 e4d5639d Amit Shah
 *
6 e4d5639d Amit Shah
 * Author(s):
7 e4d5639d Amit Shah
 *  Amit Shah <amit.shah@redhat.com>
8 e4d5639d Amit Shah
 *
9 e4d5639d Amit Shah
 * This work is licensed under the terms of the GNU GPL, version 2.  See
10 e4d5639d Amit Shah
 * the COPYING file in the top-level directory.
11 e4d5639d Amit Shah
 */
12 e4d5639d Amit Shah
13 e4d5639d Amit Shah
#include "qemu-common.h"
14 e4d5639d Amit Shah
15 348e7b8d Hannes Reinecke
size_t iov_from_buf(struct iovec *iov, unsigned int iov_cnt,
16 348e7b8d Hannes Reinecke
                    const void *buf, size_t iov_off, size_t size);
17 348e7b8d Hannes Reinecke
size_t iov_to_buf(const struct iovec *iov, const unsigned int iov_cnt,
18 348e7b8d Hannes Reinecke
                  void *buf, size_t iov_off, size_t size);
19 348e7b8d Hannes Reinecke
size_t iov_size(const struct iovec *iov, const unsigned int iov_cnt);
20 8d15028e Gerd Hoffmann
size_t iov_clear(const struct iovec *iov, const unsigned int iov_cnt,
21 8d15028e Gerd Hoffmann
                 size_t iov_off, size_t size);
22 3a1dca94 Gerd Hoffmann
void iov_hexdump(const struct iovec *iov, const unsigned int iov_cnt,
23 3a1dca94 Gerd Hoffmann
                 FILE *fp, const char *prefix, size_t limit);