doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Functions | Variables
win_net.cpp File Reference
#include "../../idlib/precompiled.h"
#include <iptypes.h>
#include <iphlpapi.h>
#include "win_local.h"

Go to the source code of this file.

Classes

struct  net_interface
 
struct  udpMsg_s
 
class  idUDPLag
 

Macros

#define MAX_INTERFACES   32
 
#define MAX_UDP_MSG_SIZE   1400
 

Typedefs

typedef struct udpMsg_s udpMsg_t
 

Functions

char * NET_ErrorString (void)
 
void Net_NetadrToSockadr (const netadr_t *a, struct sockaddr *s)
 
void Net_SockadrToNetadr (struct sockaddr *s, netadr_t *a)
 
int NET_IPSocket (const char *net_interface, int port, netadr_t *bound_to)
 
void NET_OpenSocks (int port)
 
bool Net_WaitForUDPPacket (int netSocket, int timeout)
 
bool Net_GetUDPPacket (int netSocket, netadr_t &net_from, char *data, int &size, int maxSize)
 
void Net_SendUDPPacket (int netSocket, int length, const void *data, const netadr_t to)
 
void Sys_InitNetworking (void)
 
void Sys_ShutdownNetworking (void)
 
bool Sys_StringToNetAdr (const char *s, netadr_t *a, bool doDNSResolve)
 
const char * Sys_NetAdrToString (const netadr_t a)
 
bool Sys_IsLANAddress (const netadr_t adr)
 
bool Sys_CompareNetAdrBase (const netadr_t a, const netadr_t b)
 

Variables

idCVar net_ip ("net_ip","localhost", CVAR_SYSTEM,"local IP address")
 
idCVar net_port ("net_port","0", CVAR_SYSTEM|CVAR_INTEGER,"local IP port number")
 
idCVar net_forceLatency ("net_forceLatency","0", CVAR_SYSTEM|CVAR_INTEGER,"milliseconds latency")
 
idCVar net_forceDrop ("net_forceDrop","0", CVAR_SYSTEM|CVAR_INTEGER,"percentage packet loss")
 
idCVar net_socksEnabled ("net_socksEnabled","0", CVAR_SYSTEM|CVAR_ARCHIVE|CVAR_BOOL,"")
 
idCVar net_socksServer ("net_socksServer","", CVAR_SYSTEM|CVAR_ARCHIVE,"")
 
idCVar net_socksPort ("net_socksPort","1080", CVAR_SYSTEM|CVAR_ARCHIVE|CVAR_INTEGER,"")
 
idCVar net_socksUsername ("net_socksUsername","", CVAR_SYSTEM|CVAR_ARCHIVE,"")
 
idCVar net_socksPassword ("net_socksPassword","", CVAR_SYSTEM|CVAR_ARCHIVE,"")
 
int num_interfaces = 0
 
net_interface netint [MAX_INTERFACES]
 
idUDPLagudpPorts [65536]
 

Macro Definition Documentation

#define MAX_INTERFACES   32

Definition at line 63 of file win_net.cpp.

#define MAX_UDP_MSG_SIZE   1400

Definition at line 837 of file win_net.cpp.

Typedef Documentation

typedef struct udpMsg_s udpMsg_t

Function Documentation

char* NET_ErrorString ( void  )

Definition at line 75 of file win_net.cpp.

bool Net_GetUDPPacket ( int  netSocket,
netadr_t net_from,
char *  data,
int size,
int  maxSize 
)

Definition at line 529 of file win_net.cpp.

int NET_IPSocket ( const char *  net_interface,
int  port,
netadr_t bound_to 
)

Definition at line 243 of file win_net.cpp.

void Net_NetadrToSockadr ( const netadr_t a,
struct sockaddr *  s 
)

Definition at line 133 of file win_net.cpp.

void NET_OpenSocks ( int  port)

Definition at line 314 of file win_net.cpp.

void Net_SendUDPPacket ( int  netSocket,
int  length,
const void data,
const netadr_t  to 
)

Definition at line 589 of file win_net.cpp.

void Net_SockadrToNetadr ( struct sockaddr *  s,
netadr_t a 
)

Definition at line 154 of file win_net.cpp.

bool Net_WaitForUDPPacket ( int  netSocket,
int  timeout 
)

Definition at line 490 of file win_net.cpp.

bool Sys_CompareNetAdrBase ( const netadr_t  a,
const netadr_t  b 
)

Definition at line 814 of file win_net.cpp.

void Sys_InitNetworking ( void  )

Definition at line 635 of file win_net.cpp.

bool Sys_IsLANAddress ( const netadr_t  adr)

Definition at line 778 of file win_net.cpp.

const char* Sys_NetAdrToString ( const netadr_t  a)

Definition at line 753 of file win_net.cpp.

void Sys_ShutdownNetworking ( void  )

Definition at line 724 of file win_net.cpp.

bool Sys_StringToNetAdr ( const char *  s,
netadr_t a,
bool  doDNSResolve 
)

Definition at line 737 of file win_net.cpp.

Variable Documentation

idCVar net_forceDrop("net_forceDrop","0", CVAR_SYSTEM|CVAR_INTEGER,"percentage packet loss")
idCVar net_forceLatency("net_forceLatency","0", CVAR_SYSTEM|CVAR_INTEGER,"milliseconds latency")
idCVar net_ip("net_ip","localhost", CVAR_SYSTEM,"local IP address")
idCVar net_port("net_port","0", CVAR_SYSTEM|CVAR_INTEGER,"local IP port number")
idCVar net_socksEnabled("net_socksEnabled","0", CVAR_SYSTEM|CVAR_ARCHIVE|CVAR_BOOL,"")
idCVar net_socksPassword("net_socksPassword","", CVAR_SYSTEM|CVAR_ARCHIVE,"")
idCVar net_socksPort("net_socksPort","1080", CVAR_SYSTEM|CVAR_ARCHIVE|CVAR_INTEGER,"")
idCVar net_socksServer("net_socksServer","", CVAR_SYSTEM|CVAR_ARCHIVE,"")
idCVar net_socksUsername("net_socksUsername","", CVAR_SYSTEM|CVAR_ARCHIVE,"")

Definition at line 65 of file win_net.cpp.

int num_interfaces = 0

Definition at line 64 of file win_net.cpp.

idUDPLag* udpPorts[65536]

Definition at line 867 of file win_net.cpp.