laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/31396 )
Change subject: Run struct_endianness.py ......................................................................
Run struct_endianness.py
Ensure there is no diff to prepare to run this in CI.
Related: OS#5884 Change-Id: If070a3204d47f71d47e01276fe16323f8af8cb4a --- M include/osmocom/octoi/e1oip_proto.h 1 file changed, 19 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
diff --git a/include/osmocom/octoi/e1oip_proto.h b/include/osmocom/octoi/e1oip_proto.h index 96bc1d7..c4eeea0 100644 --- a/include/osmocom/octoi/e1oip_proto.h +++ b/include/osmocom/octoi/e1oip_proto.h @@ -1,9 +1,16 @@ #pragma once +#include <osmocom/core/endian.h>
struct e1oip_hdr { +#if OSMO_IS_LITTLE_ENDIAN uint8_t version:4, flags:4; uint8_t msg_type; /* enum e1oip_msgtype */ +#elif OSMO_IS_BIG_ENDIAN +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianness.py) */ + uint8_t flags:4, version:4; + uint8_t msg_type; +#endif } __attribute__ ((packed));
#define E1OIP_VERSION 1