This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/16761 ) Change subject: add/clean big-endian packed structs (struct_endianess.py) ...................................................................... add/clean big-endian packed structs (struct_endianess.py) Change-Id: I04ad3795fbaf495cae168aed69124b1dc132a9bd --- M include/osmocom/mtp/mtp_level3.h M include/osmocom/sccp/sccp_types.h 2 files changed, 14 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/61/16761/1 diff --git a/include/osmocom/mtp/mtp_level3.h b/include/osmocom/mtp/mtp_level3.h index d0d24a1..414b144 100644 --- a/include/osmocom/mtp/mtp_level3.h +++ b/include/osmocom/mtp/mtp_level3.h @@ -131,9 +131,8 @@ spare : 2, ni : 2; #elif OSMO_IS_BIG_ENDIAN - uint8_t ni : 2, - spare : 2, - ser_ind : 4; +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t ni:2, spare:2, ser_ind:4; #endif uint32_t addr; uint8_t data[0]; @@ -144,8 +143,8 @@ uint8_t h0 : 4, h1 : 4; #elif OSMO_IS_BIG_ENDIAN - uint8_t h1 : 4, - h0 : 4; +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t h1:4, h0:4; #endif } __attribute__((packed)); @@ -155,8 +154,8 @@ uint8_t spare : 4, length : 4; #elif OSMO_IS_BIG_ENDIAN - uint8_t length : 4, - spare : 4; +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t length:4, spare:4; #endif uint8_t data[0]; } __attribute__((packed)); @@ -175,8 +174,8 @@ uint8_t mul_ind : 2, spare : 6; #elif OSMO_IS_BIG_ENDIAN - uint8_t spare : 6, - mul_ind : 2; +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t spare:6, mul_ind:2; #endif } __attribute__((packed)); diff --git a/include/osmocom/sccp/sccp_types.h b/include/osmocom/sccp/sccp_types.h index 18b54f4..17c60e4 100644 --- a/include/osmocom/sccp/sccp_types.h +++ b/include/osmocom/sccp/sccp_types.h @@ -97,11 +97,8 @@ routing_indicator : 1, reserved : 1; #elif OSMO_IS_BIG_ENDIAN - uint8_t reserved : 1, - routing_indicator : 1, - global_title_indicator : 4, - ssn_indicator : 1, - point_code_indicator : 1; +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t reserved:1, routing_indicator:1, global_title_indicator:4, ssn_indicator:1, point_code_indicator:1; #endif uint8_t data[0]; } __attribute__((packed)); @@ -115,8 +112,8 @@ uint8_t msb : 6, reserved : 2; #elif OSMO_IS_BIG_ENDIAN - uint8_t reserved : 2, - msb : 6; +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t reserved:2, msb:6; #endif } __attribute__((packed)); @@ -157,8 +154,8 @@ uint8_t nature_of_addr_ind : 7, odd_even : 1; #elif OSMO_IS_BIG_ENDIAN - uint8_t odd_even : 1, - nature_of_addr_ind : 7; +/* auto-generated from the little endian part above (libosmocore/contrib/struct_endianess.py) */ + uint8_t odd_even:1, nature_of_addr_ind:7; #endif uint8_t data[0]; } __attribute__((packed)); -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/16761 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: I04ad3795fbaf495cae168aed69124b1dc132a9bd Gerrit-Change-Number: 16761 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200107/815391ab/attachment.htm>