Merge pull request #12219 from AdmiralCurtiss/bba-name-conflict

Core/BBA/BuiltIn: Replace IP_PROTOCOL with IPV4_ETHERTYPE to avoid conflict with Linux headers.
This commit is contained in:
Pokechu22 2023-10-04 09:43:15 -07:00 committed by GitHub
commit 0291d2c45f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -13,6 +13,7 @@
#include "Common/BitUtils.h"
#include "Common/Logging/Log.h"
#include "Common/MsgHandler.h"
#include "Common/Network.h"
#include "Common/ScopeGuard.h"
#include "Core/HW/EXI/EXI_Device.h"
#include "Core/HW/EXI/EXI_DeviceEthernet.h"
@ -746,7 +747,7 @@ void CEXIETHERNET::BuiltInBBAInterface::ReadThreadHandler(CEXIETHERNET::BuiltInB
u8* buffer = reinterpret_cast<u8*>(self->m_eth_ref->mRecvBuffer.get());
Common::PacketView packet(buffer, datasize);
const auto packet_type = packet.GetEtherType();
if (packet_type.has_value() && packet_type == IP_PROTOCOL)
if (packet_type.has_value() && packet_type == Common::IPV4_ETHERTYPE)
{
SetIPIdentification(buffer, datasize, ++self->m_ip_frame_id);
}

View File

@ -20,9 +20,6 @@ constexpr u16 TCP_FLAG_PSH = 0x8;
constexpr u16 TCP_FLAG_FIN = 0x1;
constexpr u16 TCP_FLAG_RST = 0x4;
constexpr u16 IP_PROTOCOL = 0x800;
constexpr u16 ARP_PROTOCOL = 0x806;
constexpr u8 MAX_TCP_BUFFER = 4;
constexpr u16 MAX_UDP_LENGTH = 1500;
constexpr u16 MAX_TCP_LENGTH = 440;