mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-24 18:25:34 +00:00
Network: Moved NintendoOUI initalization to RoomMember constructor
This commit is contained in:
parent
f2f39102fa
commit
718423e506
|
@ -19,7 +19,7 @@ static constexpr u32 MaxConcurrentConnections = 10;
|
||||||
class Room::RoomImpl {
|
class Room::RoomImpl {
|
||||||
public:
|
public:
|
||||||
// This MAC address is used to generate a 'Nintendo' like Mac address.
|
// This MAC address is used to generate a 'Nintendo' like Mac address.
|
||||||
const MacAddress NintendoOUI = {0x00, 0x1F, 0x32, 0x00, 0x00, 0x00};
|
const MacAddress NintendoOUI;
|
||||||
std::mt19937 random_gen; ///< Random number generator. Used for GenerateMacAddress
|
std::mt19937 random_gen; ///< Random number generator. Used for GenerateMacAddress
|
||||||
|
|
||||||
ENetHost* server = nullptr; ///< Network interface.
|
ENetHost* server = nullptr; ///< Network interface.
|
||||||
|
@ -36,7 +36,8 @@ public:
|
||||||
using MemberList = std::vector<Member>;
|
using MemberList = std::vector<Member>;
|
||||||
MemberList members; ///< Information about the members of this room.
|
MemberList members; ///< Information about the members of this room.
|
||||||
|
|
||||||
RoomImpl() : random_gen(std::random_device()()) {}
|
RoomImpl()
|
||||||
|
: random_gen(std::random_device()()), NintendoOUI{0x00, 0x1F, 0x32, 0x00, 0x00, 0x00} {}
|
||||||
|
|
||||||
/// Thread that receives and dispatches network packets
|
/// Thread that receives and dispatches network packets
|
||||||
std::unique_ptr<std::thread> room_thread;
|
std::unique_ptr<std::thread> room_thread;
|
||||||
|
|
|
@ -24,7 +24,7 @@ struct RoomInformation {
|
||||||
using MacAddress = std::array<u8, 6>;
|
using MacAddress = std::array<u8, 6>;
|
||||||
/// A special MAC address that tells the room we're joining to assign us a MAC address
|
/// A special MAC address that tells the room we're joining to assign us a MAC address
|
||||||
/// automatically.
|
/// automatically.
|
||||||
const MacAddress NoPreferredMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
|
constexpr MacAddress NoPreferredMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
|
||||||
|
|
||||||
// 802.11 broadcast MAC address
|
// 802.11 broadcast MAC address
|
||||||
constexpr MacAddress BroadcastMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
|
constexpr MacAddress BroadcastMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
|
||||||
|
|
Loading…
Reference in a new issue