23 #ifndef LIBRETRO_SDK_NETPLAY_COMPAT_H__ 24 #define LIBRETRO_SDK_NETPLAY_COMPAT_H__ 34 #if defined(_WIN32) && !defined(_XBOX) 36 #define _WIN32_WINNT 0x0501 39 #define WIN32_LEAN_AND_MEAN 46 #define MSG_NOSIGNAL 0 62 #include <psp2/net/net.h> 63 #include <psp2/net/netctl.h> 65 #define sockaddr_in SceNetSockaddrIn 66 #define sockaddr SceNetSockaddr 67 #define sendto sceNetSendto 68 #define recvfrom sceNetRecvfrom 69 #define socket(a,b,c) sceNetSocket("unknown",a,b,c) 70 #define bind sceNetBind 71 #define accept sceNetAccept 72 #define setsockopt sceNetSetsockopt 73 #define connect sceNetConnect 74 #define listen sceNetListen 75 #define send sceNetSend 76 #define recv sceNetRecv 77 #define MSG_DONTWAIT SCE_NET_MSG_DONTWAIT 78 #define AF_INET SCE_NET_AF_INET 80 #define INADDR_ANY SCE_NET_INADDR_ANY 81 #define INADDR_NONE 0xffffffff 82 #define SOCK_STREAM SCE_NET_SOCK_STREAM 83 #define SOCK_DGRAM SCE_NET_SOCK_DGRAM 84 #define SOL_SOCKET SCE_NET_SOL_SOCKET 85 #define SO_REUSEADDR SCE_NET_SO_REUSEADDR 86 #define SO_SNDBUF SCE_NET_SO_SNDBUF 87 #define SO_SNDTIMEO SCE_NET_SO_SNDTIMEO 88 #define SO_NBIO SCE_NET_SO_NBIO 89 #define htonl sceNetHtonl 90 #define ntohl sceNetNtohl 91 #define htons sceNetHtons 92 #define socklen_t unsigned int 107 #include <sys/select.h> 108 #include <sys/types.h> 120 #if defined(__CELLOS_LV2__) && !defined(__PSL1GHT__) 121 #include <cell/sysmodule.h> 122 #include <netex/net.h> 123 #include <netex/libnetctl.h> 124 #include <sys/timer.h> 127 #define EWOULDBLOCK SYS_NET_EWOULDBLOCK 139 #define sendto(s, msg, len, flags, addr, tolen) net_sendto(s, msg, len, 0, addr, 8) 140 #define socket(domain, type, protocol) net_socket(domain, type, protocol) 141 #define bind(s, name, namelen) net_bind(s, name, namelen) 142 #define listen(s, backlog) net_listen(s, backlog) 143 #define accept(s, addr, addrlen) net_accept(s, addr, addrlen) 144 #define connect(s, addr, addrlen) net_connect(s, addr, addrlen) 145 #define send(s, data, size, flags) net_send(s, data, size, flags) 146 #define recv(s, mem, len, flags) net_recv(s, mem, len, flags) 147 #define recvfrom(s, mem, len, flags, from, fromlen) net_recvfrom(s, mem, len, flags, from, fromlen) 148 #define select(maxfdp1, readset, writeset, exceptset, timeout) net_select(maxfdp1, readset, writeset, exceptset, timeout) 156 if (WSAGetLastError() != WSAEWOULDBLOCK)
159 #elif defined(__CELLOS_LV2__) && !defined(__PSL1GHT__) 160 return (sys_net_errno == SYS_NET_EWOULDBLOCK) || (sys_net_errno == SYS_NET_EAGAIN);
162 return (bytes<0 && (bytes == SCE_NET_ERROR_EAGAIN || bytes == SCE_NET_ERROR_EWOULDBLOCK));
171 #define socklen_t int 174 #define h_addr h_addr_list[0] 178 #define SO_KEEPALIVE 0 183 #define MSG_NOSIGNAL 0 187 #include <sys/time.h> 195 #ifdef HAVE_SOCKET_LEGACY 197 #define sockaddr_storage sockaddr_in 198 #define addrinfo addrinfo_retro__ #define h_addr
Definition: network.h:187
int getaddrinfo_retro(const char *node, const char *service, struct addrinfo *hints, struct addrinfo **res)
Definition: net_compat.c:168
#define const
Definition: zconf.h:217
#define INLINE
Definition: retro_inline.h:35
char ** h_aliases
Definition: network.h:232
Configuration options (set of defines)
int ai_family
Definition: netdb.h:24
GLuint res
Definition: glext.h:10520
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
#define EAGAIN
Definition: need_errno.h:42
Definition: network.h:230
int ai_flags
Definition: netdb.h:22
char ** h_addr_list
Definition: network.h:235
int inet_ptrton(int af, const char *src, void *dst)
Definition: net_compat.c:397
char * h_name
Definition: network.h:231
uint16_t inet_htons(uint16_t hostshort)
Definition: net_compat.c:380
void freeaddrinfo_retro(struct addrinfo *res)
Definition: net_compat.c:252
#define SO_EWOULDBLOCK
Definition: socket.h:30
#define SOCKET_ERROR
Definition: net_retropad_core.c:30
static const unsigned char msg[]
Definition: ccm.c:375
GLenum src
Definition: glext.h:6980
#define SO_SUCCESS
Definition: socket.h:29
static INLINE bool isagain(int bytes)
Definition: net_compat.h:151
bool udp_send_packet(const char *host, uint16_t port, const char *msg)
Definition: net_compat.c:601
struct addrinfo * ai_next
Definition: netdb.h:30
int ai_protocol
Definition: netdb.h:26
s8_t inet_aton(const char *cp, struct in_addr *addr)
Definition: network_common.c:42
char * ai_canonname
Definition: netdb.h:28
struct sockaddr * ai_addr
Definition: netdb.h:29
bool network_init(void)
Definition: net_compat.c:269
#define EWOULDBLOCK
Definition: socket.h:33
int ai_addrlen
Definition: netdb.h:27
GLenum GLenum dst
Definition: glext.h:6980
int ai_socktype
Definition: netdb.h:25
const char * inet_ntop_compat(int af, const void *src, char *dst, socklen_t cnt)
Definition: net_compat.c:563
u16 h_addrtype
Definition: network.h:233
unsigned short uint16_t
Definition: stdint.h:125
uint32_t socklen_t
Definition: netdb.h:10
u16 h_length
Definition: network.h:234
void network_deinit(void)
Definition: net_compat.c:350