summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Network.h
blob: 3f3c343fe8c681512c69e88c4ee4cd0caef84054 (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
// Copyright 2014 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include <array>
#include <optional>
#include <string>

#include "Common/CommonTypes.h"

namespace Common
{
enum class MACConsumer
{
  BBA,
  IOS
};

enum
{
  MAC_ADDRESS_SIZE = 6
};

using MACAddress = std::array<u8, MAC_ADDRESS_SIZE>;

MACAddress GenerateMacAddress(MACConsumer type);
std::string MacAddressToString(const MACAddress& mac);
std::optional<MACAddress> StringToMacAddress(const std::string& mac_string);
}  // namespace Common