a bunch of bug fixes (changed a bunch of cpu_to_net_u32 that should have been cpu_to_net_u16 and dropped the use of the __BYTE_ORDER__ symbol that no one was defining)

This commit is contained in:
cozis
2023-05-17 23:20:14 +02:00
parent df70d98661
commit 4de61f7cc7
6 changed files with 65 additions and 33 deletions
+2 -7
View File
@@ -7,13 +7,8 @@
#define IP_PLUGGED_PROTOCOLS_MAX 4
typedef struct {
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
uint8_t header_length: 4;
uint8_t version: 4;
#else
uint8_t version: 4;
uint8_t header_length: 4;
#endif
uint8_t header_length_or_version1: 4; // Header length when little endian
uint8_t header_length_or_version2: 4; // Header length when big endian
uint8_t type_of_service;
uint16_t total_length;
uint16_t id;