diff --git a/src/OverteClient.cpp b/src/OverteClient.cpp index 17e41d1..ab77c10 100644 --- a/src/OverteClient.cpp +++ b/src/OverteClient.cpp @@ -363,7 +363,16 @@ void OverteClient::poll() { sockaddr_storage from{}; socklen_t fromlen = sizeof(from); ssize_t r = ::recvfrom(m_udpFd, buf, sizeof(buf), 0, reinterpret_cast(&from), &fromlen); if (r > 0) { - std::cout << "[OverteClient] <<< Received domain packet (" << r << " bytes)" << std::endl; + // Log source address + char fromIP[INET_ADDRSTRLEN]; + uint16_t fromPort = 0; + if (from.ss_family == AF_INET) { + sockaddr_in* sin = reinterpret_cast(&from); + inet_ntop(AF_INET, &sin->sin_addr, fromIP, sizeof(fromIP)); + fromPort = ntohs(sin->sin_port); + } + std::cout << "[OverteClient] <<< Received packet (" << r << " bytes) from " << fromIP << ":" << fromPort << std::endl; + // Hex dump first 32 bytes for debugging std::cout << "[OverteClient] Hex: "; for (int i = 0; i < std::min(32, (int)r); ++i) { diff --git a/src/OverteClient.hpp b/src/OverteClient.hpp index 4f31b6b..916abad 100644 --- a/src/OverteClient.hpp +++ b/src/OverteClient.hpp @@ -111,6 +111,7 @@ private: // Avatar Mixer protocol void sendAvatarIdentity(); void sendAvatarData(); + void sendAvatarQuery(); void handleAvatarMixerPacket(const char* data, size_t len, uint8_t packetType); std::string m_domainUrl;