QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
netchan.h File Reference
This graph shows which files directly or indirectly include this file:

Data Structures

struct  netadr_t
 
struct  netchan_s
 

Macros

#define MAX_DATAGRAM   1450
 max length of unreliable message More...
 
#define MAX_LATENT   32
 
#define MAX_MSGLEN   1450
 max length of a reliable message More...
 
#define OLD_AVG   0.99
 
#define PORT_ANY   -1
 

Typedefs

typedef struct netchan_s netchan_t
 

Enumerations

enum  ncqport_e { NC_QPORT_SEND = 0x01, NC_QPORT_READ = 0x02 }
 

Functions

void Analyze_Client_Packet (const byte *data, int len, int has_sequence)
 
void Analyze_Server_Packet (const byte *data, int len, int has_sequence)
 
void Log_Incoming_Packet (const byte *p, int len, int has_sequence, int is_server)
 
void Log_Outgoing_Packet (const byte *p, int len, int has_sequence, int is_server)
 
const char * NET_AdrToString (netadr_t a)
 Convert an address to a string. More...
 
const char * NET_BaseAdrToString (netadr_t a)
 Convert an address to a string. More...
 
qboolean NET_CompareAdr (netadr_t a, netadr_t b)
 Compare two network addresses. More...
 
qboolean NET_CompareBaseAdr (netadr_t a, netadr_t b)
 Compare two network addresses. More...
 
qboolean NET_GetPacket (void)
 Read a single packet from the network into net_message. More...
 
void NET_Init (int port)
 Initialize the UDP network interface. More...
 
int Net_Log_Init (const char **sound_precache)
 
void Net_LogPrintf (const char *fmt,...)
 
void Net_LogStop (void)
 
void NET_SendPacket (int length, const void *data, netadr_t to)
 Send a data packet out to the network. More...
 
void NET_Shutdown (void)
 Shutdown the UDP network interface. More...
 
qboolean NET_StringToAdr (const char *s, netadr_t *a)
 Convert a human readable address to a quake address. More...
 
qboolean Netchan_CanPacket (netchan_t *chan)
 Check if a packet can be sent to the connection. More...
 
qboolean Netchan_CanReliable (netchan_t *chan)
 Check if a reliable packet can be sent to the connection. More...
 
void Netchan_Init (void)
 Initialize the netchan system. More...
 
void Netchan_Init_Cvars (void)
 Initialize the netchan cvars. More...
 
void Netchan_OutOfBand (netadr_t adr, int length, byte *data)
 Send an out-of-band packet. More...
 
void Netchan_OutOfBandPrint (netadr_t adr, const char *format,...)
 Send a formatted string as an out-of-band packet. More...
 
qboolean Netchan_Process (netchan_t *chan)
 Process a packet for the specifiied connection. More...
 
void Netchan_SendPacket (int length, const void *data, netadr_t to)
 Send a packet. More...
 
void Netchan_Setup (netchan_t *chan, netadr_t adr, int qport, ncqport_e flags)
 Initialize a new connection. More...
 
void Netchan_Transmit (netchan_t *chan, int length, byte *data)
 Try to send an unreliable packet to a connection. More...
 

Variables

int net_blocksend
 Disable packet sending. More...
 
netadr_t net_from
 
netadr_t net_local_adr
 
netadr_t net_loopback_adr
 
struct msg_snet_message
 
int net_nochoke
 Disable packet choking. More...
 
struct cvar_snet_packetlog
 
double * net_realtime
 Pointer to variable holding the current time in seconds. More...
 
int net_socket
 
struct cvar_sqport
 

Macro Definition Documentation

#define MAX_DATAGRAM   1450

max length of unreliable message

#define MAX_MSGLEN   1450

max length of a reliable message

#define PORT_ANY   -1

Function Documentation

void Analyze_Client_Packet ( const byte data,
int  len,
int  has_sequence 
)
void Analyze_Server_Packet ( const byte data,
int  len,
int  has_sequence 
)
void Log_Incoming_Packet ( const byte p,
int  len,
int  has_sequence,
int  is_server 
)
void Log_Outgoing_Packet ( const byte p,
int  len,
int  has_sequence,
int  is_server 
)
int Net_Log_Init ( const char **  sound_precache)
void Net_LogPrintf ( const char *  fmt,
  ... 
)
void Net_LogStop ( void  )

Variable Documentation

netadr_t net_from
netadr_t net_local_adr
netadr_t net_loopback_adr
struct msg_s* net_message
struct cvar_s* net_packetlog
int net_socket
struct cvar_s* qport