Skip to content

Commit

Permalink
Merge pull request #12219 from AdmiralCurtiss/bba-name-conflict
Browse files Browse the repository at this point in the history
Core/BBA/BuiltIn: Replace IP_PROTOCOL with IPV4_ETHERTYPE to avoid conflict with Linux headers.
  • Loading branch information
Pokechu22 committed Oct 4, 2023
2 parents 68c9362 + beebe0a commit 0291d2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Source/Core/Core/HW/EXI/BBA/BuiltIn.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
}
Expand Down
3 changes: 0 additions & 3 deletions Source/Core/Core/HW/EXI/BBA/BuiltIn.h
Expand Up @@ -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;
Expand Down

0 comments on commit 0291d2c

Please sign in to comment.