Switch to MSVC-style packing pragmas so it will compile on Windows.
gcc and clang accept this style as well.
This commit is contained in:
committed by
Bastian Bloessl
parent
08cdcf7a4e
commit
3898a21350
@@ -22,11 +22,13 @@
|
|||||||
namespace gr {
|
namespace gr {
|
||||||
namespace ieee802_11 {
|
namespace ieee802_11 {
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
struct ethernet_header {
|
struct ethernet_header {
|
||||||
uint8_t dest[6];
|
uint8_t dest[6];
|
||||||
uint8_t src[6];
|
uint8_t src[6];
|
||||||
uint16_t type;
|
uint16_t type;
|
||||||
} __attribute__((packed));
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
class ether_encap_impl : public ether_encap
|
class ether_encap_impl : public ether_encap
|
||||||
{
|
{
|
||||||
|
|||||||
+3
-1
@@ -38,6 +38,7 @@ using gr::ieee802_11::Encoding;
|
|||||||
} \
|
} \
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
|
#pragma pack(push, 1)
|
||||||
struct mac_header {
|
struct mac_header {
|
||||||
// protocol version, type, subtype, to_ds, from_ds, ...
|
// protocol version, type, subtype, to_ds, from_ds, ...
|
||||||
uint16_t frame_control;
|
uint16_t frame_control;
|
||||||
@@ -46,7 +47,8 @@ struct mac_header {
|
|||||||
uint8_t addr2[6];
|
uint8_t addr2[6];
|
||||||
uint8_t addr3[6];
|
uint8_t addr3[6];
|
||||||
uint16_t seq_nr;
|
uint16_t seq_nr;
|
||||||
} __attribute__((packed));
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WIFI parameters
|
* WIFI parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user