FTEQW
Documentation of the FTE engine source tree.
net.h
Go to the documentation of this file.
1/*
2Copyright (C) 1996-1997 Id Software, Inc.
3
4This program is free software; you can redistribute it and/or
5modify it under the terms of the GNU General Public License
6as published by the Free Software Foundation; either version 2
7of the License, or (at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
19*/
20// net.h -- quake's interface to the networking layer
21
22#define PORT_ANY -1
23
24#if defined(FTE_TARGET_WEB)
25#define HAVE_WEBSOCKCL
26#endif
27
28#ifdef __linux__
29//#define UNIXSOCKETS
30#endif
31
32//FIXME: should split this into loopback/dgram/stream/dtls/tls/irc
33//with the ipv4/v6/x as a separate parameter
34typedef enum {
37 /*NA_HYBRID,*/ //ipv6 hybrid socket that might accept ipv4 packets too.
41#ifdef UNIXSOCKETS
43#endif
44#ifdef IRCCONNECT
45 NA_IRC/*remove!*/,
46#endif
47#ifdef HAVE_WEBSOCKCL
49#endif
50#ifdef SUPPORT_ICE
51 NA_ICE
52#endif
54typedef enum {
56 NP_DTLS, //connected via ICE/WebRTC
61 NP_NATPMP, //server-only scheme for registering public ports.
63 NP_RTC_TLS, //really need a better way to do this than two copies of every protocol...
64
67
69
70typedef struct netadr_s
71{
74
75 unsigned short port;
76 unsigned short connum; //which quake connection/socket the address is talking about. 1-based. 0 is unspecified. this is NOT used for address equivelency.
77 unsigned int scopeid; //ipv6 interface id thing.
78
79 union {
83#ifdef IRCCONNECT
84 struct {
85 char host[32];
86 char user[32];
87 char channel[12];
88 } irc;
89#endif
90#ifdef SUPPORT_ICE
91 char icename[16];
92#endif
93#ifdef HAVE_WEBSOCKCL
94 char websocketurl[64];
95#endif
96#ifdef UNIXSOCKETS
97 struct
98 {
99 int len; //abstract addresses contain nulls, so this is needed.
100 char path[108];
101 } un;
102#endif
105
107{
109 unsigned char dontusesa_pad[6];
110 qint64_t sa_align;
111 unsigned char sa_pad2[112];
112};
113
114
116extern netadr_t net_from; // address of who sent the packet
119//#define MAX_UDP_PACKET (MAX_MSGLEN*2) // one more than msg + header
120#define MAX_UDP_PACKET 8192 // one more than msg + header
121extern FTE_ALIGN(4) qbyte net_message_buffer[MAX_OVERALLMSGLEN];
122
123typedef enum
124{
125 NETERR_SENT = 0, //all is well
126 NETERR_NOROUTE = 1, //destination isn't valid for this socket/etc. try a different one if possible
127 NETERR_DISCONNECTED = 2, //socket can no longer send anything
128 NETERR_MTU = 3, //packet wasn't sent due to MTU
129 NETERR_CLOGGED = 4 //socket is suffering from conjestion
131
132extern cvar_t hostname;
133
134int TCP_OpenStream (netadr_t *remoteaddr, const char *remotename); //makes things easier. remotename is printable-only
135
137void NET_Init (void);
138void NET_Tick (void);
139void SVNET_RegisterCvars(void);
140void NET_InitClient (qboolean loopbackonly);
141void NET_CloseClient(void);
142void NET_InitServer (void);
144void NET_CloseServer (void);
145void UDP_CloseSocket (int socket);
146void NET_Shutdown (void);
147qboolean NET_GetRates(struct ftenet_connections_s *collection, float *pi, float *po, float *bi, float *bo);
148qboolean NET_UpdateRates(struct ftenet_connections_s *collection, qboolean inbound, size_t size); //for demos to not be weird
149void NET_ReadPackets (struct ftenet_connections_s *collection);
151int NET_LocalAddressForRemote(struct ftenet_connections_s *collection, netadr_t *remote, netadr_t *local, int idx);
152void NET_PrintAddresses(struct ftenet_connections_s *collection);
154struct dtlspeercred_s;
155qboolean NET_EnsureRoute(struct ftenet_connections_s *collection, char *routename, const struct dtlspeercred_s *peerinfo, netadr_t *adr, qboolean outgoing);
156void NET_TerminateRoute(struct ftenet_connections_s *collection, netadr_t *adr);
157void NET_PrintConnectionsStatus(struct ftenet_connections_s *collection);
158
160{
161 ASCOPE_PROCESS=0, //unusable
162 ASCOPE_HOST=1, //unroutable
163 ASCOPE_LINK=2, //unpredictable
164 ASCOPE_LAN=3, //private
165 ASCOPE_NET=4 //aka hopefully globally routable
167enum addressscope_e NET_ClassifyAddress(netadr_t *adr, const char **outdesc);
168
169qboolean NET_AddrIsReliable(netadr_t *adr); //hints that the protocol is reliable. if so, we don't need to wait for acks
173void NET_AdrToStringResolve (netadr_t *adr, void (*resolved)(void *ctx, void *data, size_t a, size_t b), void *ctx, size_t a, size_t b);
174char *NET_AdrToString (char *s, int len, netadr_t *a);
175char *NET_SockadrToString (char *s, int len, struct sockaddr_qstorage *a, size_t sizeofa);
176char *NET_BaseAdrToString (char *s, int len, netadr_t *a);
177size_t NET_StringToSockaddr2 (const char *s, int defaultport, netadrtype_t afhint, struct sockaddr_qstorage *sadr, int *addrfamily, int *addrsize, size_t addrcount);
178qboolean NET_StringToAdr_NoDNS(const char *address, int port, netadr_t *out);
179#define NET_StringToSockaddr(s,p,a,f,z) (NET_StringToSockaddr2(s,p,NA_INVALID,a,f,z,1)>0)
180size_t NET_StringToAdr2 (const char *s, int defaultport, netadr_t *a, size_t addrcount, const char **pathstart);
181#define NET_StringToAdr(s,p,a) NET_StringToAdr2(s,p,a,1,NULL)
182qboolean NET_PortToAdr (netadrtype_t adrfamily, netproto_t adrprot, const char *s, netadr_t *a);
184
186
187qboolean NET_StringToAdrMasked (const char *s, qboolean allowdns, netadr_t *a, netadr_t *amask);
188char *NET_AdrToStringMasked (char *s, int len, netadr_t *a, netadr_t *amask);
189void NET_IntegerToMask (netadr_t *a, netadr_t *amask, int bits);
191
192qboolean FTENET_AddToCollection(struct ftenet_connections_s *col, const char *name, const char *address, netadrtype_t addrtype, netproto_t addrprot);
193
195{
196 QCERT_ISENCRYPTED, //0 or error
197 QCERT_PEERSUBJECT, //null terminated. should be a hash of the primary cert, ignoring chain.
198 QCERT_PEERCERTIFICATE, //should be the primary cert, ignoring chain. no fixed maximum size required, mostly 2k but probably best to allow at leasy 5k.. or 8k.
199
200 QCERT_LOCALCERTIFICATE, //the cert we're using/advertising. may have no context. to tell people what fp to expect.
201};
202int NET_GetConnectionCertificate(struct ftenet_connections_s *col, netadr_t *a, enum certprops_e prop, char *out, size_t outsize);
203
204#ifdef HAVE_DTLS
205struct dtlscred_s;
206struct dtlsfuncs_s;
212#endif
213#ifdef SUPPORT_ICE
214neterr_t ICE_SendPacket(size_t length, const void *data, netadr_t *to);
215void ICE_Terminate(netadr_t *to); //if we kicked the client/etc, kill their ICE too.
216int ICE_GetPeerCertificate(netadr_t *to, enum certprops_e prop, char *out, size_t outsize);
217void ICE_Init(void);
218#endif
219extern cvar_t timeout;
220extern cvar_t tls_ignorecertificateerrors; //evil evil evil.
221struct ftecrypto_s;
222qboolean NET_RegisterCrypto(void *module, struct ftecrypto_s *driver);
223
224//============================================================================
225
226#define OLD_AVG 0.99 // total = oldtotal*OLD_AVG + new*(1-OLD_AVG)
227
228#define MAX_LATENT 32
229#define MAX_ADR_SIZE 64
230
231typedef struct
232{
234
235#ifdef NQPROT
237 qboolean nqreliable_allowed; //says the peer has acked the last reliable (or timed out and needs resending).
238 float nqreliable_resendtime;//force nqreliable_allowed, thereby forcing a resend of anything n
239 qbyte nqunreliableonly; //nq can't cope with certain reliables some times. if 2, we have a reliable that result in a block (that should be sent). if 1, we are blocking. if 0, we can send reliables freely. if 3, then we just want to ignore clc_moves
240#endif
241 qboolean pext_fragmentation; //fte's packet fragmentation extension, to avoid issues with low mtus.
242 qboolean pext_stunaware; //prevent the two lead-bits of packets from being either 0(stun), so stray stun packets cannot mess things up for us.
243 struct netprim_s netprim;
244 int mtu; //the path mtu, if known
245 int dupe; //how many times to dupe packets
246
247 float last_received; // for timeouts
248
249// the statistics are cleared at each client begin, because
250// the server connecting process gives a bogus picture of the data
251 float frame_latency; // rolling average
253
254 int drop_count; // dropped packets, cleared each level
255 int good_count; // cleared each level
256
259
262 int qport;
264
265// bandwidth estimator
266 double cleartime; // if realtime > nc->cleartime, free to go
267// double rate; // seconds / qbyte
268
269// sequencing variables
270 int incoming_unreliable; //dictated by the other end.
274
275 int incoming_reliable_sequence; // single bit, maintained local
276
279 int reliable_sequence; // single bit
280 int last_reliable_sequence; // sequence number of last send
281
282// reliable staging and holding areas
283 sizebuf_t message; // writing buffer to send to server
284 qbyte message_buf[MAX_OVERALLMSGLEN];
285
286 //nq has message truncation.
289 qbyte reliable_buf[MAX_OVERALLMSGLEN]; // unacked reliable message
290
291// time and size data to calculate bandwidth
292 int outgoing_size[MAX_LATENT];
293 double outgoing_time[MAX_LATENT];
294 struct huffman_s *compresstable;
295
296 //nq servers must recieve truncated packets.
298 char in_fragment_buf[MAX_OVERALLMSGLEN];
300} netchan_t;
301
302extern int net_drop; // packets dropped before this one
303
304void Net_Master_Init(void);
305
306void Netchan_Init (void);
307int Netchan_Transmit (netchan_t *chan, int length, qbyte *data, int rate);
308void Netchan_OutOfBand (netsrc_t sock, netadr_t *adr, int length, const qbyte *data);
309void VARGS Netchan_OutOfBandPrint (netsrc_t sock, netadr_t *adr, char *format, ...) LIKEPRINTF(3);
312void Netchan_Setup (netsrc_t sock, netchan_t *chan, netadr_t *adr, int qport);
313unsigned int Net_PextMask(unsigned int protover, qboolean fornq);
314extern cvar_t net_mtu;
315
317void Netchan_Block (netchan_t *chan, int bytes, int rate);
319#ifdef NQPROT
321{
326};
328#endif
329
330#ifdef HUFFNETWORK
331#define HUFFCRC_QUAKE3 0x286f2e8d
332
333typedef struct huffman_s huffman_t;
340int Huff_GetByte(qbyte *buffer, int *count);
341void Huff_EmitByte(int ch, qbyte *buffer, int *count);
342#endif
343
344#ifdef NQPROT
345//taken from nq's net.h
346//refer to that for usage info. :)
347
348#define NETFLAG_LENGTH_MASK 0x0000ffff
349#define NETFLAG_DATA 0x00010000
350#define NETFLAG_ACK 0x00020000
351#define NETFLAG_NAK 0x00040000
352#define NETFLAG_EOM 0x00080000
353#define NETFLAG_UNRELIABLE 0x00100000
354#define NETFLAG_ZLIB 0x00200000 //QEx - payload contains the real (full) packet
355#define NETFLAG_CTL 0x80000000
356
357#define NQ_NETCHAN_GAMENAME "QUAKE"
358#define NQ_NETCHAN_VERSION 3
359#define NQ_NETCHAN_VERSION_QEX 4 //the rerelease's id, used for nqish-over dtls.
360
361
362#define CCREQ_CONNECT 0x01
363#define CCREQ_SERVER_INFO 0x02
364#define CCREQ_PLAYER_INFO 0x03
365#define CCREQ_RULE_INFO 0x04
366#define CCREQ_PROQUAKE_RCON 0x05
367
368#define CCREP_ACCEPT 0x81
369#define CCREP_REJECT 0x82
370#define CCREP_SERVER_INFO 0x83
371#define CCREP_PLAYER_INFO 0x84
372#define CCREP_RULE_INFO 0x85
373
374//server->client protocol info
375#define PROTOCOL_VERSION_NQ 15
376#define PROTOCOL_VERSION_H2 19
377#define PROTOCOL_VERSION_NEHD 250
378#define PROTOCOL_VERSION_FITZ 666
379#define PROTOCOL_VERSION_RMQ 999
380#define PROTOCOL_VERSION_DP5 3502
381#define PROTOCOL_VERSION_DP6 3503
382#define PROTOCOL_VERSION_DP7 3504
383#define PROTOCOL_VERSION_BJP1 10000
384#define PROTOCOL_VERSION_BJP2 10001
385#define PROTOCOL_VERSION_BJP3 10002
386
387#define MOD_PROQUAKE 1
388//#define MOD_PROQUAKE_VERSION (10*3.1) //password feature added
389//#define MOD_PROQUAKE_VERSION (10*3.2) //first 'cheatfree'
390#define MOD_PROQUAKE_VERSION (10*3.3) //no real changes, but w/e, this is the highest we can claim without having serverside issues.
391//#define MOD_PROQUAKE_VERSION (10*3.4) //added nat wait weirdness that's redundant and breaks the whole single-port thing by using two ports on the client too. *sigh*.
392//#define MOD_PROQUAKE_VERSION (10*3.5) //optional cheatfree encryption
393//#define MOD_PROQUAKE_VERSION (10*4.51) //current version
394
395/*RMQ protocol flags*/
396#define RMQFL_SHORTANGLE (1 << 1)
397#define RMQFL_FLOATANGLE (1 << 2)
398#define RMQFL_24BITCOORD (1 << 3)
399#define RMQFL_FLOATCOORD (1 << 4)
400#define RMQFL_EDICTSCALE (1 << 5)
401#define RMQFL_ALPHASANITY (1 << 6)
402#define RMQFL_INT32COORD (1 << 7)
403#define RMQFL_MOREFLAGS (1 << 31)
404
405#endif
406
407int UDP_OpenSocket (int port);
408int UDP6_OpenSocket (int port);
409int IPX_OpenSocket (int port);
411void SockadrToNetadr (struct sockaddr_qstorage *s, int sizeofsockaddr, netadr_t *a);
412qboolean NET_Sleep(float seconds, qboolean stdinissocket);
qboolean
Definition: api_menu.h:34
cvar_t rate
Definition: cl_main.c:156
netadr_t adr[8]
Definition: cl_main.c:288
cvar_t msg
Definition: cl_main.c:159
int qport
Definition: cl_main.c:303
int defaultport
Definition: cl_main.c:320
unsigned char qbyte
Definition: common.h:127
char * text
Definition: decomp.c:375
s
Definition: execloop.h:53
unsigned int col
Definition: gl_ngraph.c:39
GLint GLuint mask
Definition: gl_vidcommon.c:76
static EGLSurface EGLSurface EGLContext ctx
Definition: gl_videgl.c:47
Atom prop
Definition: gl_vidlinuxglx.c:4691
GLsizei count
Definition: glquake.h:149
GLsizei const GLcharARB const GLint * length
Definition: glquake.h:149
GLuint GLcharARB * name
Definition: glquake.h:155
GLint size
Definition: glquake.h:157
GLenum format
Definition: glsupp.h:502
GLenum GLsizei len
Definition: glsupp.h:502
void * module
Definition: image.c:236
unsigned char bits
Definition: image_astc.h:123
char * NET_BaseAdrToString(char *s, int len, netadr_t *a)
Definition: net_wins.c:1054
neterr_t NET_SendPacket(struct ftenet_connections_s *col, int length, const void *data, netadr_t *to)
Definition: net_wins.c:8300
qboolean NET_StringToAdrMasked(const char *s, qboolean allowdns, netadr_t *a, netadr_t *amask)
Definition: net_wins.c:2111
void Net_Master_Init(void)
Definition: net_master.c:3927
void NET_AdrToStringResolve(netadr_t *adr, void(*resolved)(void *ctx, void *data, size_t a, size_t b), void *ctx, size_t a, size_t b)
Definition: net_wins.c:793
int NET_LocalAddressForRemote(struct ftenet_connections_s *collection, netadr_t *remote, netadr_t *local, int idx)
Definition: net_wins.c:8219
neterr_t
Definition: net.h:124
@ NETERR_MTU
Definition: net.h:128
@ NETERR_DISCONNECTED
Definition: net.h:127
@ NETERR_NOROUTE
Definition: net.h:126
@ NETERR_SENT
Definition: net.h:125
@ NETERR_CLOGGED
Definition: net.h:129
netadrtype_t
Definition: net.h:34
@ NA_IP
Definition: net.h:38
@ NA_INVALID
Definition: net.h:35
@ NA_IPX
Definition: net.h:40
@ NA_UNIX
Definition: net.h:42
@ NA_LOOPBACK
Definition: net.h:36
@ NA_IRC
Definition: net.h:45
@ NA_IPV6
Definition: net.h:39
@ NA_ICE
Definition: net.h:51
@ NA_WEBSOCKET
Definition: net.h:48
void ICE_Init(void)
Definition: net_ice.c:5740
certprops_e
Definition: net.h:195
@ QCERT_ISENCRYPTED
Definition: net.h:196
@ QCERT_LOCALCERTIFICATE
Definition: net.h:200
@ QCERT_PEERSUBJECT
Definition: net.h:197
@ QCERT_PEERCERTIFICATE
Definition: net.h:198
void SockadrToNetadr(struct sockaddr_qstorage *s, int sizeofsockaddr, netadr_t *a)
Definition: net_wins.c:359
qboolean NET_EnsureRoute(struct ftenet_connections_s *collection, char *routename, const struct dtlspeercred_s *peerinfo, netadr_t *adr, qboolean outgoing)
Definition: net_wins.c:8335
int NET_GetConnectionCertificate(struct ftenet_connections_s *col, netadr_t *a, enum certprops_e prop, char *out, size_t outsize)
Definition: net_wins.c:3368
qboolean NET_IsLoopBackAddress(netadr_t *adr)
Definition: net_wins.c:2485
qboolean NET_AddressSmellsFunny(netadr_t *a)
Definition: net_wins.c:710
void NET_Init(void)
Definition: net_wins.c:9168
void SVNET_RegisterCvars(void)
Definition: net_wins.c:9404
void NET_Shutdown(void)
Definition: net_wins.c:9537
char * NET_AdrToString(char *s, int len, netadr_t *a)
Definition: net_wins.c:801
qboolean NET_IsClientLegal(netadr_t *adr)
Definition: net_wins.c:2456
char * NET_AdrToStringMasked(char *s, int len, netadr_t *a, netadr_t *amask)
Definition: net_wins.c:2439
void Huff_DecryptPacket(sizebuf_t *msg, int offset)
Definition: huff.c:553
netproto_t
Definition: net.h:54
@ NP_DTLS
Definition: net.h:56
@ NP_STREAM
Definition: net.h:57
@ NP_RTC_TLS
Definition: net.h:63
@ NP_WSS
Definition: net.h:60
@ NP_NATPMP
Definition: net.h:61
@ NP_WS
Definition: net.h:59
@ NP_INVALID
Definition: net.h:65
@ NP_TLS
Definition: net.h:58
@ NP_DGRAM
Definition: net.h:55
@ NP_RTC_TCP
Definition: net.h:62
int net_drop
Definition: net_chan.c:85
cvar_t dtls_psk_hint
Definition: net_wins.c:185
qboolean Netchan_CanPacket(netchan_t *chan, int rate)
Definition: net_chan.c:402
netadr_t net_local_cl_ipadr
Definition: net_wins.c:72
cvar_t dtls_psk_key
Definition: net.h:210
qboolean Netchan_CanReliable(netchan_t *chan, int rate)
Definition: net_chan.c:442
enum nqnc_packettype_e NQNetChan_Process(netchan_t *chan)
Definition: net_chan.c:455
void Huff_CompressPacket(huffman_t *huff, sizebuf_t *msg, int offset)
Definition: huff.c:574
void NET_ReadPackets(struct ftenet_connections_s *collection)
Definition: net_wins.c:8152
qboolean NET_CompareBaseAdr(netadr_t *a, netadr_t *b)
Definition: net_wins.c:592
void VARGS Netchan_OutOfBandPrint(netsrc_t sock, netadr_t *adr, char *format,...) LIKEPRINTF(3)
Definition: net_chan.c:335
int UDP6_OpenSocket(int port)
Definition: net_wins.c:8765
void UDP_CloseSocket(int socket)
Definition: net_wins.c:8758
void ICE_Terminate(netadr_t *to)
Definition: net_ice.c:5061
nqnc_packettype_e
Definition: net.h:321
@ NQNC_UNRELIABLE
Definition: net.h:325
@ NQNC_IGNORED
Definition: net.h:322
@ NQNC_RELIABLE
Definition: net.h:324
@ NQNC_ACK
Definition: net.h:323
int Huff_PreferedCompressionCRC(void)
Definition: huff.c:534
int Huff_GetByte(qbyte *buffer, int *count)
Definition: huff.c:563
void NET_CloseServer(void)
Definition: net_wins.c:9451
void Huff_DecompressPacket(huffman_t *huff, sizebuf_t *msg, int offset)
Definition: huff.c:625
struct netadr_s netadr_t
FTE_ALIGN(4) qbyte net_message_buffer[MAX_OVERALLMSGLEN]
Definition: net_wins.c:81
void NET_InitServer(void)
Definition: net_wins.c:9457
void NET_InitClient(qboolean loopbackonly)
Definition: net_wins.c:9282
qboolean NET_GetRates(struct ftenet_connections_s *collection, float *pi, float *po, float *bi, float *bo)
Definition: net_wins.c:8087
void Netchan_Block(netchan_t *chan, int bytes, int rate)
Definition: net_chan.c:423
void VARGS Netchan_OutOfBandTPrintf(netsrc_t sock, netadr_t *adr, int language, translation_t text,...)
Definition: net_chan.c:348
void Netchan_Init(void)
Definition: net_chan.c:273
void Huff_EncryptPacket(sizebuf_t *msg, int offset)
Definition: huff.c:558
int NetadrToSockadr(netadr_t *a, struct sockaddr_qstorage *s)
Definition: net_wins.c:299
qboolean NET_StringToAdr_NoDNS(const char *address, int port, netadr_t *out)
Definition: net_wins.c:2173
qboolean NET_CompareAdrMasked(netadr_t *a, netadr_t *b, netadr_t *mask)
Definition: net_wins.c:2238
void Netchan_OutOfBand(netsrc_t sock, netadr_t *adr, int length, const qbyte *data)
Definition: net_chan.c:306
void NET_PrintAddresses(struct ftenet_connections_s *collection)
Definition: net_wins.c:8503
void NET_Tick(void)
Definition: net_wins.c:9526
qboolean NET_PortToAdr(netadrtype_t adrfamily, netproto_t adrprot, const char *s, netadr_t *a)
Definition: net_wins.c:4001
qboolean NET_DTLS_Decode(struct ftenet_connections_s *col)
Definition: net_wins.c:3334
void NET_TerminateRoute(struct ftenet_connections_s *collection, netadr_t *adr)
Definition: net_wins.c:8383
qboolean NET_CompareAdr(netadr_t *a, netadr_t *b)
Definition: net_wins.c:461
char * NET_SockadrToString(char *s, int len, struct sockaddr_qstorage *a, size_t sizeofa)
Definition: net_wins.c:437
int ICE_GetPeerCertificate(netadr_t *to, enum certprops_e prop, char *out, size_t outsize)
Definition: net_ice.c:5044
cvar_t timeout
qboolean Netchan_Process(netchan_t *chan)
Definition: net_chan.c:995
struct ftenet_generic_connection_s * net_from_connection
Definition: net_wins.c:74
qboolean NET_DTLS_Disconnect(struct ftenet_connections_s *col, netadr_t *to)
Definition: net_wins.c:3309
addressscope_e
Definition: net.h:160
@ ASCOPE_LINK
Definition: net.h:163
@ ASCOPE_HOST
Definition: net.h:162
@ ASCOPE_NET
Definition: net.h:165
@ ASCOPE_PROCESS
Definition: net.h:161
@ ASCOPE_LAN
Definition: net.h:164
struct huffman_s huffman_t
Definition: net.h:333
void NET_PrintConnectionsStatus(struct ftenet_connections_s *collection)
Definition: net_wins.c:8592
void Huff_EmitByte(int ch, qbyte *buffer, int *count)
Definition: huff.c:569
neterr_t ICE_SendPacket(size_t length, const void *data, netadr_t *to)
Definition: net_ice.c:5073
cvar_t tls_ignorecertificateerrors
qboolean NET_RegisterCrypto(void *module, struct ftecrypto_s *driver)
Definition: net_wins.c:269
qboolean NET_UpdateRates(struct ftenet_connections_s *collection, qboolean inbound, size_t size)
Definition: net_wins.c:8117
int UDP_OpenSocket(int port)
Definition: net_wins.c:8714
cvar_t dtls_psk_user
Definition: net.h:210
void Netchan_Setup(netsrc_t sock, netchan_t *chan, netadr_t *adr, int qport)
Definition: net_chan.c:372
size_t NET_StringToSockaddr2(const char *s, int defaultport, netadrtype_t afhint, struct sockaddr_qstorage *sadr, int *addrfamily, int *addrsize, size_t addrcount)
Definition: net_wins.c:1207
void NET_IntegerToMask(netadr_t *a, netadr_t *amask, int bits)
Definition: net_wins.c:1881
netadr_t net_from
Definition: net_wins.c:75
qboolean NET_WasSpecialPacket(struct ftenet_connections_s *col)
Definition: net_wins.c:9137
huffman_t * Huff_CompressionCRC(int crc)
Definition: huff.c:540
cvar_t net_mtu
Definition: net_chan.c:92
cvar_t hostname
Definition: sv_main.c:204
netsrc_t
Definition: net.h:68
@ NS_CLIENT
Definition: net.h:68
@ NS_SERVER
Definition: net.h:68
enum addressscope_e NET_ClassifyAddress(netadr_t *adr, const char **outdesc)
Definition: net_wins.c:8458
qboolean NET_DTLS_Create(struct ftenet_connections_s *col, netadr_t *to, const struct dtlscred_s *cred, qboolean outgoing)
size_t NET_StringToAdr2(const char *s, int defaultport, netadr_t *a, size_t addrcount, const char **pathstart)
Definition: net_wins.c:1573
qboolean NET_Sleep(float seconds, qboolean stdinissocket)
Definition: net_wins.c:8935
qboolean NET_IsEncrypted(netadr_t *adr)
Definition: net_wins.c:2216
qboolean NET_AddrIsReliable(netadr_t *adr)
Definition: net_wins.c:444
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
int TCP_OpenStream(netadr_t *remoteaddr, const char *remotename)
Definition: net_wins.c:8627
int IPX_OpenSocket(int port)
Definition: net_wins.c:8836
unsigned int Net_PextMask(unsigned int protover, qboolean fornq)
Definition: net_chan.c:111
int Netchan_Transmit(netchan_t *chan, int length, qbyte *data, int rate)
Definition: net_chan.c:642
sizebuf_t net_message
Definition: net_wins.c:76
void NET_CloseClient(void)
Definition: net_wins.c:9277
cvar_t net_enable_dtls
Definition: net_wins.c:184
char ** data
Definition: p_script.c:63
int b
Definition: pr_lua.c:242
int idx
Definition: pr_lua.c:221
vec3_t offset
Definition: q2m_flash.c:28
static ALC_API ALCvoid * buffer
Definition: snd_al.c:259
static SpeexBits spx_int16_t * out
Definition: snd_dma.c:492
static char * bytes
Definition: snd_dma.c:479
Definition: cvar.h:59
Definition: netinc.h:353
Definition: netinc.h:370
Definition: netinc.h:385
Definition: netinc.h:408
Definition: netinc.h:313
Definition: net.h:71
int len
Definition: net.h:99
struct netadr_s::@181::@182 irc
char icename[16]
Definition: net.h:91
unsigned short port
Definition: net.h:75
qbyte ipx[10]
Definition: net.h:82
union netadr_s::@181 address
char host[32]
Definition: net.h:85
unsigned short connum
Definition: net.h:76
char path[108]
Definition: net.h:100
netproto_t prot
Definition: net.h:73
netadrtype_t type
Definition: net.h:72
char channel[12]
Definition: net.h:87
unsigned int scopeid
Definition: net.h:77
qbyte ip[4]
Definition: net.h:80
qbyte ip6[16]
Definition: net.h:81
char user[32]
Definition: net.h:86
struct netadr_s::@181::@183 un
char websocketurl[64]
Definition: net.h:94
Definition: net.h:232
qbyte nqunreliableonly
Definition: net.h:239
int incoming_reliable_sequence
Definition: net.h:275
int qportsize
Definition: net.h:263
netadr_t remote_address
Definition: net.h:260
int incoming_unreliable
Definition: net.h:270
int isnqprotocol
Definition: net.h:236
int reliable_length
Definition: net.h:287
int dupe
Definition: net.h:245
int bytesin
Definition: net.h:257
int in_fragment_length
Definition: net.h:297
qboolean nqreliable_allowed
Definition: net.h:237
qboolean pext_fragmentation
Definition: net.h:241
int reliable_sequence
Definition: net.h:279
int reliable_start
Definition: net.h:288
int in_fragment_start
Definition: net.h:299
double cleartime
Definition: net.h:266
int incoming_reliable_acknowledged
Definition: net.h:273
float nqreliable_resendtime
Definition: net.h:238
int qport
Definition: net.h:262
int last_reliable_sequence
Definition: net.h:280
float frame_latency
Definition: net.h:251
int outgoing_sequence
Definition: net.h:278
float frame_rate
Definition: net.h:252
struct huffman_s * compresstable
Definition: net.h:294
int incoming_acknowledged
Definition: net.h:272
int drop_count
Definition: net.h:254
int mtu
Definition: net.h:244
int bytesout
Definition: net.h:258
int outgoing_unreliable
Definition: net.h:277
sizebuf_t message
Definition: net.h:283
int good_count
Definition: net.h:255
int incoming_sequence
Definition: net.h:271
float last_received
Definition: net.h:247
qboolean fatal_error
Definition: net.h:233
qboolean pext_stunaware
Definition: net.h:242
netsrc_t sock
Definition: net.h:261
Definition: common.h:171
Definition: common.h:196
Definition: net.h:107
qint64_t sa_align
Definition: net.h:110
unsigned char dontusesa_pad[6]
Definition: net.h:109
unsigned char sa_pad2[112]
Definition: net.h:111
short dontusesa_family
Definition: net.h:108
netadr_t a
Definition: sv_master.c:141
static unsigned char * to
Definition: sv_sql.c:31
cvar_t language
Definition: translate.c:24
const char * translation_t
Definition: translate.h:3