DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
The network info/connection protocol.

It is used to find Quake servers, get info about them, and connect to them.

Once connected, the Quake game protocol (documented elsewhere) is used.

General notes:

game_name is currently always "QUAKE", but is there so this same protocol
can be used for future games as well; can you say Quake2?
string game_name "QUAKE"
byte net_protocol_version NET_PROTOCOL_VERSION
string game_name "QUAKE"
byte net_protocol_version NET_PROTOCOL_VERSION
byte player_number
string rule
string password
string command
long port
string reason
string server_address
string host_name
string level_name
byte current_players
byte max_players
byte protocol_version NET_PROTOCOL_VERSION
byte player_number
string name
long colors
long frags
long connect_time
string address
string rule
string value
string reply
GLsizei const GLfloat * value
Definition glquake.h:740
const GLchar * name
Definition glquake.h:601
#define CCREP_SERVER_INFO
Definition netconn.h:127
#define CCREP_ACCEPT
Definition netconn.h:125
#define CCREP_PLAYER_INFO
Definition netconn.h:128
#define CCREQ_PLAYER_INFO
Definition netconn.h:121
#define CCREP_REJECT
Definition netconn.h:126
#define NET_PROTOCOL_VERSION
Definition netconn.h:47
#define CCREQ_RULE_INFO
Definition netconn.h:122
#define CCREP_RULE_INFO
Definition netconn.h:129
#define CCREQ_SERVER_INFO
Definition netconn.h:120
#define CCREP_RCON
Definition netconn.h:130
#define CCREQ_CONNECT
Definition netconn.h:119
#define CCREQ_RCON
Definition netconn.h:123
float frags
Definition progsdefs.qc:138
Note
There are two address forms used above. The short form is just a port number. The address that goes along with the port is defined as "whatever address you receive this reponse from". This lets us use the host OS to solve the problem of multiple host addresses (possibly with no routing between them); the host will use the right address when we reply to the inbound connection request. The long from is a full address and port in a string. It is used for returning the address of a server that is not running locally.