Commit Graph

337 Commits

Author SHA1 Message Date
twinaphex c318d05803 Fix buffer overlap - pointed out by @leo150, thanks 2018-03-22 15:22:17 +01:00
radius c52fdc469f remove task_push_http_transfer_raw, encode before sending data to the task 2018-03-16 22:38:21 -05:00
radius b01e63e2cd make sure to always encode urls, also change the PS3 default urls 2018-03-14 23:04:50 -05:00
meleu d5503e9e7c fix a bad in_addr manipulation on VITA - fixes #6127 (#6366)
added VITA condition
2018-03-07 22:11:30 +01:00
aliaspider 5549b136c2 (msvc) CXX_BUILD + griffin fixes. 2018-02-05 00:25:03 +01:00
aliaspider 5db96f35fa (WIN32) various build fixes. 2018-01-20 20:05:32 +01:00
twinaphex 61ff51be2f Start using string_is_equal predominantly 2018-01-16 22:53:38 +01:00
meepingsnesroms d18ee7eaed Fix new 3ds xl not being detected, others
Also fixes whitespace in makefile and platform_ctr.c and compiles with debug libctru when DEBUG=1
2017-12-29 19:30:54 -08:00
meepingsnesroms 7dbaa45172 Basic networking, bug fixes
Fix CPU count bug, make 3ds compile with networking
2017-12-28 21:49:21 -08:00
twinaphex 6441a25c35 PS3 has AF_INET6 defined yet we still shouldn't take this path 2017-12-20 15:34:57 +01:00
Twinaphex 5eb6c5dae9
Merge pull request #5936 from clienthax/ps3res
More ps3 networking fixs.
2017-12-19 23:02:14 +01:00
clienthax 73aa381b27 More ps3 networking fixs. 2017-12-19 21:39:22 +00:00
gblues 6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
twinaphex d6fd9f0cc1 Add fallback AF_INET6 path 2017-12-10 01:19:58 +01:00
clienthax a565ba0149 [PS3] Partial fix of networking 2017-12-07 22:20:02 +00:00
twinaphex 23e6f0be37 Update 2017-12-06 16:54:23 +01:00
twinaphex a53927c5aa Fix PS3 build 2017-12-06 16:53:19 +01:00
Alcaro dc4c2cd6d9 Wipe out a buncha warnings and pointless ifdefs (some warnings will remain until #5497 is fixed) 2017-10-03 00:26:29 +02:00
twinaphex dd351a3501 (Xbox) Provide implementation function for inet_ntop_compat 2017-09-13 03:05:28 +02:00
twinaphex be367138f6 Provide implementation for inet_aton for Xbox 2017-09-12 23:54:10 +02:00
radius 5d03a4719f clear inet_ntop_compat warning 2017-09-10 21:44:15 -05:00
twinaphex dbb6adb453 C89_BUILD fixes 2017-09-11 04:17:28 +02:00
twinaphex 582b688121 Silence some warnings for PS3 2017-09-06 00:21:20 +02:00
radius 6804432fa7 log address family, fix inet_ntop_compat 2017-08-15 21:03:59 -05:00
Brad Parker 02381aabef add SSL/TLS support 2017-07-26 09:18:17 -04:00
Ken edc64991f3 Fall back to IPv4 when IPv6 connections fail 2017-07-01 08:21:09 -04:00
twinaphex b11620e1eb Add retro_timers.h/retro_math.h 2017-06-28 04:41:38 +02:00
twinaphex eeff3b87e8 Turn this into #elif defined(_WIN32) 2017-05-30 02:55:29 +02:00
aliaspider d120c9f38b change this one too. 2017-05-28 12:50:21 +01:00
aliaspider b49d2a87ab getaddrinfo error codes can also be positive. 2017-05-28 12:46:39 +01:00
aliaspider 934f7c58ba (WiiU) enable networking. 2017-05-23 10:24:23 +01:00
twinaphex 3ae54e0eed Move send_udp_packet to libretro-common 2017-05-20 14:28:18 +02:00
twinaphex f9960b5f8d Typo 2017-05-17 09:43:41 +02:00
twinaphex 1178673380 Add PS4 ifdefs 2017-05-17 09:02:04 +02:00
twinaphex 7a2d799a6c Cleanups 2017-05-17 08:59:57 +02:00
Francisco José García García 2171439647 [VITA] buildfix 2017-05-17 08:55:33 +02:00
twinaphex 5635894178 Buildfix 2017-05-17 07:05:15 +02:00
twinaphex be22290495 Rename to inet_ntop_compat 2017-05-17 07:00:47 +02:00
twinaphex 8330a0ee46 Style nits 2017-05-17 05:36:02 +02:00
radius 2f1c3fb437 add inet_ntop 2017-05-16 22:21:36 -05:00
twinaphex 126a5bf121 Use string_is_equal_fast/string_is_not_equal_fast 2017-05-16 04:00:37 +02:00
twinaphex 6ebd4e139e Rewrite more string_is_equal call invocations as memcmp 2017-04-22 08:51:16 +02:00
twinaphex 82c62b1693 Use stdstring in more instances 2017-04-21 13:50:24 +02:00
Brad Parker dd80ffc61b FreeBSD buildfix 2017-03-29 16:47:58 +00:00
twinaphex c9c0621076 Try to fix some Coverity bugs 2017-03-19 02:27:07 +01:00
Brad Parker 1fc7a50f3e fix non-ascii URL encoding 2017-03-05 14:19:37 -05:00
Brad Parker 7aca744635 URL encode non-ascii characters 2017-03-05 14:19:37 -05:00
Brad Parker 79899e6b71 silence linux warning 2017-03-05 14:19:36 -05:00
Brad Parker ad6733b519 add full urlencoder and encode lobby announcement POST data 2017-03-05 14:19:36 -05:00
Brad Parker fb3393eb3a add user agent to http requests 2017-03-05 14:19:35 -05:00
Brad Parker 101475c2f6 fix POST handling 2017-03-05 14:19:34 -05:00
Brad Parker c31823aa94 add HTTP POST support 2017-03-05 14:19:34 -05:00
Twinaphex b7b3b2cb5f Try to prevent truckload of warnings on iOS 2017-02-26 10:33:03 +01:00
Jean-André Santoni 8a6e102a82 Increase UPNP compatibility 2017-02-22 23:02:17 +01:00
twinaphex ea56249661 (net_natt.c) Free net_addrinfo before going out of scope 2017-02-22 05:24:28 +01:00
BuildTools ac9aa4783a Fixed a bug failing to check initialization in non-UPnP-supporting
setups
2017-02-21 22:02:20 -05:00
Gregor Richards 22500914e1 Fix missing memory free when IPv6 is unsupported 2017-02-21 17:42:09 -05:00
twinaphex 457b54149d Prevent another Coverity warning 2017-02-21 21:17:17 +01:00
twinaphex 5576115389 Make natt_open_port a static function 2017-02-18 22:03:02 +01:00
aliaspider 9348369824 (Wii) buildfix for HAVE_NETWORKING=1. 2017-01-23 23:27:08 +01:00
twinaphex 64bb848daf Update headers (pt. 2 - libretro-common) 2017-01-22 13:58:20 +01:00
twinaphex 7931436f5b Apply xerpi diff 2017-01-17 18:12:23 +01:00
Brad Parker e1f4db8081 Win2000 buildfixes 2017-01-16 20:41:08 -05:00
Alcaro f95759c39b No need for those casts 2017-01-02 02:11:30 +01:00
twinaphex dae80e4e26 (MSVC) Buildfixes 2017-01-02 01:41:00 +01:00
twinaphex 43459e2269 N/A 2016-12-26 06:44:04 +01:00
Gregor Richards a6cd8c3aa1 Error reporting when a password is refused, plus a bugfix so that
socket_receive_all_nonblocking actually reports disconnects.
2016-12-18 19:28:43 -05:00
Gregor Richards 900e5a79ec Use nonblocking sockets for Netplay to avoid some stalls. 2016-12-18 19:28:38 -05:00
twinaphex feae0823ce Prevent some implicit memsets 2016-12-17 14:40:06 +01:00
twinaphex c739ca016c Add net_http_parse 2016-12-17 00:46:23 +01:00
Gregor Richards 65224dc2a5 NAT traversal also needs to avoid IPv6 with SOCKET_LEGACY 2016-12-10 13:58:51 -05:00
Gregor Richards c2c2c57095 Remove support for MiniUPNPC < 2.0 2016-12-04 13:04:30 -05:00
Gregor Richards a082df0027 More stripping out of NAT traversal for SOCKET_LEGACY 2016-12-02 13:18:35 -05:00
Gregor Richards 8dc9c64297 Yet another pre-2.0 fix for MiniUPNPC (if we have more problems I'll
just drop support for pre-2.0)
2016-12-01 09:39:41 -05:00
Gregor Richards a0ac7e6a68 Make net_ifinfo's allocation behavior simpler and clearer 2016-11-30 19:57:18 -05:00
Gregor Richards 4ad1aa7eff Don't double-free net_ifinfo structure. 2016-11-30 19:21:33 -05:00
Gregor Richards ef65f6c57a Support for both MiniUPNPC 2.0 and MiniUPNPC < 2.0
MiniUPNPC 2.0 was a backwards-incompatible change (as .0s tend to be)
but configure detects them the same. This adds support for the changed
functions.
2016-11-30 10:48:11 -05:00
Twinaphex bb499b70be Merge pull request #4104 from GregorR/natt
NAT traversal
2016-11-30 16:09:53 +01:00
Gregor Richards b3ababce9a Fix Netplay IPv6 support 2016-11-30 00:25:16 -05:00
Gregor Richards b1f9ef6073 Since I've allocated net_ifinfo, I'd better free it in all returns 2016-11-29 23:31:35 -05:00
Gregor Richards 8e5e760773 Remove accidentally-left debug printf 2016-11-29 23:30:12 -05:00
Gregor Richards 2522f68870 C++ fixes 2016-11-29 23:10:19 -05:00
Gregor Richards 025993231f Use net_ifinfo how it's intended (?) to be used 2016-11-29 23:08:48 -05:00
Gregor Richards c342c103ae Always get numeric host/ports instead of names. 2016-11-29 23:08:26 -05:00
Gregor Richards da406c3abb Adding copyright headers and support for specifying protocol (TCP/UDP) 2016-11-29 21:09:47 -05:00
Gregor Richards 65355994b3 NAT traversal
Adding NAT traveral interface to libretro-common, with (currently) a
backend support MiniUPNPC. Sensible future backends would be libupnp and
a direct implementation of PCP/NAT-PMP.
2016-11-29 21:00:53 -05:00
twinaphex f3ad815dd9 Prevent implicit memsets 2016-10-21 06:15:20 +02:00
twinaphex d82055bc04 (libretro-common) net_compat.c - cleanup 2016-10-09 10:04:02 +02:00
twinaphex 481ebced22 Prevent implicit memsets 2016-10-09 09:56:03 +02:00
twinaphex 17ded1a9ac Move net/test to samples/net/test 2016-09-29 21:27:26 +02:00
Gregor Richards b0672e47ae Fix socket_send_all_blocking to fail on errors not related to blocking 2016-09-21 14:01:25 -04:00
twinaphex f395e851c4 Use stdstring.h 2016-09-16 17:25:47 +02:00
twinaphex 465d17a6e2 (libretro-common) Update files 2016-08-24 01:45:59 +02:00
aliaspider 5a80bd6b30 (VITA) build fix for latest sdk. 2016-06-05 22:01:25 +01:00
twinaphex d5d2f7f8ee Fix resource leaks 2016-05-23 22:17:28 +02:00
twinaphex 974d3245d2 Fix logically dead code warnings 2016-05-23 22:04:00 +02:00
twinaphex 0d833c903a Merge remote-tracking branch 'origin/vulkan-windows' 2016-05-16 07:51:01 +02:00
twinaphex 3f3adf0c0e Add return value for inet_aton 2016-05-09 02:50:02 +02:00
twinaphex 510c804781 (Win32) Provide inet_aton implementation 2016-05-08 19:12:01 +02:00
twinaphex 4791c37039 (Vita) Reimplement inet_ptrton for Vita 2016-05-08 18:09:03 +02:00
twinaphex e2090dc02d Vita doesn't support inet_pton either 2016-05-08 16:13:55 +02:00
twinaphex 11ec23bc18 Create inet_ptrton 2016-05-08 15:41:34 +02:00
twinaphex 2f6baffe45 Expand net_socket.c 2016-05-08 07:24:10 +02:00
twinaphex f60676f43e Create inet_htons 2016-05-03 04:35:51 +02:00
twinaphex 35b7d0423f init_network - fix some codepaths 2016-05-03 04:28:58 +02:00
twinaphex fd2096f3dc Cleanups 2016-05-03 04:26:18 +02:00
twinaphex 2eb4571290 Move this code to net_compat.c 2016-05-02 19:44:12 +02:00
twinaphex dbd56997f4 Changes to getaddrinfo_retro 2016-05-02 19:30:12 +02:00
twinaphex 44cfa6d876 Cleanup 2016-05-02 19:04:03 +02:00
twinaphex b25b2a0e6c Some code de-duplication 2016-05-02 18:54:55 +02:00
twinaphex 00a49d068e Implement TCP protocol for socket_create 2016-05-02 18:47:34 +02:00
twinaphex 317ecabadf (Retropad) Use socket_create 2016-05-02 18:45:05 +02:00
twinaphex 18f8ded154 Flesh out socket_create some more 2016-05-02 18:42:13 +02:00
twinaphex 62508eca77 Create socket_create 2016-05-02 18:37:08 +02:00
twinaphex 96723f3a57 Cleanup 2016-05-02 02:10:45 +02:00
twinaphex 31f3fc0abb Create socket_receive_all_nonblocking 2016-05-02 02:09:22 +02:00
twinaphex e29b915536 Cleanups 2016-05-02 00:18:39 +02:00
Alcaro f11a240190 Clean up the error handlers around here. 2016-05-01 23:50:20 +02:00
twinaphex 2e1fa648b8 Create socket_connect 2016-05-01 23:45:59 +02:00
twinaphex bd9dd06ddd Get rid of duplicate function net_http_send 2016-05-01 23:17:17 +02:00
twinaphex 004d9a613c Create socket_bind 2016-05-01 22:57:44 +02:00
twinaphex 78bb85e2f3 Reuse socket_init for net_http code 2016-05-01 22:45:32 +02:00
twinaphex 8b9456f419 Add socket_type to socket_init 2016-05-01 22:25:23 +02:00
Twinaphex d2a80e26db Buildfixes 2016-05-01 21:38:19 +02:00
twinaphex 0268212d40 Move socket code to net_socket.c 2016-05-01 21:36:28 +02:00
twinaphex a7b856b65f (libretro-common) Create net_socket 2016-05-01 21:18:45 +02:00
twinaphex 5032c677e6 (Net) Only comment out printf 2016-05-01 14:44:12 +02:00
twinaphex 8dd4333e16 (net_http) Comment out debug logging 2016-05-01 14:38:23 +02:00
twinaphex 5d449d5024 (libretro-common) net_http - cleanups 2016-04-28 11:58:44 +02:00
Alcaro 68a17c5401 Fix HTTP protocol violation. 2016-04-27 21:04:16 +02:00
Alcaro bbb7871028 Why exactly are we iterating over this string one character per frame? 2016-04-23 22:50:46 +02:00
Hans-Kristian Arntzen 72f65396c7 Fix cross-compile build on Linux. 2016-03-29 15:50:12 +02:00
twinaphex f960e9ad26 Move files 2016-03-21 18:37:19 +01:00
twinaphex 869cb8a1be (net_ifinfo.c) Bugfix 2016-03-03 07:17:17 +01:00
twinaphex ec0d9f0a70 (net_ifinfo.c) Style nits 2016-03-03 07:16:06 +01:00
twinaphex 97eea9e71f (net_ifinfo/Win32) Adapter name shows up now - IP address doesn't yet 2016-03-03 05:50:45 +01:00
twinaphex 4d630189a2 Start adding Windows implementation for net_ifinfo.c - will
need to link against iphlpapi for mingw
2016-03-03 04:40:25 +01:00
twinaphex 966f267285 (Win32) Start trying to implement Win32 backend for net_ifinfo.c 2016-03-03 04:11:24 +01:00
twinaphex 5b4ba2a449 Add Network Information now 2016-03-03 03:06:54 +01:00
twinaphex 4fce2e74ac (Win32) Buildfix 2016-03-03 02:10:34 +01:00
twinaphex 88b3b9a08d Include boolean.h 2016-03-03 02:09:30 +01:00
twinaphex c9e6a91137 (Android) Bake in ifaddrs for Android 2016-03-03 02:08:47 +01:00
twinaphex a3234f3f17 (net_ifinfo.c) ifndef this out for _WIN32 so far 2016-03-03 01:34:45 +01:00
twinaphex 61faa0a04b Bake in net_ifinfo 2016-03-03 00:26:26 +01:00
twinaphex 191b233334 Cleanup net_ifinfo 2016-03-03 00:22:38 +01:00
twinaphex d805845e29 Add net_ifinfo 2016-03-03 00:17:14 +01:00
twinaphex 414c63b59a (VG) Silence some warnings
(Libretro-common) Add some headers
2016-03-02 23:09:31 +01:00
Higor Eurípedes f84bea4302 (task_http) Disallow same-file concurrent downloads 2015-11-30 11:37:06 -03:00
twinaphex f319916e80 C89_BUILD buildfixes 2015-11-25 03:33:54 +01:00
Higor Eurípedes afce03a20e (task_http) Abort task on error 2015-11-23 22:45:36 -03:00
Higor Eurípedes 935e03fa97 Reimplement http transfers using tasks 2015-11-23 17:42:01 -03:00
Andre Leiradella 0750fe50bb better network initialization in net_http_new_socket 2015-10-29 22:04:48 -02:00
Andre Leiradella 6f137587d1 initialize the network in net_http_new_socket 2015-10-28 21:25:27 -02:00
twinaphex 02a43c6b2a Change 'rarch' to 'retro' namespace in libretro-common 2015-10-26 03:18:13 +01:00
Andre Leiradella 33fc0cc803 moved net_http_get back to cheevos.c 2015-10-19 23:20:10 -02:00
Andre Leiradella b6a3da5a41 moved net_http_get to net_http.c; added timeout to cheevos http requests 2015-10-19 20:37:54 -02:00
twinaphex 0a3db8f7bb Update cheevos - style nits 2015-10-15 16:04:26 +02:00
twinaphex 87d44af218 Static code analysis cleanups 2015-09-29 18:08:33 +02:00
twinaphex 9b4a99d506 (net_compat.c) Style nits 2015-09-29 02:41:41 +02:00
Francisco José García García 7fa6a796be (Vita) First Networking Code and Download Overlays 2015-09-29 00:40:53 +02:00
twinaphex 02a5d738fe Static code analysis cleanups 2015-09-28 23:00:22 +02:00
twinaphex 790bb0d0d6 Minor code cleanups based on static code analysis 2015-09-28 22:07:40 +02:00
twinaphex c569aa93a6 One buildfix begets another buildfix 2015-09-19 13:13:31 +02:00
Twinaphex 6b45c9e940 Buildfix net_http_connection_new 2015-09-19 13:07:33 +02:00
twinaphex 43da185d5d Replace more usage of strcpy 2015-09-19 03:50:35 +02:00
twinaphex 7d3408e731 Cleanups 2015-09-05 21:13:58 +02:00
twinaphex 3522c45067 Avoid some warnings - 'array subscript has type char' 2015-09-05 14:25:42 +02:00
twinaphex 039b4e0454 Move code back to logger.c 2015-08-29 18:57:07 +02:00
twinaphex aa1881febf Cleanups 2015-08-29 16:28:35 +02:00
twinaphex 532c73210b Add !defined(__PSL1GHT__) defines 2015-08-29 16:27:50 +02:00
twinaphex e32b99ac0c Consolidate PSL1GHT logger into logger/netlogger/logger.c
and expand net/net_compat.c
2015-08-29 16:24:38 +02:00
twinaphex d4d76daa12 Random cleanups 2015-06-13 00:44:47 +02:00
twinaphex e010a6e0bf net_http_update - prevent NULL pointer dereferences and return
false when erroring out
2015-05-20 22:38:15 +02:00
Alcaro 81e583c497 Test this one for failure... shouldn't getaddrinfo be testing this already? 2015-05-20 16:06:48 +02:00
Alcaro 94046d2d74 Clean out some unused variables. 2015-05-20 16:05:56 +02:00
Alcaro 6c5a4a84b5 Fix free function that doesn't free what it's told to free. 2015-05-19 22:07:14 +02:00
twinaphex 01e100f6df Include <sys/types.h> in net_compat.c 2015-03-23 23:55:43 +01:00
twinaphex 8a6cce1964 (net_http) Prevent NULL pointer dereferences 2015-03-23 10:13:15 +01:00
twinaphex 64a866af84 Prevent crash in net_http.c function 2015-03-21 22:10:13 +01:00
Twinaphex 4ecbc9bc66 Merge pull request #1524 from heuripedes/master
Win32 fixes
2015-03-21 00:03:50 +01:00
twinaphex 85d244d09a Include stdint.h in net_compat.c 2015-03-20 22:23:08 +01:00
Higor Eurípedes 79335249d0 (libretro-common/net_compat.c) Fix build 2015-03-20 17:41:50 -03:00
twinaphex 9405cec6ca Use net_compat.h in net_http_test.c 2015-03-20 18:12:37 +01:00
twinaphex 871b6944cb net_http_new_socket - C89 compatibility fixes 2015-03-20 18:04:46 +01:00
twinaphex cb41ee6186 net_http_test.c - Fixup header include 2015-03-20 17:57:29 +01:00
twinaphex 10d2d7cba8 Take out netplay.h dependency (net_compat.c) 2015-03-20 17:57:04 +01:00
twinaphex d2c97de070 Move net_compat/net_http to libretro-common 2015-03-20 17:56:00 +01:00