1 /* 2 Copyright (c) 2021 Fraunhofer AISEC. See the COPYRIGHT 3 file at the top-level directory of this distribution. 4 5 Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 6 http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 7 <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 8 option. This file may not be copied, modified, or distributed 9 except according to those terms. 10 */ 11 #ifndef EDHOC_TXRX_WRAPPER_H 12 #define EDHOC_TXRX_WRAPPER_H 13 14 #include "common/byte_array.h" 15 16 /** 17 * @brief The user should call inside this function its 18 * send function. 19 * 20 * @param[in] data Pointer to the data to be send. 21 * @param data_len Length of the data. 22 * @retval Or or error code. 23 */ 24 extern enum err tx(uint8_t *data, uint32_t data_len); 25 26 /** 27 * @brief The user should call inside this function its 28 * receive function. The length of the buffer 29 * pointed by data can be checked before 30 * copying data into it by using *data_len. 31 * After copying the length of the received data 32 * should be written in data_len. 33 * 34 * @param[out] data Pointer to a buffer where the edhoc 35 * message must be copied. 36 * @param[out] data_len Length of the received data. 37 * @retval Or or error code. 38 */ 39 extern enum err rx(uint8_t *data, uint32_t *data_len); 40 41 #endif 42