Device: Add ExtendedCommand::GetAllMACAddresses

This commit is contained in:
Thomas Stoddard
2026-05-22 11:40:44 -04:00
committed by Kyle Schwarz
parent 49e578a657
commit 3ab06199c3
36 changed files with 424 additions and 36 deletions
@@ -0,0 +1,35 @@
#ifndef __ALLMACADDRESSESMESSAGE_H_
#define __ALLMACADDRESSESMESSAGE_H_
#define ICSNEO_MAC_ADDRESS_LEN 6
#define ICSNEO_MAX_MAC_COUNT 32
#ifdef __cplusplus
#include "icsneo/communication/message/message.h"
#include <memory>
#include <vector>
#include <unordered_map>
#include <array>
namespace icsneo {
static constexpr uint16_t MaxMACAddressCount = ICSNEO_MAX_MAC_COUNT;
static constexpr uint8_t MACAddressLength = ICSNEO_MAC_ADDRESS_LEN;
using MACAddress = std::array<uint8_t, MACAddressLength>;
class AllMACAddressesMessage : public Message {
public:
static std::shared_ptr<AllMACAddressesMessage> DecodeToMessage(const std::vector<uint8_t>& bytestream);
AllMACAddressesMessage() : Message(Type::AllMACAddresses) {}
std::unordered_map<Network::NetID, MACAddress> addresses;
};
} // namespace icsneo
#endif // __cplusplus
#endif // __ALLMACADDRESSESMESSAGE_H_