Avoid proxy for bypass_socket, enable_udp_decap
[strongswan.git] / src / charon-tkm / src / tkm / tkm_utils.h
1 /*
2 * Copyright (C) 2012 Reto Buerki
3 * Copyright (C) 2012 Adrian-Ken Rueegsegger
4 * Hochschule fuer Technik Rapperswil
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 #ifndef TKM_UTILS_H_
18 #define TKM_UTILS_H_
19
20 #include <utils/chunk.h>
21 #include <tkm/types.h>
22
23 /**
24 * Convert byte sequence to chunk.
25 *
26 * @param first pointer to first byte of sequence
27 * @param len length of byte sequence
28 * @param chunk pointer to chunk struct
29 */
30 void sequence_to_chunk(const byte_t * const first, const uint32_t len,
31 chunk_t * const chunk);
32
33 /**
34 * Convert chunk to variable-length byte sequence.
35 *
36 * @param chunk pointer to chunk struct
37 * @param sequence pointer to variable-length sequence
38 */
39 void chunk_to_sequence(const chunk_t * const chunk, void *sequence);
40
41 #endif /** TKM_UTILS_H_ */