1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-03 00:38:44 +00:00

(Network) Move natt files to "network"

This commit is contained in:
Cthulhu-throwaway 2022-05-18 23:23:40 -03:00
parent 011e371e42
commit f0baf977fa
8 changed files with 33 additions and 53 deletions

View File

@ -2108,8 +2108,8 @@ ifeq ($(HAVE_NETWORKING), 1)
$(LIBRETRO_COMM_DIR)/net/net_http.o \
$(LIBRETRO_COMM_DIR)/net/net_http_parse.o \
$(LIBRETRO_COMM_DIR)/net/net_socket.o \
$(LIBRETRO_COMM_DIR)/net/net_natt.o \
core_updater_list.o \
network/natt.o \
network/net_http_special.o \
tasks/task_http.o \
tasks/task_netplay_lan_scan.o \

View File

@ -1330,12 +1330,12 @@ THREAD
NETPLAY
============================================================ */
#ifdef HAVE_NETWORKING
#include "../network/natt.c"
#include "../network/netplay/netplay_frontend.c"
#include "../network/netplay/netplay_room_parse.c"
#include "../libretro-common/net/net_compat.c"
#include "../libretro-common/net/net_socket.c"
#include "../libretro-common/net/net_http.c"
#include "../libretro-common/net/net_natt.c"
#if !defined(HAVE_SOCKET_LEGACY)
#include "../libretro-common/net/net_ifinfo.c"
#endif

View File

@ -1,23 +1,16 @@
/* Copyright (C) 2016-2022 The RetroArch team
/* RetroArch - A frontend for libretro.
* Copyright (C) 2021-2022 - Roberto V. Rampim
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (net_natt.c).
* ---------------------------------------------------------------------------------------
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* Permission is hereby granted, free of charge,
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
@ -33,9 +26,9 @@
#include <net/net_ifinfo.h>
#endif
#include "../../tasks/tasks_internal.h"
#include "../tasks/tasks_internal.h"
#include <net/net_natt.h>
#include "natt.h"
static bool translate_addr(struct sockaddr_in *addr,
char *host, size_t hostlen, char *port, size_t portlen)

View File

@ -1,35 +1,27 @@
/* Copyright (C) 2010-2022 The RetroArch team
/* RetroArch - A frontend for libretro.
* Copyright (C) 2021-2022 - Roberto V. Rampim
*
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (net_natt.h).
* ---------------------------------------------------------------------------------------
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* Permission is hereby granted, free of charge,
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _LIBRETRO_SDK_NET_NATT_H
#define _LIBRETRO_SDK_NET_NATT_H
#ifndef __RARCH_NATT_H
#define __RARCH_NATT_H
#include <libretro.h>
#include <boolean.h>
#include <net/net_compat.h>
#include <net/net_socket.h>
#include <retro_common_api.h>
RETRO_BEGIN_DECLS
enum natt_forward_type
{
NATT_FORWARD_TYPE_NONE,
@ -182,6 +174,4 @@ bool natt_open_port(struct natt_device *device,
bool natt_close_port(struct natt_device *device,
struct natt_request *request, bool block);
RETRO_END_DECLS
#endif
#endif /* __RARCH_NATT_H */

View File

@ -31,11 +31,12 @@
#include <net/net_compat.h>
#include <net/net_ifinfo.h>
#include <net/net_natt.h>
#include <retro_miscellaneous.h>
#include "../../core.h"
#include "../natt.h"
#include "netplay_protocol.h"
#define NETPLAY_NICK_LEN 32

View File

@ -142,7 +142,6 @@
92B9EB7A24E0518700E6CFB2 /* net_ifinfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_ifinfo.h; sourceTree = "<group>"; };
92B9EB7B24E0518700E6CFB2 /* net_compat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_compat.h; sourceTree = "<group>"; };
92B9EB7C24E0518700E6CFB2 /* net_socket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_socket.h; sourceTree = "<group>"; };
92B9EB7D24E0518700E6CFB2 /* net_natt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_natt.h; sourceTree = "<group>"; };
92B9EB7E24E0518700E6CFB2 /* net_socket_ssl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_socket_ssl.h; sourceTree = "<group>"; };
92B9EB7F24E0518700E6CFB2 /* net_http.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_http.h; sourceTree = "<group>"; };
92B9EB8024E0518700E6CFB2 /* net_http_parse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_http_parse.h; sourceTree = "<group>"; };
@ -571,7 +570,6 @@
92B9EB7A24E0518700E6CFB2 /* net_ifinfo.h */,
92B9EB7B24E0518700E6CFB2 /* net_compat.h */,
92B9EB7C24E0518700E6CFB2 /* net_socket.h */,
92B9EB7D24E0518700E6CFB2 /* net_natt.h */,
92B9EB7E24E0518700E6CFB2 /* net_socket_ssl.h */,
92B9EB7F24E0518700E6CFB2 /* net_http.h */,
92B9EB8024E0518700E6CFB2 /* net_http_parse.h */,

View File

@ -170,7 +170,6 @@
92B9EB7A24E0518700E6CFB2 /* net_ifinfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_ifinfo.h; sourceTree = "<group>"; };
92B9EB7B24E0518700E6CFB2 /* net_compat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_compat.h; sourceTree = "<group>"; };
92B9EB7C24E0518700E6CFB2 /* net_socket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_socket.h; sourceTree = "<group>"; };
92B9EB7D24E0518700E6CFB2 /* net_natt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_natt.h; sourceTree = "<group>"; };
92B9EB7E24E0518700E6CFB2 /* net_socket_ssl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_socket_ssl.h; sourceTree = "<group>"; };
92B9EB7F24E0518700E6CFB2 /* net_http.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_http.h; sourceTree = "<group>"; };
92B9EB8024E0518700E6CFB2 /* net_http_parse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = net_http_parse.h; sourceTree = "<group>"; };
@ -637,7 +636,6 @@
92B9EB7A24E0518700E6CFB2 /* net_ifinfo.h */,
92B9EB7B24E0518700E6CFB2 /* net_compat.h */,
92B9EB7C24E0518700E6CFB2 /* net_socket.h */,
92B9EB7D24E0518700E6CFB2 /* net_natt.h */,
92B9EB7E24E0518700E6CFB2 /* net_socket_ssl.h */,
92B9EB7F24E0518700E6CFB2 /* net_http.h */,
92B9EB8024E0518700E6CFB2 /* net_http_parse.h */,

View File

@ -30,7 +30,7 @@
#include <net/net_ifinfo.h>
#endif
#include <net/net_natt.h>
#include "../network/natt.h"
#include "../network/netplay/netplay.h"
/* Find the most suitable address within the device's network. */