|
Packit Service |
4684c1 |
/*
|
|
Packit Service |
4684c1 |
* Copyright (C) 2019 Red Hat, Inc.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* Author: Daiki Ueno
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This file is part of GnuTLS.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* The GnuTLS is free software; you can redistribute it and/or
|
|
Packit Service |
4684c1 |
* modify it under the terms of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* as published by the Free Software Foundation; either version 2.1 of
|
|
Packit Service |
4684c1 |
* the License, or (at your option) any later version.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* This library is distributed in the hope that it will be useful, but
|
|
Packit Service |
4684c1 |
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
4684c1 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
4684c1 |
* Lesser General Public License for more details.
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
* You should have received a copy of the GNU Lesser General Public License
|
|
Packit Service |
4684c1 |
* along with this program. If not, see <https://www.gnu.org/licenses/>
|
|
Packit Service |
4684c1 |
*
|
|
Packit Service |
4684c1 |
*/
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#ifndef GNUTLS_LIB_IOV_H
|
|
Packit Service |
4684c1 |
#define GNUTLS_LIB_IOV_H
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#include "gnutls_int.h"
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
struct iov_iter_st {
|
|
Packit Service |
4684c1 |
const giovec_t *iov;
|
|
Packit Service |
4684c1 |
size_t iov_count; /* the number of iov */
|
|
Packit Service |
4684c1 |
size_t iov_index; /* index of the current buffer */
|
|
Packit Service |
4684c1 |
size_t iov_offset; /* byte offset in the current buffer */
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
uint8_t block[MAX_CIPHER_BLOCK_SIZE]; /* incomplete block for reading */
|
|
Packit Service |
4684c1 |
size_t block_size; /* actual block size of the cipher */
|
|
Packit Service |
4684c1 |
size_t block_offset; /* offset in block */
|
|
Packit Service |
4684c1 |
};
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _gnutls_iov_iter_init(struct iov_iter_st *iter,
|
|
Packit Service |
4684c1 |
const giovec_t *iov, size_t iov_count,
|
|
Packit Service |
4684c1 |
size_t block_size);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
ssize_t _gnutls_iov_iter_next(struct iov_iter_st *iter, uint8_t **data);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
int _gnutls_iov_iter_sync(struct iov_iter_st *iter, const uint8_t *data,
|
|
Packit Service |
4684c1 |
size_t data_size);
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
#endif /* GNUTLS_LIB_IOV_H */
|