diff --git a/include/zenoh-pico/transport/raweth/config.h b/include/zenoh-pico/transport/raweth/config.h index f199a4797..c8d644747 100644 --- a/include/zenoh-pico/transport/raweth/config.h +++ b/include/zenoh-pico/transport/raweth/config.h @@ -26,7 +26,7 @@ typedef struct { _z_keyexpr_t _keyexpr; - uint16_t _vlan; // vlan tag (pcp + dei + id) + uint16_t _vlan; // vlan tag (pcp + dei + id), big endian uint8_t _dmac[_ZP_MAC_ADDR_LENGTH]; _Bool _has_vlan; } _zp_raweth_cfg_entry; diff --git a/src/transport/raweth/config.c b/src/transport/raweth/config.c index 646865f5a..9497a3d9a 100644 --- a/src/transport/raweth/config.c +++ b/src/transport/raweth/config.c @@ -16,7 +16,7 @@ #if Z_FEATURE_RAWETH_TRANSPORT == 1 -// Should be generated +// Should be generated (big endian format) const uint16_t _ZP_RAWETH_CFG_ETHTYPE = 0x72e0; // Should be generated @@ -27,9 +27,9 @@ const uint8_t _ZP_RAWETH_CFG_SMAC[_ZP_MAC_ADDR_LENGTH] = {0x30, 0x03, 0xc8, 0x37 // Should be generated const _zp_raweth_cfg_entry _ZP_RAWETH_CFG_ARRAY[] = { - {{0, {0}, ""}, 0x00, {0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}, false}, // Default mac addr - {{0, {0}, "some/key/expr"}, 0x8c, {0x00, 0x11, 0x22, 0x33, 0x44, 0x55}, true}, // entry1 - {{0, {0}, "another/keyexpr"}, 0x43, {0x01, 0x23, 0x45, 0x67, 0x89, 0xab}, true}, // entry2 + {{0, {0}, ""}, 0x0000, {0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}, false}, // Default mac addr + {{0, {0}, "some/key/expr"}, 0x8c00, {0x00, 0x11, 0x22, 0x33, 0x44, 0x55}, true}, // entry1 + {{0, {0}, "another/keyexpr"}, 0x4300, {0x01, 0x23, 0x45, 0x67, 0x89, 0xab}, true}, // entry2 }; // Should be generated