diff --git a/lib/ether_encap_impl.h b/lib/ether_encap_impl.h index af0f599..0d3cb9f 100644 --- a/lib/ether_encap_impl.h +++ b/lib/ether_encap_impl.h @@ -22,11 +22,13 @@ namespace gr { namespace ieee802_11 { +#pragma pack(push, 1) struct ethernet_header { uint8_t dest[6]; uint8_t src[6]; uint16_t type; -} __attribute__((packed)); +}; +#pragma pack(pop) class ether_encap_impl : public ether_encap { diff --git a/lib/utils.h b/lib/utils.h index b4694ad..f769eed 100644 --- a/lib/utils.h +++ b/lib/utils.h @@ -38,6 +38,7 @@ using gr::ieee802_11::Encoding; } \ } while (0); +#pragma pack(push, 1) struct mac_header { // protocol version, type, subtype, to_ds, from_ds, ... uint16_t frame_control; @@ -46,7 +47,8 @@ struct mac_header { uint8_t addr2[6]; uint8_t addr3[6]; uint16_t seq_nr; -} __attribute__((packed)); +}; +#pragma pack(pop) /** * WIFI parameters