X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=netconn.h;h=69b0de518946ea361668d41b48234a536ff8e726;hb=fec24b7a98657412f8403d7edb06bd17f0ff007c;hp=b0eb6da22a3b0d1dd711d361c551416bb005a2bb;hpb=6cdadc176fb4ec59e84b28c80e463fa035fca11b;p=xonotic%2Fdarkplaces.git diff --git a/netconn.h b/netconn.h index b0eb6da2..69b0de51 100755 --- a/netconn.h +++ b/netconn.h @@ -34,6 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define NETFLAG_EOM 0x00080000 #define NETFLAG_UNRELIABLE 0x00100000 #define NETFLAG_CTL 0x80000000 +#define NETFLAG_CRYPTO 0x40000000 #define NET_PROTOCOL_VERSION 3 @@ -219,6 +220,18 @@ typedef struct netconn_s netgraphitem_t outgoing_netgraph[NETGRAPH_PACKETS]; char address[128]; + crypto_t crypto; + + // statistic counters + int packetsSent; + int packetsReSent; + int packetsReceived; + int receivedDuplicateCount; + int droppedDatagrams; + int unreliableMessagesSent; + int unreliableMessagesReceived; + int reliableMessagesSent; + int reliableMessagesReceived; } netconn_t; extern netconn_t *netconn_list; @@ -227,10 +240,7 @@ extern mempool_t *netconn_mempool; extern cvar_t hostname; extern cvar_t developer_networking; -#define SERVERLIST_TOTALSIZE 2048 #define SERVERLIST_VIEWLISTSIZE SERVERLIST_TOTALSIZE -#define SERVERLIST_ANDMASKCOUNT 5 -#define SERVERLIST_ORMASKCOUNT 5 typedef enum serverlist_maskop_e { @@ -390,7 +400,10 @@ extern int masterreplycount; extern int serverquerycount; extern int serverreplycount; -extern sizebuf_t net_message; +extern sizebuf_t cl_message; +extern sizebuf_t sv_message; +extern char cl_readstring[MAX_INPUTLINE]; +extern char sv_readstring[MAX_INPUTLINE]; extern cvar_t sv_public; @@ -441,5 +454,16 @@ void ServerList_QueryList(qboolean resetcache, qboolean querydp, qboolean queryq /// called whenever net_slist_favorites changes void NetConn_UpdateFavorites(void); +#define MAX_CHALLENGES 128 +typedef struct challenge_s +{ + lhnetaddress_t address; + double time; + char string[12]; +} +challenge_t; + +extern challenge_t challenge[MAX_CHALLENGES]; + #endif