#include "ringbuffer.h"
#include "stun.h"
#include <base/math.h>
#include <base/system.h>
Go to the source code of this file.
|
enum | {
NETFLAG_ALLOWSTATELESS = 1
, NETSENDFLAG_VITAL = 1
, NETSENDFLAG_CONNLESS = 2
, NETSENDFLAG_FLUSH = 4
,
NETSENDFLAG_EXTENDED = 8
, NETSTATE_OFFLINE = 0
, NETSTATE_CONNECTING
, NETSTATE_ONLINE
,
NETBANTYPE_SOFT = 1
, NETBANTYPE_DROP = 2
} |
|
enum | {
NET_VERSION = 2
, NET_MAX_PACKETSIZE = 1400
, NET_MAX_PAYLOAD = NET_MAX_PACKETSIZE - 6
, NET_MAX_CHUNKHEADERSIZE = 3
,
NET_PACKETHEADERSIZE = 3
, NET_MAX_CLIENTS = 64
, NET_MAX_CONSOLE_CLIENTS = 4
, NET_MAX_SEQUENCE = 1 << 10
,
NET_SEQUENCE_MASK = NET_MAX_SEQUENCE - 1
, NET_CONNSTATE_OFFLINE = 0
, NET_CONNSTATE_TOKEN = 1
, NET_CONNSTATE_CONNECT = 2
,
NET_CONNSTATE_PENDING = 3
, NET_CONNSTATE_ONLINE = 4
, NET_CONNSTATE_ERROR = 5
, NET_PACKETFLAG_UNUSED = 1 << 0
,
NET_PACKETFLAG_TOKEN = 1 << 1
, NET_PACKETFLAG_CONTROL = 1 << 2
, NET_PACKETFLAG_CONNLESS = 1 << 3
, NET_PACKETFLAG_RESEND = 1 << 4
,
NET_PACKETFLAG_COMPRESSION = 1 << 5
, NET_PACKETFLAG_EXTENDED = 1 << 6
, NET_CHUNKFLAG_VITAL = 1
, NET_CHUNKFLAG_RESEND = 2
,
NET_CTRLMSG_KEEPALIVE = 0
, NET_CTRLMSG_CONNECT = 1
, NET_CTRLMSG_CONNECTACCEPT = 2
, NET_CTRLMSG_ACCEPT = 3
,
NET_CTRLMSG_CLOSE = 4
, NET_CTRLMSG_TOKEN = 5
, NET_CONN_BUFFERSIZE = 1024 * 32
, NET_CONNLIMIT_IPS = 16
,
NET_ENUM_TERMINATOR
} |
|
enum | { NET_TOKEN_MAX = 0xffffffff
, NET_TOKEN_NONE = NET_TOKEN_MAX
, NET_TOKEN_MASK = NET_TOKEN_MAX
, NET_TOKENREQUEST_DATASIZE = 512
} |
|
enum | { NET_SECURITY_TOKEN_UNKNOWN = -1
, NET_SECURITY_TOKEN_UNSUPPORTED = 0
} |
|
enum class | CONNECTIVITY {
UNKNOWN
, CHECKING
, UNREACHABLE
, REACHABLE
,
ADDRESS_KNOWN
} |
|
◆ NETFUNC_CLIENTREJOIN
typedef int(* NETFUNC_CLIENTREJOIN) (int ClientId, void *pUser) |
◆ NETFUNC_DELCLIENT
typedef int(* NETFUNC_DELCLIENT) (int ClientId, const char *pReason, void *pUser) |
◆ NETFUNC_NEWCLIENT
typedef int(* NETFUNC_NEWCLIENT) (int ClientId, void *pUser, bool Sixup) |
◆ NETFUNC_NEWCLIENT_CON
typedef int(* NETFUNC_NEWCLIENT_CON) (int ClientId, void *pUser) |
◆ NETFUNC_NEWCLIENT_NOAUTH
typedef int(* NETFUNC_NEWCLIENT_NOAUTH) (int ClientId, void *pUser) |
◆ SECURITY_TOKEN
◆ TOKEN
typedef unsigned int TOKEN |
◆ anonymous enum
Enumerator |
---|
NETFLAG_ALLOWSTATELESS | |
NETSENDFLAG_VITAL | |
NETSENDFLAG_CONNLESS | |
NETSENDFLAG_FLUSH | |
NETSENDFLAG_EXTENDED | |
NETSTATE_OFFLINE | |
NETSTATE_CONNECTING | |
NETSTATE_ONLINE | |
NETBANTYPE_SOFT | |
NETBANTYPE_DROP | |
◆ anonymous enum
Enumerator |
---|
NET_VERSION | |
NET_MAX_PACKETSIZE | |
NET_MAX_PAYLOAD | |
NET_MAX_CHUNKHEADERSIZE | |
NET_PACKETHEADERSIZE | |
NET_MAX_CLIENTS | |
NET_MAX_CONSOLE_CLIENTS | |
NET_MAX_SEQUENCE | |
NET_SEQUENCE_MASK | |
NET_CONNSTATE_OFFLINE | |
NET_CONNSTATE_TOKEN | |
NET_CONNSTATE_CONNECT | |
NET_CONNSTATE_PENDING | |
NET_CONNSTATE_ONLINE | |
NET_CONNSTATE_ERROR | |
NET_PACKETFLAG_UNUSED | |
NET_PACKETFLAG_TOKEN | |
NET_PACKETFLAG_CONTROL | |
NET_PACKETFLAG_CONNLESS | |
NET_PACKETFLAG_RESEND | |
NET_PACKETFLAG_COMPRESSION | |
NET_PACKETFLAG_EXTENDED | |
NET_CHUNKFLAG_VITAL | |
NET_CHUNKFLAG_RESEND | |
NET_CTRLMSG_KEEPALIVE | |
NET_CTRLMSG_CONNECT | |
NET_CTRLMSG_CONNECTACCEPT | |
NET_CTRLMSG_ACCEPT | |
NET_CTRLMSG_CLOSE | |
NET_CTRLMSG_TOKEN | |
NET_CONN_BUFFERSIZE | |
NET_CONNLIMIT_IPS | |
NET_ENUM_TERMINATOR | |
◆ anonymous enum
Enumerator |
---|
NET_TOKEN_MAX | |
NET_TOKEN_NONE | |
NET_TOKEN_MASK | |
NET_TOKENREQUEST_DATASIZE | |
◆ anonymous enum
Enumerator |
---|
NET_SECURITY_TOKEN_UNKNOWN | |
NET_SECURITY_TOKEN_UNSUPPORTED | |
◆ CONNECTIVITY
Enumerator |
---|
UNKNOWN | |
CHECKING | |
UNREACHABLE | |
REACHABLE | |
ADDRESS_KNOWN | |
◆ ToSecurityToken()
◆ WriteSecurityToken()
void WriteSecurityToken |
( |
unsigned char * |
pData, |
|
|
SECURITY_TOKEN |
Token |
|
) |
| |
◆ SECURITY_TOKEN_MAGIC
const unsigned char SECURITY_TOKEN_MAGIC[4] |
|
extern |