mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Common: Namespace Network.h/.cpp
Necessary to avoid namespace clashes with IOS HLE's namespace name.
This commit is contained in:
@ -11,6 +11,8 @@
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/Timer.h"
|
||||
|
||||
namespace Common
|
||||
{
|
||||
void GenerateMacAddress(const MACConsumer type, u8* mac)
|
||||
{
|
||||
memset(mac, 0, MAC_ADDRESS_SIZE);
|
||||
@ -20,10 +22,10 @@ void GenerateMacAddress(const MACConsumer type, u8* mac)
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case BBA:
|
||||
case MACConsumer::BBA:
|
||||
memcpy(mac, oui_bba, 3);
|
||||
break;
|
||||
case IOS:
|
||||
case MACConsumer::IOS:
|
||||
memcpy(mac, oui_ios, 3);
|
||||
break;
|
||||
}
|
||||
@ -68,3 +70,4 @@ bool StringToMacAddress(const std::string& mac_string, u8* mac)
|
||||
}
|
||||
return success;
|
||||
}
|
||||
} // namespace Common
|
||||
|
@ -8,10 +8,12 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
enum MACConsumer
|
||||
namespace Common
|
||||
{
|
||||
BBA = 0,
|
||||
IOS = 1
|
||||
enum class MACConsumer
|
||||
{
|
||||
BBA,
|
||||
IOS
|
||||
};
|
||||
|
||||
enum
|
||||
@ -22,3 +24,4 @@ enum
|
||||
void GenerateMacAddress(const MACConsumer type, u8* mac);
|
||||
std::string MacAddressToString(const u8* mac);
|
||||
bool StringToMacAddress(const std::string& mac_string, u8* mac);
|
||||
} // namespace Common
|
||||
|
Reference in New Issue
Block a user