1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Fixed endianess issues in several classes. Everything is working on big endian architectures so far.

This commit is contained in:
Matias Fontanini
2012-08-21 00:03:55 -03:00
parent 3ef29f831b
commit 80198909eb
12 changed files with 281 additions and 134 deletions

View File

@@ -156,11 +156,19 @@ namespace Tins {
struct snaphdr {
uint8_t dsap;
uint8_t ssap;
uint32_t id:2,
reserved1:2,
poll:2,
reserved2:2,
org_code:24;
#if TINS_IS_LITTLE_ENDIAN
uint32_t id:2,
reserved1:2,
poll:2,
reserved2:2,
org_code:24;
#elif TINS_IS_BIG_ENDIAN
uint32_t reserved1:2,
poll:2,
reserved2:2,
id:2,
org_code:24;
#endif
uint16_t eth_type;
} __attribute__((__packed__));