13 #define ntohs BigShort
14 #define htons BigShort
27 #define AF_WEBSOCK 342
42 #if defined(_MSC_VER) && defined(HAVE_LEGACY)
45 #define WIN32_LEAN_AND_MEAN
54 #if !defined(IPPROTO_IPV6) && !defined(_XBOX)
56 #define IPPROTO_IPV6 41
75 #if !defined(in_addr6)
80 #define sockaddr_in6 sockaddr_in6_fixed
107 #define IPV6_V6ONLY 27
116 #define SOCK_CLOEXEC 0
119 #include <sys/time.h>
120 #include <sys/types.h>
121 #include <sys/socket.h>
122 #include <netinet/in.h>
123 #include <netinet/tcp.h>
125 #include <sys/ioctl.h>
127 #include <arpa/inet.h>
133 #include <sys/filio.h>
147 #include <sys/epoll.h>
154 #if defined(__MORPHOS__) && !defined(ixemul)
155 #define closesocket CloseSocket
156 #define ioctlsocket IoctlSocket
158 #define closesocket close
159 #define ioctlsocket ioctl
165 #if defined(AF_INET6)
177 #define SOCK_CLOEXEC 0
182 #define neterrno() WSAGetLastError()
185 #define NET_EINTR WSAEINTR
186 #define NET_EWOULDBLOCK WSAEWOULDBLOCK
187 #define NET_EINPROGRESS WSAEINPROGRESS
188 #define NET_EMSGSIZE WSAEMSGSIZE
189 #define NET_ECONNRESET WSAECONNRESET
190 #define NET_ECONNABORTED WSAECONNABORTED
191 #define NET_ECONNREFUSED WSAECONNREFUSED
192 #define NET_ETIMEDOUT WSAETIMEDOUT
193 #define NET_ENOTCONN WSAENOTCONN
194 #define NET_EACCES WSAEACCES
195 #define NET_EADDRNOTAVAIL WSAEADDRNOTAVAIL
196 #define NET_ENETUNREACH WSAENETUNREACH
197 #define NET_EAFNOSUPPORT WSAEAFNOSUPPORT
198#elif defined(__MORPHOS__) && !defined(ixemul)
199 #define neterrno() Errno()
201 #define neterrno() errno
204#ifndef NET_EWOULDBLOCK
206 #define NET_EINTR EINTR
207 #define NET_EWOULDBLOCK EWOULDBLOCK
208 #define NET_EINPROGRESS EINPROGRESS
209 #define NET_EMSGSIZE EMSGSIZE
210 #define NET_ECONNRESET ECONNRESET
211 #define NET_ECONNABORTED ECONNABORTED
212 #define NET_ECONNREFUSED ECONNREFUSED
213 #define NET_ETIMEDOUT ETIMEDOUT
214 #define NET_ENOTCONN ENOTCONN
215 #define NET_EACCES EACCES
216 #define NET_EADDRNOTAVAIL EADDRNOTAVAIL
217 #define NET_ENETUNREACH ENETUNREACH
218 #define NET_EAFNOSUPPORT EAFNOSUPPORT
221#ifndef INVALID_SOCKET
222 #define INVALID_SOCKET -1
225 #define MSG_NOSIGNAL 0
228#ifndef INADDR_LOOPBACK
229 #define INADDR_LOOPBACK 0x7f000001
232#if defined(FTE_TARGET_WEB)
283#define ICE_API_CURRENT "Internet Connectivity Establishment 0.0"
293 qboolean (QDECL *GetLCandidateSDP)(
struct icestate_s *con,
char *
out,
size_t valuesize);
294 struct icestate_s *(QDECL *
Find)(
void *
module,
const char *conname);
308#define ADDR_NATPMP (1u<<0)
309#define ADDR_UPNPIGP (1u<<1)
310#define ADDR_REFLEX (1u<<2)
312#define FTENET_ADDRTYPES 2
321#if defined(HAVE_PACKET) && !defined(HAVE_EPOLL)
372 qboolean (*
CheckConnection)(
void *cbctx,
void *peeraddr,
size_t peeraddrsize,
void *indata,
size_t insize,
neterr_t(*push)(
void *cbctx,
const qbyte *
data,
size_t datasize),
void (*EstablishTrueContext)(
void **cbctx,
void *state));
400#define cryptolib_count 6
406#define MAX_CONNECTIONS 8
enum @13::coninfomode_e mode
Definition: com_phys_ode.c:695
netadr_t adr[8]
Definition: cl_main.c:288
int defaultport
Definition: cl_main.c:320
void(QDECL *vgui_frame)(void)
unsigned char qbyte
Definition: common.h:127
unsigned int col
Definition: gl_ngraph.c:39
GLenum GLuint GLenum GLsizei const GLchar * message
Definition: gl_vidcommon.c:351
static EGLSurface EGLSurface EGLContext ctx
Definition: gl_videgl.c:47
Atom prop
Definition: gl_vidlinuxglx.c:4691
static CONST PIXELFORMATDESCRIPTOR *static int
Definition: gl_vidnt.c:222
GLsizei const GLcharARB const GLint * length
Definition: glquake.h:149
GLint GLenum type
Definition: glquake.h:157
GLuint GLcharARB * name
Definition: glquake.h:155
GLint size
Definition: glquake.h:157
GLsizei GLboolean const GLfloat * value
Definition: glquake.h:164
GLsizei GLsizei GLcharARB * source
Definition: glquake.h:171
void * module
Definition: image.c:236
neterr_t
Definition: net.h:124
netadrtype_t
Definition: net.h:34
certprops_e
Definition: net.h:195
netproto_t
Definition: net.h:54
cvar_t hostname
Definition: sv_main.c:204
vfsfile_t * FS_OpenTCP(const char *name, int defaultport, qboolean assumetls)
Definition: net_wins.c:9836
ftecrypto_t crypto_gnutls
Definition: netinc.h:401
qboolean ICE_WasStun(ftenet_connections_t *col)
Definition: net_ice.c:4058
ftecrypto_t crypto_sspi
Definition: net_ssl_winsspi.c:1758
struct ftenet_generic_connection_s ftenet_generic_connection_t
vfsfile_t * FS_WrapTCPSocket(SOCKET socket, qboolean conpending, const char *peername)
Definition: net_wins.c:9815
websocketpackettype_e
Definition: netinc.h:460
@ WS_PACKETTYPE_TEXTFRAME
Definition: netinc.h:462
@ WS_PACKETTYPE_PONG
Definition: netinc.h:466
@ WS_PACKETTYPE_PING
Definition: netinc.h:465
@ WS_PACKETTYPE_CLOSE
Definition: netinc.h:464
@ WS_PACKETTYPE_CONTINUATION
Definition: netinc.h:461
@ WS_PACKETTYPE_BINARYFRAME
Definition: netinc.h:463
icestate_e
Definition: netinc.h:275
@ ICE_INACTIVE
Definition: netinc.h:276
@ ICE_FAILED
Definition: netinc.h:277
@ ICE_GATHERING
Definition: netinc.h:278
@ ICE_CONNECTING
Definition: netinc.h:279
@ ICE_CONNECTED
Definition: netinc.h:280
int TLS_GetChannelBinding(vfsfile_t *stream, qbyte *data, size_t *datasize)
Definition: net_wins.c:2658
int NET_EnumerateAddresses(ftenet_connections_t *collection, struct ftenet_generic_connection_s **con, unsigned int *adrflags, netadr_t *addresses, const char **adrparams, int maxaddresses)
Definition: net_wins.c:8402
ftenet_generic_connection_t * FTENET_ICE_EstablishConnection(ftenet_connections_t *col, const char *address, netadr_t adr)
Definition: net_ice.c:5676
icefuncs_t iceapi
Definition: net_ice.c:3154
void * TLS_GetKnownCertificate(const char *certname, size_t *size)
Definition: net_wins.c:2561
struct dtlscred_s dtlscred_t
icemode_e
Definition: netinc.h:269
@ ICEM_WEBRTC
Definition: netinc.h:272
@ ICEM_RAW
Definition: netinc.h:270
@ ICEM_ICE
Definition: netinc.h:271
void QDECL ICE_AddLCandidateInfo(struct icestate_s *con, netadr_t *adr, int adrno, int type)
Definition: net_ice.c:2815
void * Auth_GetKnownCertificate(const char *certname, size_t *size)
Definition: net_wins.c:2492
void QDECL ICE_AddLCandidateConn(ftenet_connections_t *col, netadr_t *addr, int type)
Definition: net_ice.c:2901
ftecrypto_t * cryptolib[cryptolib_count]
Definition: net_wins.c:229
const dtlsfuncs_t * DTLS_InitServer(void)
Definition: net_wins.c:3155
struct ftenet_connections_s ftenet_connections_t
iceproto_e
Definition: netinc.h:261
@ ICEP_VOICE
Definition: netinc.h:265
@ ICEP_INVALID
Definition: netinc.h:262
@ ICEP_VIDEO
Definition: netinc.h:266
@ ICEP_QWSERVER
Definition: netinc.h:263
@ ICEP_QWCLIENT
Definition: netinc.h:264
struct ftecrypto_s ftecrypto_t
struct epollctx_s epollctx_t
ftenet_connections_t * FTENET_CreateCollection(qboolean listen, void(*ReadPacket)(void))
Definition: net_wins.c:2831
const dtlsfuncs_t * DTLS_InitClient(void)
Definition: net_wins.c:3179
void ICE_Tick(void)
Definition: net_ice.c:2970
icemsgtype_s
Definition: netinc.h:447
@ ICEMSG_SERVERUPDATE
Definition: netinc.h:455
@ ICEMSG_OFFER
Definition: netinc.h:451
@ ICEMSG_GREETING
Definition: netinc.h:449
@ ICEMSG_CANDIDATE
Definition: netinc.h:452
@ ICEMSG_NAMEINUSE
Definition: netinc.h:456
@ ICEMSG_NEWPEER
Definition: netinc.h:450
@ ICEMSG_ACCEPT
Definition: netinc.h:453
@ ICEMSG_PEERLOST
Definition: netinc.h:448
@ ICEMSG_SERVERINFO
Definition: netinc.h:454
hashvalidation_e
Definition: netinc.h:345
@ VH_CORRECT
Definition: netinc.h:349
@ VH_AUTHORITY_UNKNOWN
Definition: netinc.h:347
@ VH_UNSUPPORTED
Definition: netinc.h:346
@ VH_INCORRECT
Definition: netinc.h:348
qboolean FTENET_AddToCollection(struct ftenet_connections_s *col, const char *name, const char *address, netadrtype_t addrtype, netproto_t addrprot)
Definition: net_wins.c:3446
struct dtlsfuncs_s dtlsfuncs_t
vfsfile_t * FS_OpenSSL(const char *hostname, vfsfile_t *source, qboolean server)
Definition: net_wins.c:2608
void FTENET_CloseCollection(ftenet_connections_t *col)
Definition: net_wins.c:3531
char ** data
Definition: p_script.c:63
static SpeexBits spx_int16_t * out
Definition: snd_dma.c:492
OggVorbis_File * vf
Definition: snd_ov.c:46
size_t ai_addrlen
Definition: netinc.h:99
struct sockaddr * ai_addr
Definition: netinc.h:101
char * ai_canonname
Definition: netinc.h:100
int ai_socktype
Definition: netinc.h:97
int ai_protocol
Definition: netinc.h:98
struct addrinfo * ai_next
Definition: netinc.h:102
int ai_flags
Definition: netinc.h:95
int ai_family
Definition: netinc.h:96
void * cert
Definition: netinc.h:356
void * key
Definition: netinc.h:358
size_t certsize
Definition: netinc.h:357
size_t keysize
Definition: netinc.h:359
hashfunc_t * hash
Definition: netinc.h:365
const char * name
Definition: netinc.h:363
qbyte digest[DIGEST_MAXSIZE]
Definition: netinc.h:366
struct dtlscred_s::dtlspeercred_s peer
struct dtlscred_s::dtlslocalcred_s local
int(* GetPeerCertificate)(void *ctx, enum certprops_e prop, char *out, size_t outsize)
Definition: netinc.h:377
neterr_t(* Received)(void *ctx, sizebuf_t *message)
Definition: netinc.h:375
qboolean(* GenTempCertificate)(const char *subject, struct dtlslocalcred_s *cred)
Definition: netinc.h:378
neterr_t(* Transmit)(void *ctx, const qbyte *data, size_t datasize)
Definition: netinc.h:374
void(* DestroyContext)(void *ctx)
Definition: netinc.h:373
qboolean(* CheckConnection)(void *cbctx, void *peeraddr, size_t peeraddrsize, void *indata, size_t insize, neterr_t(*push)(void *cbctx, const qbyte *data, size_t datasize), void(*EstablishTrueContext)(void **cbctx, void *state))
Definition: netinc.h:372
neterr_t(* Timeouts)(void *ctx)
Definition: netinc.h:376
void(* Polled)(struct epollctx_s *ctx, unsigned int events)
Definition: netinc.h:303
int(* GenerateSignature)(const qbyte *hashdata, size_t hashsize, qbyte *signdata, size_t signsizemax)
Definition: netinc.h:398
enum hashvalidation_e(* VerifyHash)(const qbyte *hashdata, size_t hashsize, const qbyte *certdata, size_t certsize, const qbyte *signdata, size_t signsize)
Definition: netinc.h:397
const char * drivername
Definition: netinc.h:386
int(* GetChannelBinding)(vfsfile_t *vf, qbyte *binddata, size_t *bindsize)
Definition: netinc.h:390
qbyte data[1]
Definition: netinc.h:434
struct ftenet_delayed_packet_s * next
Definition: netinc.h:431
unsigned int sendtime
Definition: netinc.h:430
netadr_t dest
Definition: netinc.h:432
size_t cursize
Definition: netinc.h:433
float bytesinrate
Definition: netinc.h:417
unsigned int srflx_tid[3]
Definition: netinc.h:438
netadr_t srflx[2]
Definition: netinc.h:437
void(* ReadGamePacket)(void)
Definition: netinc.h:421
float packetsoutrate
Definition: netinc.h:416
unsigned int bytesout
Definition: netinc.h:413
qboolean islisten
Definition: netinc.h:409
unsigned int packetsout
Definition: netinc.h:411
struct dtlspeer_s * dtls
Definition: netinc.h:424
unsigned int packetsin
Definition: netinc.h:410
unsigned int timemark
Definition: netinc.h:414
float bytesoutrate
Definition: netinc.h:418
float packetsinrate
Definition: netinc.h:415
ftenet_generic_connection_t * conn[MAX_CONNECTIONS]
Definition: netinc.h:419
struct ftenet_connections_s::ftenet_delayed_packet_s * delayed_packets
const dtlsfuncs_t * dtlsfuncs
Definition: netinc.h:425
unsigned int bytesin
Definition: netinc.h:412
void(* Close)(struct ftenet_generic_connection_s *con)
Definition: netinc.h:320
void(* PrintStatus)(struct ftenet_generic_connection_s *con)
Definition: netinc.h:324
epollctx_t epoll
Definition: netinc.h:334
qboolean islisten
Definition: netinc.h:328
int(* GetLocalAddresses)(struct ftenet_generic_connection_s *con, unsigned int *adrflags, netadr_t *addresses, const char **adrparams, int maxaddresses)
Definition: netinc.h:316
int thesocket
Definition: netinc.h:340
neterr_t(* SendPacket)(struct ftenet_generic_connection_s *con, int length, const void *data, netadr_t *to)
Definition: netinc.h:319
qboolean(* ChangeLocalAddress)(struct ftenet_generic_connection_s *con, const char *addressstring, netadr_t *newadr)
Definition: netinc.h:317
int(* SetFDSets)(struct ftenet_generic_connection_s *con, fd_set *readfdset, fd_set *writefdset)
Definition: netinc.h:322
SOCKET thesocket
Definition: netinc.h:338
struct ftenet_connections_s * owner
Definition: netinc.h:331
qboolean(* GetPacket)(struct ftenet_generic_connection_s *con)
Definition: netinc.h:318
netadrtype_t addrtype[FTENET_ADDRTYPES]
Definition: netinc.h:327
int connum
Definition: netinc.h:330
netproto_t prot
Definition: netinc.h:326
char reladdr[64]
Definition: netinc.h:255
char candidateid[64]
Definition: netinc.h:241
enum icecandinfo_s::@198 type
int network
Definition: netinc.h:258
int foundation
Definition: netinc.h:245
int relport
Definition: netinc.h:256
@ ICE_SRFLX
Definition: netinc.h:251
@ ICE_HOST
Definition: netinc.h:250
@ ICE_PRFLX
Definition: netinc.h:252
@ ICE_RELAY
Definition: netinc.h:253
int component
Definition: netinc.h:246
char addr[64]
Definition: netinc.h:242
int generation
Definition: netinc.h:257
int priority
Definition: netinc.h:247
int transport
Definition: netinc.h:244
int port
Definition: netinc.h:243
qboolean force
Definition: netinc.h:291
struct icecandinfo_s * cand
Definition: netinc.h:290
qboolean(QDECL *Get)(struct icestate_s *con
struct icecandinfo_s *QDECL * GetLCandidateInfo(struct icestate_s *con)
void(QDECL *CloseModule)(void *module)
char * out
Definition: netinc.h:293
const char * prop
Definition: netinc.h:287
struct icestate_s *QDECL * Create(void *module, const char *conname, const char *peername, enum icemode_e mode, enum iceproto_e proto, qboolean initiator)
struct icestate_s *QDECL * Find(void *module, const char *conname)
u_char s6_addr[16]
Definition: netinc.h:78
u_long Level
Definition: netinc.h:69
u_long Value
Definition: netinc.h:71
u_long Zone
Definition: netinc.h:68
struct in6_addr sin6_addr
Definition: netinc.h:86
struct ip6_scope_id sin6_scope_struct
Definition: netinc.h:90
u_short sin6_port
Definition: netinc.h:84
u_long sin6_scope_id
Definition: netinc.h:89
short sin6_family
Definition: netinc.h:83
u_long sin6_flowinfo
Definition: netinc.h:85
char url[64]
Definition: netinc.h:32
short sws_family
Definition: netinc.h:31
static unsigned char * to
Definition: sv_sql.c:31
void * vfsfile_t
Definition: sys_plugfte.h:2