X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fphy.git;a=blobdiff_plain;f=fhi_lib%2Flib%2Fapi%2Fxran_pkt_up.h;h=588d3e1d7fb0434b501e22112b43e72939def5d8;hp=a2399f09d6f231fe1491bc3441057e7d4f9c70b4;hb=cef07f74965b1749dd909fc1322e211489fea2ea;hpb=bc60e3a69129edf1c21a01683f84a77483f6e3cc diff --git a/fhi_lib/lib/api/xran_pkt_up.h b/fhi_lib/lib/api/xran_pkt_up.h index a2399f0..588d3e1 100644 --- a/fhi_lib/lib/api/xran_pkt_up.h +++ b/fhi_lib/lib/api/xran_pkt_up.h @@ -16,7 +16,6 @@ * *******************************************************************************/ - /** * @brief Definitions and support functions to process XRAN packet * @file xran_pkt_up.h @@ -37,6 +36,10 @@ #ifndef _XRAN_PKT_UP_H_ #define _XRAN_PKT_UP_H_ +#ifdef __cplusplus +extern "C" { +#endif + #include "xran_pkt.h" #define IQ_PAIR_NUM_IN_RB 12 @@ -72,7 +75,7 @@ struct data_section_hdr { uint32_t sect_id:12; /**< 5.4.5.1 section identifier */ }; }fields; - } __attribute__((__packed__)); +} __rte_packed; /* @@ -116,7 +119,7 @@ union compression_params { uint8_t compShift:4; uint8_t compBitWidth:4; } uLaw; - } __attribute__((__packed__)); +} __rte_packed; /* @@ -133,6 +136,40 @@ struct rb_map { int16_t i_sample:IQ_BITS; /**< This parameter is the In-phase sample value */ int16_t q_sample:IQ_BITS; /**< This parameter is the Quadrature sample value */ -} __rte_packed;; +} __rte_packed; + +/** + ****************************************************************************** + * @ingroup xran_common_pkt + * + * @description + * Structure holds complete xran u-plane packet header + * 3.1.1 Ethernet Encapsulation + *****************************************************************************/ +struct xran_up_pkt_hdr +{ + struct xran_ecpri_hdr ecpri_hdr; /**< eCPRI Transport Header */ + struct radio_app_common_hdr app_hdr; /**< eCPRI Transport Header */ + struct data_section_hdr data_sec_hdr; +} __rte_packed; + + +/** + ****************************************************************************** + * @ingroup xran_common_pkt + * + * @description + * Structure holds complete ethernet and xran u-plane packet header + * 3.1.1 Ethernet Encapsulation + *****************************************************************************/ +struct eth_xran_up_pkt_hdr +{ + struct ether_hdr eth_hdr; + struct xran_up_pkt_hdr xran_hdr; +}__rte_packed; + +#ifdef __cplusplus +} +#endif #endif