RetroArch
net_natt.h
Go to the documentation of this file.
1 /* Copyright (C) 2010-2018 The RetroArch team
2  *
3  * ---------------------------------------------------------------------------------------
4  * The following license statement only applies to this file (net_natt.h).
5  * ---------------------------------------------------------------------------------------
6  *
7  * Permission is hereby granted, free of charge,
8  * to any person obtaining a copy of this software and associated documentation files (the "Software"),
9  * to deal in the Software without restriction, including without limitation the rights to
10  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
11  * and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
16  * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
19  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
23 #ifndef _LIBRETRO_SDK_NET_NATT_H
24 #define _LIBRETRO_SDK_NET_NATT_H
25 
26 #include <net/net_compat.h>
27 #include <net/net_socket.h>
28 
29 #include <retro_common_api.h>
30 
32 
34 {
36  int nfds;
37 
40 
43 
45  bool have_inet4;
46 
49 
51  bool have_inet6;
52 
53 #if defined(AF_INET6) && !defined(HAVE_SOCKET_LEGACY)
54 
55  struct sockaddr_in6 ext_inet6_addr;
56 #endif
57 
59  void *internal;
60 };
61 
65 void natt_init(void);
66 
68 bool natt_new(struct natt_status *status);
69 
71 void natt_free(struct natt_status *status);
72 
76 bool natt_open_port_any(struct natt_status *status, uint16_t port,
77  enum socket_protocol proto);
78 
80 bool natt_read(struct natt_status *status);
81 
83 
84 #endif
int nfds
Definition: net_natt.h:36
Definition: sockets.h:204
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
void natt_init(void)
Definition: net_natt.c:50
bool natt_open_port_any(struct natt_status *status, uint16_t port, enum socket_protocol proto)
Definition: net_natt.c:184
bool have_inet4
Definition: net_natt.h:45
includes all by default used to find thumbnails Please choose a single playlist first Add Entry Add Folder Select Files< multiple > Please fill out all required fields RetroArch updated successfully Please restart the application for the changes to take effect Contributors Move Down Load Remove Add Pass No shader passes Reset All Passes Download thumbnail Start on Download All Thumbnails This Playlist Configured in port
Definition: msg_hash_us.h:7699
void natt_free(struct natt_status *status)
Definition: net_natt.c:94
Definition: sockets.h:38
bool natt_read(struct natt_status *status)
Definition: net_natt.c:228
bool natt_new(struct natt_status *status)
Definition: net_natt.c:88
bool have_inet6
Definition: net_natt.h:51
Definition: net_natt.h:33
struct sockaddr_in ext_inet4_addr
Definition: net_natt.h:48
bool request_outstanding
Definition: net_natt.h:42
socket_protocol
Definition: net_socket.h:46
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
const char * proto
Definition: civetweb.c:11575
fd_set fds
Definition: net_natt.h:39
unsigned short uint16_t
Definition: stdint.h:125