MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / GetAdapterMAC

Method GetAdapterMAC

pcsx2/DEV9/AdapterUtils.cpp:260–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258// AdapterMAC.
259#ifdef _WIN32
260std::optional<MAC_Address> AdapterUtils::GetAdapterMAC(const Adapter* adapter)
261{
262 if (adapter != nullptr && adapter->PhysicalAddressLength == 6)
263 {
264 MAC_Address macAddr{};
265 std::memcpy(&macAddr, adapter->PhysicalAddress, sizeof(macAddr));
266 return macAddr;
267 }
268
269 return std::nullopt;
270}
271#else
272std::optional<MAC_Address> AdapterUtils::GetAdapterMAC(const Adapter* adapter)
273{

Callers

nothing calls this directly

Calls 3

StrlcpyFunction · 0.85
sizeFunction · 0.50
ErrorMethod · 0.45

Tested by

no test coverage detected