Commit Graph

144 Commits

Author SHA1 Message Date
Katharine Chui 0f219edcc9 fix street rider sending pdp packets using wrong pdp dst addresses in relay mode
In P2P mode, this issue was solved by resolving the final IP
address without the first byte. Fix the issue again for relay mode
by resolving the true mac address before sending.

True mac resolving was also added to relay mode ptp connect as a
precaution.
2026-03-17 17:40:31 +01:00
Katharine Chui f03b6d76b2 code formatting cleanup 2026-01-15 21:05:08 +01:00
Katharine Chui 3c38b5cfe1 rework ptp connect in relay mode, logic cleanup 2026-01-14 00:53:29 +01:00
Katharine Chui 97a3f1df91 implement nonblock ptp connect 2026-01-13 02:13:18 +01:00
Katharine Chui bf30de1527 initial github.com/kethen/aemu_postoffice integration ported from github.com/kethen/aemu 2026-01-11 18:53:54 +01:00
Henrik Rydgård 3e2dce1e54 Move AdHoc error codes to the big enum, fix the naming convention to be consistent 2025-08-06 17:44:54 +02:00
Henrik Rydgård a710faf27b Remove the Network Connected/Shutdown popups. Replace with more info on pause screen 2025-01-21 18:07:52 +01:00
Henrik Rydgård c3aa0f7452 Centralize socket-related includes, introduce socket_errno
This resolves some weird inconsistentes and include order problems
related to errno. Needed for the next steps.
2025-01-08 12:42:45 +01:00
Henrik Rydgård 9b82a9f180 Move all the Inet enum mappers to Core/HLE/NetInetConstants. Other cleanup. 2025-01-07 19:45:16 +01:00
Henrik Rydgård 895d8eb7fa Try ANR2ME's sceNetInet implementation 2025-01-07 10:31:32 +01:00
Henrik Rydgård 1c16c31b49 Log level tweaks, fix dodgy string tricks that failed the memory sanitizer 2025-01-06 17:51:59 +01:00
White Blood Cell ee0b0fce6c sceNetInet and sceNetResolver support.
Co-authored-by: AdamN <anr2000@gmail.com>
2025-01-04 17:28:36 +01:00
Nemoumbra 96f9749e2e Split out the matching code from sceNetAdhoc.cpp 2025-01-03 04:59:26 +03:00
Henrik Rydgård 080798b5dd Move out two more functions from Core.cpp. Clean up Windows includes 2024-12-08 12:12:02 +01:00
Henrik Rydgård 5c368cb965 More buildfixes 2024-07-26 15:22:35 +02:00
Henrik Rydgård 9fb97add3f Bugfixes 2024-07-26 14:22:31 +02:00
Henrik Rydgård 5926886c0c Some include cleanup, delete some obsolete code 2024-07-25 14:52:41 +02:00
AdamN 6cccb9cb72 add SD_RECEIVE definition 2024-06-29 00:29:15 +07:00
Herman Semenov af41281761 [Core/Dialog/ELF/FileSystems/HLE/HW/Util] Added const reference for function params 2023-12-14 14:22:24 +03:00
ANR2ME 47efec2782 Treat WSAEINVAL similar to WSAEALREADY during connect for backward-compatibility to Winsock 1.1, but might confuses with an actual invalid argument error on newer Winsock. 2023-08-26 06:25:09 +07:00
Unknown W. Brackets a7b7bf7826 Global: Set many read-only params as const.
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
ANR2ME ea6e5c8f74 Mask some part of public IP in the logs for security reason. 2022-06-23 00:41:41 +07:00
ANR2ME d86dc0bff6 Fix sceNetAdhocPtpConnect issue on Windows (ie. Tales of VS) due to getpeername on Windows can return a success when the other side haven't Accepted the connection yet. 2022-05-18 06:18:15 +07:00
ANR2ME 799c721fa6 Added a note regarding select on Linux. 2022-05-18 01:11:56 +07:00
ANR2ME d5152752d2 Added a function to get SO_ERROR on a socket. 2022-03-24 08:34:03 +07:00
ANR2ME 6b0cb78b3b Recreate the socket before attempting to connect again after ECONNREFUSED/ENETUNREACH error, since reusing the socket only works on Windows. 2022-03-24 08:34:02 +07:00
ANR2ME 267757a5e4 Caches IP-specific Port Offset to avoid recalculating them. 2022-03-24 08:34:02 +07:00
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
ANR2ME a1accc87d4 Added comment related to EVENT_HELLO 2022-01-20 03:00:22 +07:00
ANR2ME 9a714249a6 Changing most frequently used global vars to atomic to avoid possible multi-threading issue on friendFinder thread which communicates with AdhocServer in background.
PS: There are more global vars being used here (too many actually), so we should find a better approach in the future (ie. using PSPThread instead).
2021-09-28 20:44:03 +07:00
ANR2ME 6a79f59c06 Fix threading issue when exiting PPSSPP due to unjoined AdhocServer thread when AdhocServer failed to bind the socket and exited the thread early. 2021-09-28 20:44:03 +07:00
ANR2ME 2bda9c1c84 Keep tracks of the sender/source port on GameMode for further communication, in case it was remapped by router or ISP for some reason. 2021-09-19 10:55:03 +07:00
ANR2ME 2305de42f0 Keeping track the source port of received data on AdhocMatching to be used for further communication, in the case the port was re-mapped for some reason. 2021-09-17 12:36:56 +07:00
Unknown W. Brackets 9403947b67 UI: Decouple new chat display and tracking logic. 2021-09-14 18:08:16 -07:00
Unknown W. Brackets be0b0cd88d UI: Track chat log changes more clearly.
This also makes it easier to have multiple views or etc. reading from it.
We want data flowing a single direction, chat system -> UI.
2021-09-14 18:08:16 -07:00
ANR2ME 7a06103cc6 Create GameMode's socket after Master and all Replicas have been created so we will know the largest buffer size. 2021-05-31 04:37:09 +07:00
ANR2ME 206ab4345e Attempts to reconnect to Adhoc Server only when Creating/Joining/Connecting to a group or Scanning for groups, instead of on 2 seconds interval. 2021-04-02 12:19:02 +07:00
ANR2ME e3228ca1b5 Use a function to check for loopback address 2021-04-02 12:18:12 +07:00
M4xw 4cc322466a Switch: Workaround several missing toolchain defs. 2021-03-04 21:24:57 -08:00
ANR2ME 758fb12fc3 Making sure there are no warnings related to deprecated inet_ntoa function 2021-03-01 01:45:27 +07:00
ANR2ME 0ce2c2c6e9 Windows recvfrom doesn't support MSG_TRUNC, so we're using dummy buffer with max size as alternative for peeking actual size of the next pending message. 2021-02-11 07:40:35 +07:00
ANR2ME fc452c0dfd Fix frozen (0 FPS) issue on Kao Challengers and Asterix & Obelix XX (probably also fix other games from the same developer with similar issue) https://github.com/hrydgard/ppsspp/issues/14103 2021-02-11 03:44:25 +07:00
ANR2ME 849fe4ade1 Updated PdpStat to prevent rcv_sb_cc from exceeding the buffer size arg (since we use larger buffer size to prevent micro stutters or disconnection issue due to too many dropped packets with small buffer size).
TODO: May need to improve it to be able to calculate the correct size if there are multiple datagram messages
2021-02-04 10:31:01 +07:00
ANR2ME a51036ffaf Updated PdpStat and PtpStat 2021-02-02 03:39:04 +07:00
ANR2ME d907906c74 Fix connection issue on Dynasty Warriors (Shin Sangoku Musou) games when playing with more than 2 players. 2021-01-30 15:20:24 +07:00
ANR2ME b10797db95 Fixed an issue where sometimes a player unable to join a host on Warriors Orochi 2 (should also fix similar issue on other games that use PDP/UDP on Windows) 2020-12-25 00:27:35 +07:00
ANR2ME 38d887ce88 Change socket's MSS based on PSP_ADHOC_PTP_MSS 2020-11-16 19:03:11 +07:00
ANR2ME 4eca124710 Blocks current thread to synchronize initial GameMode data. Fixes desync issue when GameMode multiplayer mission is being started. 2020-10-29 06:08:51 +07:00
ANR2ME 399f56f73b Implementing Adhocctl Busy state to prevent getting kicked out from Adhoc Server on games that tries to leave the group multiple times in a row.
Also Updated Adhocctl behavior.
2020-10-29 06:04:22 +07:00
ANR2ME 0157fe4988 Updated GameMode API (Fixed Pocket Pool) 2020-10-29 06:00:16 +07:00