Commit Graph

348 Commits

Author SHA1 Message Date
Cthulhu-throwaway 14e5cd317b
(Network) net_ifinfo refactor (#14102) 2022-06-25 16:37:12 +02:00
Cthulhu-throwaway a7dc57f68f
(Network) Move the addr_6to4 function to a proper place (#14100) 2022-06-25 09:18:32 +02:00
Cthulhu-throwaway 2a0fce77d3
(Wii) Silence some warnings (#14092) 2022-06-23 14:46:53 +02:00
LibretroAdmin 4a38831c47
Try to reduce fixed size char arrays from PATH_MAX_LENGTH to lower sizes (#14062)
* Try to reduce fixed size char arrays from PATH_MAX_LENGTH to lower sizes
2022-06-18 19:07:15 +02:00
Cthulhu-throwaway 43ad2b64b2 (Network) Replace socket_select calls 2022-06-12 02:13:34 -03:00
Cthulhu-throwaway fed60aaee6 Wii buildfix (round 3)
Annoying preprocessor...
2022-06-10 14:34:54 -03:00
Cthulhu-throwaway f46e41f6c4 Vita buildfix 2022-06-10 05:11:29 -03:00
Cthulhu-throwaway d4324d9a0d (Network) poll support 2022-06-04 10:46:31 -03:00
Cthulhu-throwaway 39de84eb05 Wii buildfix 2022-05-31 06:07:57 -03:00
Cthulhu-throwaway 8f7b5a1050 (Networking) Define isinprogress function 2022-05-31 05:07:23 -03:00
Cthulhu-throwaway 400faff5ba Proper buildfix for some Windows environments 2022-05-31 01:08:45 -03:00
Cthulhu-throwaway 17b7b1322e (Netplay) Some cleaning 2022-05-30 22:02:24 -03:00
Cthulhu-throwaway de30f212bc (Netplay) Enforce a timeout during connection 2022-05-30 05:23:39 -03:00
Francisco Javier Trujillo Mata 6366fcf8e3 [ORBIS] Remove legacy implementation and compile with Werror 2022-05-21 17:10:35 +02:00
Cthulhu-throwaway f0baf977fa (Network) Move natt files to "network" 2022-05-18 23:23:40 -03:00
Autechre 4c3a4d66df
Cxx buildfixes (#13803)
* CXX_BUILD buildfixes
* (D3D11) Buildfixes for CXX_BUILD
* (Linux/qb) Disable KMS for Linux when building for C89, headers use inline which is not
available for C89
2022-03-30 17:30:20 +02:00
twinaphex 26fec17593 CXX_BUILD fixes for net_natt.c 2022-03-30 15:32:23 +02:00
Vladimir Serbinenko 4a53c6771c
Several fixes and improvements do NGC and Wii (#13698)
* Support new elf2dol path in Makefile.griffin

* Fix NULL pointer dereference when no core info is available

* Fix double include of different versions of libogc

* Move ngc and wii to Makefile.common

Resulting binary is 60K *smaller*. This is surprising but probably due to
less inlining happening

* gx_gfx: Fix hang on gfx initialization

* Remove sthread_isself on NGC/Wii

It relies on pthread_equal that is not there for either legacy pthreads
or normal pthreads on those platforms

* Wii networking

* Missing includes in split

* Network fixes

* Fix logging of non-format string as a format

* Support for gx netlogger

* Network fix

* Network fixes

* Network info

* gx: Move config files to app directory

Otherwise it clashes between wiiU and vWii version with unpredictable
effects
2022-03-04 13:43:00 +01:00
Cthulhu-throwaway 023f427856
[UPnP] Stability fixes (#13652) 2022-02-22 08:22:10 +01:00
Cthulhu-throwaway cd74221d33
[Networking] GetBestRoute refactor (#13553)
Refactor to support UWP.
2022-01-27 11:38:31 +01:00
Cthulhu-throwaway c9d66eed46
(UPnP) Disable GetBestRoute for UWP (#13517)
* (UPnP) Disable GetBestRoute for the XBOX

* Macro branching to _WIN32_WINNT_WINXP

* Macro branching to __WINRT__
2022-01-20 06:12:12 +01:00
Cthulhu-throwaway c50087efdc
(UPnP) Minor refactor (#13510)
Don't clear up the request at natt_close_port.
2022-01-18 13:03:32 +01:00
Cthulhu-throwaway 1a7e8e6628
(UPnP) Refactor (#13503)
COMMON: The common library can now be used independently by any number of features.
COMMON: The common library no longer restricts HAVE_SOCKET_LEGACY.
Netplay Task: Network interface scoring changed from byte-level to bit-level.
2022-01-17 13:46:03 +01:00
Cthulhu-throwaway f8da64d740
(UPnP) Accept IGD v2 service types (#13482) 2022-01-12 15:30:16 +01:00
Cthulhu-throwaway 4cf1bcf70f
(Netplay/UPnP) Delay lobby server announcing (#13473)
Delay the announcing in order to give UPnP's port forwarding more time.

Fix the remaining truncation warnings.
2022-01-11 08:48:59 +01:00
Cthulhu-throwaway fb2d600837
(Netplay/UPnP) Smart interface selection (#13470)
Find the most suitable address for UPnP by scoring interfaces on how close their address is to the device's address.
2022-01-10 15:52:15 +01:00
Cthulhu-throwaway 26132a2330
Netplay and NAT struct improvements (#13416)
Reordered netplay and NAT structs to follow the coding guidelines more closely.

Moved part of the chat struct out of the program's image and into the heap.
2021-12-25 13:42:22 +01:00
Cthulhu-throwaway 736ab4c964
MSVC 2005 build fix (#13408) 2021-12-24 14:58:18 +01:00
Cthulhu-throwaway b67b93ebfe
Enable GetBestRoute for MSVC 2005 (#13407) 2021-12-24 14:15:20 +01:00
Cthulhu-throwaway b696903162
UPnP fix for another specific router (#13404)
* UPnP fix for another specific router

Fix UPnP for a specific router device.

Also fix net_http not writing the host's port within the HTTP request.

* Quick edit
2021-12-24 11:56:51 +01:00
Cthulhu-throwaway ec97c86756
Attempt to fix UPnP for some Windows devices (#13402)
Yet another attempt at it.
2021-12-23 23:52:01 +01:00
Cthulhu-throwaway c6369b7861
MSVC 2005 Build Fix (#13401) 2021-12-23 22:08:13 +01:00
Cthulhu-throwaway c4049b9597
NAT and netplay Fixes (#13400)
* NAT and netplay Fixes

Fix a crash when announcing your room to the internet without being in a tunnel.

Fix improper interface for UPnP for some Windows devices.

* Final edits
2021-12-23 21:28:30 +01:00
Jamiras e0ad9f7e26
fix netplay UPNP binding for specific router behavior (#13399)
* fix netplay UPNP binding for specific router behavior

* use ISSPACE macro
2021-12-23 19:30:35 +01:00
twinaphex baa51a5a91 (net_natt.c) Put IP_MULTICAST_TTL usage behind ifdef 2021-12-09 17:52:54 +01:00
twinaphex 9ec445ab40 Define IP_MULTICAST_TTL if not defined 2021-12-09 08:45:16 +01:00
Autechre 3b1a1ac8da
Remove miniupnpc dependency (#13340)
* use custom libretro-common UPNP

* Remove miniupnpc
2021-12-09 05:52:42 +01:00
twinaphex 6f60ee9b6e Network: Only use a single interface for UPnP 2021-12-05 03:47:48 +01:00
Autechre fbbe351f7d
UPnP cleanups and refactorings (#13325) 2021-12-04 21:16:34 +01:00
Autechre a44f5bbf78
Fix UPNP port mapping failed error - switch to a permanent lease time, (#13324)
but request it to be removed when we do netplay_free
2021-12-04 15:45:29 +01:00
Sage 85a256e2cb
Make http header parsing case insensitive (#13267) 2021-11-21 20:43:58 +01:00
Jamiras 5ac432026a add helper function for accessing connection method 2021-07-27 21:02:14 -06:00
Ash Logan e5553bde4e wiiu: Network optimisations - WINSCALE, TCP sACK, large buffers
See code sample in https://github.com/devkitPro/wut/issues/169 and 
2430789406/src/net.c (L88)
2021-07-18 21:02:56 +10:00
Mark W. Kidd d4fb27a7a9 implement natt fix from void() 2021-07-08 22:52:19 -04:00
toshixm 84975d71ea fix garbled characters when conveting to local encoding 2021-05-28 15:20:19 +09:00
CrystalCT 02c15dd4f5 Add some PSL1GHT ifdefs 2021-03-11 08:15:51 +01:00
CrystalCT 43bb8e6aaa Add some PSL1GHT ifdefs 2021-03-10 09:43:19 +01:00
Autechre 5fb24737d0
Merge pull request #11726 from SimpleTease/netplay_1
net_ifinfo: crashfix  (Windows)
2020-12-22 11:27:09 +01:00
SimpleTease 03c5c240a6
net_ifinfo: crashfix (Windows)
get correct size from GetAdaptersAddresses
2020-12-22 02:48:57 +00:00
twinaphex 870707dbe8 Remove obsolete __CELLOS_LV2__ references - use PSL1GHT instead 2020-12-19 15:32:26 +01:00
Alcaro ac2fe3896e
Fix backwards condition in socket blocking behavior
Fixes #11557
2020-11-16 18:28:37 +01:00
twinaphex 66deef29c6 Cleanups/style nits 2020-10-02 21:10:07 +02:00
twinaphex c6f5973281 Replace while(true) with for(;;) 2020-10-02 21:02:59 +02:00
twinaphex f84c6ec8cd Use STRLEN_CONST where possible; and don't needlessly do strlen
twice
2020-10-02 20:57:29 +02:00
Alcaro 18f46e65ea Add BearSSL support 2020-09-19 00:31:36 +02:00
twinaphex 022fa54236 Nit 2020-08-27 15:22:40 +02:00
twinaphex c51959d45b Make net_http_urlencode thread-safe 2020-08-27 15:21:22 +02:00
twinaphex 7642cf5fa5 Struct reorders/alignment 2020-08-14 22:54:46 +02:00
twinaphex 4092fd7e83 Minor cleanup 2020-08-11 06:35:12 +02:00
twinaphex eba83390ba Warning fixes 2020-07-23 07:39:08 +02:00
twinaphex d5bdec3f60 (net_http) Refactor 2020-07-05 00:51:41 +02:00
twinaphex 8f65c4e6dd Cleanups 2020-07-01 17:10:00 +02:00
twinaphex 3580db3ebe (deps/mbedtls) Cleanups 2020-07-01 03:48:13 +02:00
twinaphex d6ec4029db (mbedtls) Remove MBEDTLS_DEBUG_C 2020-07-01 01:29:27 +02:00
twinaphex 5a0bc479b1 (libretro-common) Avoid more callocs 2020-06-28 20:57:00 +02:00
MrHuu e519ccd0be (3DS) Enable basic networking / cheevos 2020-05-08 20:50:15 +02:00
twinaphex cd9ca691ca (libretro-common) Update copyright 2020-01-31 15:43:42 +01:00
twinaphex 4d18f3e9b7 Create more tests 2020-01-30 17:25:58 +01:00
twinaphex f785e4b045 Replace while (1) with for (;;) - avoids MSVC warnings 2020-01-30 16:15:52 +01:00
Jamiras d0d1c5bb37 allow characters other than / to follow port 2020-01-23 07:00:50 -07:00
Jamiras 59302e816c fix parsing of port in net_http_connection_done 2020-01-17 20:22:49 -07:00
Jamiras 67e9fba9d7 generate User-Agent for retroachievement API calls 2019-11-02 21:52:30 -06:00
twinaphex d4b7be4ae4 Update libretro-common 2019-10-31 01:25:27 +01:00
twinaphex eb77d84716 Update libretro-common 2019-10-31 01:02:01 +01:00
Twinaphex 419eb5a6c0 Remove unused variables 2019-10-04 16:06:34 +02:00
twinaphex 3b057d9605 Start using STRLCAT_CONST_INCR and STRLCPY_CONST 2019-09-20 23:33:17 +02:00
twinaphex 8fa6230426 Cleanups 2019-09-18 02:16:47 +02:00
twinaphex a36d5926d7 Cleanups 2019-09-17 05:30:07 +02:00
twinaphex 6f6b1a8333 (Net HTTP) Avoid unnecessary snprintf 2019-09-17 05:26:00 +02:00
Brad Parker c7c7d0988e initial network video driver, sends raw frames over TCP 2019-09-17 04:18:44 +02:00
twinaphex d01ae6929d Don't use strlcat for basic concatenation of characters
except when absolutely necessary
2019-09-17 02:00:04 +02:00
Brad Parker 0ecac5c8ff http: fix memory leak and potential null pointer argument to strlen 2019-07-04 16:27:51 -04:00
Twinaphex 29e4b8e2c1 Get rid of warning 2019-06-22 15:48:42 +02:00
Twinaphex 68085af944 (net http) Cleanups 2019-05-27 14:40:38 +02:00
Twinaphex d0707437c9 Remove some unused variables 2019-05-18 21:26:29 +02:00
Barry Rowe 8745333892 OCR Translation feature finaliziation. (#8738) 2019-05-11 07:15:39 +02:00
twinaphex 3e72c502a8 strlen optimizations :
- use STRLEN_CONST for constant strings, translates to sizeof
which should be computed at compile-time
- found some places where we are needlessly calling strlen two
times instead of just once
2019-04-27 04:21:10 +02:00
Brad Parker e7dbac7eb0 prevent null derefs found by scan-build 2019-04-18 11:46:53 -04:00
orbea 28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
orbea bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
Twinaphex 7835d0c54c
Merge pull request #7745 from orbea/mbedtls
Support building with the system mbedtls.
2018-12-19 01:53:14 +01:00
Brad Parker d6741651b7 net_socket_ssl: keep reading data from server until finished, fixes #7451 2018-12-18 03:01:52 -05:00
orbea dc020f2569 qb: Support building with the system mbedtls.
Fixes https://github.com/libretro/RetroArch/issues/7639

v2: Fix build failures with griffin.
2018-12-15 09:10:43 -08:00
natinusala eac0d603f4 libnx: add network interfaces info 2018-10-12 17:37:03 +02:00
Nathan Strong c5f9fc0a34 WiiU: fix network information
== DETAILS

For local netplay, it's useful to have your IP address easily
available. This commit makes the Information > Network Information
menu display the Wii U's IP address.

Change summary:
- Fix the logging init to be reentrant to avoid socket consumption
- Add implementation of POSIX `getifaddrs()` and `freeifaddrs()`
  to `missing_libc_functions.c`
- Remove compiler directives protecting the code paths that call
  `getifaddrs()` from being used in Wii U builds

== TESTING

Have tested locally, successfully get IP address information in
the Information > Network Information.

I think this may also fix NAT traversal. Will need to be tested.
2018-10-11 15:37:15 -07:00
Twinaphex f00f2e3ccf
Merge pull request #7169 from GregorR/wii-u-netplay-fix
Fix netplay on Wii U
2018-10-10 20:14:24 +02:00
lifajucejo 9be2321c02 Add networking support to libnx 2018-09-27 21:23:01 -04:00
Gregor Richards 7634b1bbb0 Fix netplay on Wii U
getaddrinfo on Wii U doesn't support node==NULL. As I don't know of this
bug on any other platform, I've made a Wii-U-specific workaround in
getaddrinfo_retro.
2018-09-01 21:14:56 -04:00
twinaphex 1becd89699 Remove DEBUG ifdef 2018-08-08 04:51:03 +02:00
twinaphex 0fb7d6a9e4 (SSL) Re-enable drbg 2018-08-07 04:57:33 +02:00