diff --git a/examples/crf/crf-listener.c b/examples/crf/crf-listener.c index af3c324..babb04d 100644 --- a/examples/crf/crf-listener.c +++ b/examples/crf/crf-listener.c @@ -100,7 +100,7 @@ #include #include "avtp.h" -#include "avtp_crf.h" +#include "avtp/Crf.h" #include "avtp_aaf.h" #include "common.h" #include "avtp/CommonHeader.h" diff --git a/examples/crf/crf-talker.c b/examples/crf/crf-talker.c index 654cfb2..8b47257 100644 --- a/examples/crf/crf-talker.c +++ b/examples/crf/crf-talker.c @@ -63,7 +63,7 @@ #include #include "avtp.h" -#include "avtp_crf.h" +#include "avtp/Crf.h" #include "common.h" #include "avtp/CommonHeader.h" diff --git a/include/avtp_crf.h b/include/avtp/Crf.h similarity index 62% rename from include/avtp_crf.h rename to include/avtp/Crf.h index 97e4d6f..c1eb662 100644 --- a/include/avtp_crf.h +++ b/include/avtp/Crf.h @@ -1,4 +1,5 @@ /* + * Copyright (c) 2024, COVESA * Copyright (c) 2018, Intel Corporation * * Redistribution and use in source and binary forms, with or without @@ -9,9 +10,9 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. + * * Neither the name of Intel Corporation, COVESA nor the names of their + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -23,16 +24,22 @@ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * SPDX-License-Identifier: BSD-3-Clause */ #pragma once -#include #include -#ifdef __cplusplus -extern "C" { -#endif +#include "avtp/Utils.h" + +#define AVTP_CRF_HEADER_LEN (5 * AVTP_QUADLET_SIZE) + +typedef struct Avtp_Cvf { + uint8_t header[AVTP_CRF_HEADER_LEN]; + uint8_t payload[0]; +} Avtp_Crf_t; /* CRF 'type' field values. */ #define AVTP_CRF_TYPE_USER 0x00 @@ -49,29 +56,50 @@ extern "C" { #define AVTP_CRF_PULL_MULT_BY_25_OVER_24 0x04 #define AVTP_CRF_PULL_MULT_BY_1_OVER_8 0x05 -struct avtp_crf_pdu { - uint32_t subtype_data; - uint64_t stream_id; - uint64_t packet_info; - uint64_t crf_data[0]; -} __attribute__ ((__packed__)); - -enum avtp_crf_field { +typedef enum Avtp_CrfField { + /* CRF header fields */ + AVTP_CRF_FIELD_SUBTYPE, AVTP_CRF_FIELD_SV, + AVTP_CRF_FIELD_VERSION, AVTP_CRF_FIELD_MR, + AVTP_CRF_FIELD_RESERVED, AVTP_CRF_FIELD_FS, AVTP_CRF_FIELD_TU, - AVTP_CRF_FIELD_SEQ_NUM, + AVTP_CRF_FIELD_SEQUENCE_NUM, AVTP_CRF_FIELD_TYPE, AVTP_CRF_FIELD_STREAM_ID, AVTP_CRF_FIELD_PULL, - AVTP_CRF_FIELD_BASE_FREQ, - AVTP_CRF_FIELD_CRF_DATA_LEN, + AVTP_CRF_FIELD_BASE_FREQUENCY, + AVTP_CRF_FIELD_CRF_DATA_LENGTH, AVTP_CRF_FIELD_TIMESTAMP_INTERVAL, + /* Count number of fields for bound checks */ AVTP_CRF_FIELD_MAX, -}; +}Avtp_CrfField_t; + +int Avtp_Crf_Init(Avtp_Crf_t* pdu); + +int Avtp_Crf_GetField(Avtp_Crf_t* pdu, Avtp_CrfField_t field, uint64_t* value); -/* Get value from CRF AVTPDU field. +int Avtp_Crf_SetField(Avtp_Crf_t* pdu, Avtp_CrfField_t field, uint64_t value); + +/****************************************************************************** + * Legacy API (deprecated) + *****************************************************************************/ + +#define AVTP_CRF_FIELD_SEQ_NUM AVTP_CRF_FIELD_SEQUENCE_NUM +#define AVTP_CRF_FIELD_BASE_FREQ AVTP_CRF_FIELD_BASE_FREQUENCY +#define AVTP_CRF_FIELD_CRF_DATA_LEN AVTP_CRF_FIELD_CRF_DATA_LENGTH + +struct avtp_crf_pdu { + uint32_t subtype_data; + uint64_t stream_id; + uint64_t packet_info; + uint64_t crf_data[0]; +} __attribute__ ((__packed__)); + +/** + * @deprecated + * Get value from CRF AVTPDU field. * @pdu: Pointer to PDU struct. * @field: PDU field to be retrieved. * @val: Pointer to variable which the retrieved value should be saved. @@ -80,10 +108,11 @@ enum avtp_crf_field { * 0: Success. * -EINVAL: If any argument is invalid. */ -int avtp_crf_pdu_get(const struct avtp_crf_pdu *pdu, - enum avtp_crf_field field, uint64_t *val); +int avtp_crf_pdu_get(const void *pdu, Avtp_CrfField_t field, uint64_t *val); -/* Set value from CRF AVTPDU field. +/** + * @deprecated + * Set value from CRF AVTPDU field. * @pdu: Pointer to PDU struct. * @field: PDU field to be set. * @val: Value to be set. @@ -92,10 +121,11 @@ int avtp_crf_pdu_get(const struct avtp_crf_pdu *pdu, * 0: Success. * -EINVAL: If any argument is invalid. */ -int avtp_crf_pdu_set(struct avtp_crf_pdu *pdu, enum avtp_crf_field field, - uint64_t val); +int avtp_crf_pdu_set(void *pdu, Avtp_CrfField_t field, uint64_t val); -/* Initialize CRF AVTPDU. All AVTPDU fields are initialized with zero except +/** + * @deprecated + * Initialize CRF AVTPDU. All AVTPDU fields are initialized with zero except * 'subtype' (which is set to AVTP_SUBTYPE_CRF) and 'sv' (which is set to 1). * @pdu: Pointer to PDU struct. * @@ -103,8 +133,4 @@ int avtp_crf_pdu_set(struct avtp_crf_pdu *pdu, enum avtp_crf_field field, * 0: Success. * -EINVAL: If any argument is invalid. */ -int avtp_crf_pdu_init(struct avtp_crf_pdu *pdu); - -#ifdef __cplusplus -} -#endif +int avtp_crf_pdu_init(void *pdu); diff --git a/meson.build b/meson.build index a97c06e..d7544fe 100644 --- a/meson.build +++ b/meson.build @@ -11,7 +11,6 @@ avtp_lib = library( [ 'src/avtp.c', 'src/avtp_aaf.c', - 'src/avtp_crf.c', 'src/avtp_cvf.c', 'src/avtp_ieciidc.c', 'src/avtp_stream.c', @@ -26,7 +25,8 @@ avtp_lib = library( 'src/avtp/acf/Sensor.c', 'src/avtp/acf/SensorBrief.c', 'src/avtp/Udp.c', - 'src/avtp/Rvf.c' + 'src/avtp/Rvf.c', + 'src/avtp/Crf.c', ], version: meson.project_version(), include_directories: include_directories('include'), @@ -45,6 +45,7 @@ install_headers( 'include/avtp/Udp.h', 'include/avtp/Utils.h', 'include/avtp/Rvf.h', + 'include/avtp/Crf.h', subdir : 'avtp' ) diff --git a/src/avtp/Crf.c b/src/avtp/Crf.c new file mode 100644 index 0000000..4f85a06 --- /dev/null +++ b/src/avtp/Crf.c @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2024, COVESA + * Copyright (c) 2018, Intel Corporation + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Intel Corporation, COVESA nor the names of their + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include +#include + +#include "avtp/Crf.h" +#include "avtp/Utils.h" +#include "avtp/CommonHeader.h" + +/** + * This table maps all IEEE 1722 Clock Reference Format (CRF) specific header fields + * to a descriptor. + */ +static const Avtp_FieldDescriptor_t Avtp_CrfFieldDescriptors[AVTP_CRF_FIELD_MAX] = +{ + [AVTP_CRF_FIELD_SUBTYPE] = { .quadlet = 0, .offset = 0, .bits = 8 }, + [AVTP_CRF_FIELD_SV] = { .quadlet = 0, .offset = 8, .bits = 1 }, + [AVTP_CRF_FIELD_VERSION] = { .quadlet = 0, .offset = 9, .bits = 3 }, + [AVTP_CRF_FIELD_MR] = { .quadlet = 0, .offset = 12, .bits = 1 }, + [AVTP_CRF_FIELD_RESERVED] = { .quadlet = 0, .offset = 13, .bits = 1 }, + [AVTP_CRF_FIELD_FS] = { .quadlet = 0, .offset = 14, .bits = 1 }, + [AVTP_CRF_FIELD_TU] = { .quadlet = 0, .offset = 15, .bits = 1 }, + [AVTP_CRF_FIELD_SEQUENCE_NUM] = { .quadlet = 0, .offset = 16, .bits = 8 }, + [AVTP_CRF_FIELD_TYPE] = { .quadlet = 0, .offset = 24, .bits = 8 }, + [AVTP_CRF_FIELD_STREAM_ID] = { .quadlet = 1, .offset = 0, .bits = 64 }, + [AVTP_CRF_FIELD_PULL] = { .quadlet = 3, .offset = 0, .bits = 3 }, + [AVTP_CRF_FIELD_BASE_FREQUENCY] = { .quadlet = 3, .offset = 3, .bits = 29 }, + [AVTP_CRF_FIELD_CRF_DATA_LENGTH] = { .quadlet = 4, .offset = 0, .bits = 16 }, + [AVTP_CRF_FIELD_TIMESTAMP_INTERVAL] = { .quadlet = 4, .offset = 16, .bits = 16 }, +}; + +int Avtp_Crf_Init(Avtp_Crf_t* pdu) { + + if (pdu == NULL) { + return -EINVAL; + } + + memset(pdu, 0, sizeof(Avtp_Crf_t)); + Avtp_Crf_SetField(pdu, AVTP_CRF_FIELD_SUBTYPE, AVTP_SUBTYPE_CRF); + Avtp_Crf_SetField(pdu, AVTP_CRF_FIELD_SV, 1); + + return 0; + +} + +int Avtp_Crf_GetField(Avtp_Crf_t* pdu, Avtp_CrfField_t field, uint64_t* value) { + return Avtp_GetField(Avtp_CrfFieldDescriptors, AVTP_CRF_FIELD_MAX, (uint8_t*)pdu, field, value); +} + +int Avtp_Crf_SetField(Avtp_Crf_t* pdu, Avtp_CrfField_t field, uint64_t value) { + return Avtp_SetField(Avtp_CrfFieldDescriptors, AVTP_CRF_FIELD_MAX, (uint8_t*)pdu, field, value); +} + +/****************************************************************************** + * Legacy API + *****************************************************************************/ + +int avtp_crf_pdu_get(const void *pdu, Avtp_CrfField_t field, uint64_t *val) +{ + return Avtp_Crf_GetField((Avtp_Crf_t*)pdu, field, val); +} + +int avtp_crf_pdu_set(void *pdu, Avtp_CrfField_t field, uint64_t val) +{ + return Avtp_Crf_SetField((Avtp_Crf_t*)pdu, field, val); +} + +int avtp_crf_pdu_init(void *pdu) +{ + return Avtp_Crf_Init((Avtp_Crf_t*)pdu); +} diff --git a/src/avtp_crf.c b/src/avtp_crf.c deleted file mode 100644 index 93922fe..0000000 --- a/src/avtp_crf.c +++ /dev/null @@ -1,289 +0,0 @@ -/* - * Copyright (c) 2018, Intel Corporation - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include - -#include "avtp.h" -#include "avtp_crf.h" -#include "util.h" -#include "avtp/CommonHeader.h" - -#define SHIFT_SV (31 - 8) -#define SHIFT_MR (31 - 12) -#define SHIFT_FS (31 - 14) -#define SHIFT_TU (31 - 15) -#define SHIFT_SEQ_NUM (31 - 23) -#define SHIFT_PULL (63 - 2) -#define SHIFT_BASE_FREQ (63 - 31) -#define SHIFT_CRF_DATA_LEN (63 - 47) - -#define MASK_SV (BITMASK(1) << SHIFT_SV) -#define MASK_MR (BITMASK(1) << SHIFT_MR) -#define MASK_FS (BITMASK(1) << SHIFT_FS) -#define MASK_TU (BITMASK(1) << SHIFT_TU) -#define MASK_SEQ_NUM (BITMASK(8) << SHIFT_SEQ_NUM) -#define MASK_TYPE (BITMASK(8)) -#define MASK_PULL (BITMASK(3) << SHIFT_PULL) -#define MASK_BASE_FREQ (BITMASK(29) << SHIFT_BASE_FREQ) -#define MASK_CRF_DATA_LEN (BITMASK(16) << SHIFT_CRF_DATA_LEN) -#define MASK_TIMESTAMP_INTERVAL (BITMASK(16)) - -static int get_field_value(const struct avtp_crf_pdu *pdu, - enum avtp_crf_field field, uint64_t *val) -{ - uint64_t bitmap, mask; - uint8_t shift; - - switch (field) { - case AVTP_CRF_FIELD_SV: - mask = MASK_SV; - shift = SHIFT_SV; - bitmap = ntohl(pdu->subtype_data); - break; - case AVTP_CRF_FIELD_MR: - mask = MASK_MR; - shift = SHIFT_MR; - bitmap = ntohl(pdu->subtype_data); - break; - case AVTP_CRF_FIELD_FS: - mask = MASK_FS; - shift = SHIFT_FS; - bitmap = ntohl(pdu->subtype_data); - break; - case AVTP_CRF_FIELD_TU: - mask = MASK_TU; - shift = SHIFT_TU; - bitmap = ntohl(pdu->subtype_data); - break; - case AVTP_CRF_FIELD_SEQ_NUM: - mask = MASK_SEQ_NUM; - shift = SHIFT_SEQ_NUM; - bitmap = ntohl(pdu->subtype_data); - break; - case AVTP_CRF_FIELD_TYPE: - mask = MASK_TYPE; - shift = 0; - bitmap = ntohl(pdu->subtype_data); - break; - case AVTP_CRF_FIELD_PULL: - mask = MASK_PULL; - shift = SHIFT_PULL; - bitmap = be64toh(pdu->packet_info); - break; - case AVTP_CRF_FIELD_BASE_FREQ: - mask = MASK_BASE_FREQ; - shift = SHIFT_BASE_FREQ; - bitmap = be64toh(pdu->packet_info); - break; - case AVTP_CRF_FIELD_CRF_DATA_LEN: - mask = MASK_CRF_DATA_LEN; - shift = SHIFT_CRF_DATA_LEN; - bitmap = be64toh(pdu->packet_info); - break; - case AVTP_CRF_FIELD_TIMESTAMP_INTERVAL: - mask = MASK_TIMESTAMP_INTERVAL; - shift = 0; - bitmap = be64toh(pdu->packet_info); - break; - default: - return -EINVAL; - } - - *val = BITMAP_GET_VALUE(bitmap, mask, shift); - - return 0; -} - -int avtp_crf_pdu_get(const struct avtp_crf_pdu *pdu, - enum avtp_crf_field field, uint64_t *val) -{ - int res; - - if (!pdu || !val) - return -EINVAL; - - switch (field) { - case AVTP_CRF_FIELD_SV: - case AVTP_CRF_FIELD_MR: - case AVTP_CRF_FIELD_FS: - case AVTP_CRF_FIELD_TU: - case AVTP_CRF_FIELD_SEQ_NUM: - case AVTP_CRF_FIELD_TYPE: - case AVTP_CRF_FIELD_PULL: - case AVTP_CRF_FIELD_BASE_FREQ: - case AVTP_CRF_FIELD_CRF_DATA_LEN: - case AVTP_CRF_FIELD_TIMESTAMP_INTERVAL: - res = get_field_value(pdu, field, val); - break; - case AVTP_CRF_FIELD_STREAM_ID: - *val = be64toh(pdu->stream_id); - res = 0; - break; - default: - res = -EINVAL; - break; - } - - return res; -} - -static int set_field_value_32(struct avtp_crf_pdu *pdu, - enum avtp_crf_field field, uint64_t val) -{ - uint32_t bitmap, mask; - uint8_t shift; - - switch (field) { - case AVTP_CRF_FIELD_SV: - mask = MASK_SV; - shift = SHIFT_SV; - break; - case AVTP_CRF_FIELD_MR: - mask = MASK_MR; - shift = SHIFT_MR; - break; - case AVTP_CRF_FIELD_FS: - mask = MASK_FS; - shift = SHIFT_FS; - break; - case AVTP_CRF_FIELD_TU: - mask = MASK_TU; - shift = SHIFT_TU; - break; - case AVTP_CRF_FIELD_SEQ_NUM: - mask = MASK_SEQ_NUM; - shift = SHIFT_SEQ_NUM; - break; - case AVTP_CRF_FIELD_TYPE: - mask = MASK_TYPE; - shift = 0; - break; - default: - return -EINVAL; - } - - bitmap = ntohl(pdu->subtype_data); - - BITMAP_SET_VALUE(bitmap, val, mask, shift); - - pdu->subtype_data = htonl(bitmap); - - return 0; -} - -static int set_field_value_64(struct avtp_crf_pdu *pdu, - enum avtp_crf_field field, uint64_t val) -{ - uint64_t bitmap, mask; - uint8_t shift; - - switch (field) { - case AVTP_CRF_FIELD_PULL: - mask = MASK_PULL; - shift = SHIFT_PULL; - break; - case AVTP_CRF_FIELD_BASE_FREQ: - mask = MASK_BASE_FREQ; - shift = SHIFT_BASE_FREQ; - break; - case AVTP_CRF_FIELD_CRF_DATA_LEN: - mask = MASK_CRF_DATA_LEN; - shift = SHIFT_CRF_DATA_LEN; - break; - case AVTP_CRF_FIELD_TIMESTAMP_INTERVAL: - mask = MASK_TIMESTAMP_INTERVAL; - shift = 0; - break; - default: - return -EINVAL; - } - - bitmap = be64toh(pdu->packet_info); - - BITMAP_SET_VALUE(bitmap, val, mask, shift); - - pdu->packet_info = htobe64(bitmap); - - return 0; -} - -int avtp_crf_pdu_set(struct avtp_crf_pdu *pdu, enum avtp_crf_field field, - uint64_t val) -{ - int res; - - if (!pdu) - return -EINVAL; - - switch (field) { - case AVTP_CRF_FIELD_SV: - case AVTP_CRF_FIELD_MR: - case AVTP_CRF_FIELD_FS: - case AVTP_CRF_FIELD_TU: - case AVTP_CRF_FIELD_SEQ_NUM: - case AVTP_CRF_FIELD_TYPE: - res = set_field_value_32(pdu, field, val); - break; - case AVTP_CRF_FIELD_PULL: - case AVTP_CRF_FIELD_BASE_FREQ: - case AVTP_CRF_FIELD_CRF_DATA_LEN: - case AVTP_CRF_FIELD_TIMESTAMP_INTERVAL: - res = set_field_value_64(pdu, field, val); - break; - case AVTP_CRF_FIELD_STREAM_ID: - pdu->stream_id = htobe64(val); - res = 0; - break; - default: - res = -EINVAL; - } - - return res; -} - -int avtp_crf_pdu_init(struct avtp_crf_pdu *pdu) -{ - int res; - - if (!pdu) - return -EINVAL; - - memset(pdu, 0, sizeof(struct avtp_crf_pdu)); - - res = avtp_pdu_set((struct avtp_common_pdu *) pdu, AVTP_FIELD_SUBTYPE, - AVTP_SUBTYPE_CRF); - if (res < 0) - return res; - - res = avtp_crf_pdu_set(pdu, AVTP_CRF_FIELD_SV, 1); - if (res < 0) - return res; - - return 0; -} diff --git a/unit/test-crf.c b/unit/test-crf.c index d26e448..e83ff72 100644 --- a/unit/test-crf.c +++ b/unit/test-crf.c @@ -30,9 +30,10 @@ #include #include #include +#include #include "avtp.h" -#include "avtp_crf.h" +#include "avtp/Crf.h" static void crf_get_field_null_pdu(void **state) {