summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/NetworkKit/MAC.h
blob: 7461ae74f6f01f70c14e01c9a65ab1871194d684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org)
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/ne-foss-org/nekernel

#ifndef NETWORKKIT_MAC_H
#define NETWORKKIT_MAC_H

#include <NeKit/Array.h>
#include <NeKit/Config.h>
#include <NeKit/KString.h>

#define kMACAddrLen (32U)

namespace Kernel {
class MacAddressGetter;

/// \brief This retrieves the MAC address of the device.
/// \note Listens for the current NIC.
class MacAddressGetter final {
 public:
  MacAddressGetter()  = default;
  ~MacAddressGetter() = default;

  NE_COPY_DEFAULT(MacAddressGetter)

 public:
  Array<UInt8, kMACAddrLen>& AsBytes();

 private:
  Array<UInt8, kMACAddrLen> fMacAddress;
};

}  // namespace Kernel

#endif