+ // ping time for sorting servers
+ int ping;
+ // name of the game
+ char game[32];
+ // name of the mod
+ char mod[32];
+ // name of the map
+ char map[32];
+ // name of the session
+ char name[128];
+ // max client number
+ int maxplayers;
+ // number of currently connected players
+ int numplayers;
+ // protocol version
+ int protocol;
+} serverlist_info_t;
+
+typedef enum
+{
+ SLIF_CNAME,
+ SLIF_PING,
+ SLIF_GAME,
+ SLIF_MOD,
+ SLIF_MAP,
+ SLIF_NAME,
+ SLIF_MAXPLAYERS,
+ SLIF_NUMPLAYERS,
+ SLIF_PROTOCOL,
+ SLIF_COUNT
+} serverlist_infofield_t;
+
+typedef enum
+{
+ SQS_NONE = 0,
+ SQS_QUERYING,
+ SQS_QUERIED,
+ SQS_TIMEDOUT
+} serverlist_query_state;
+
+typedef struct serverlist_entry_s
+{
+ // used to determine whether this entry should be included into the final view
+ serverlist_query_state query;
+ // used to count the number of times the host has tried to query this server already
+ unsigned querycounter;
+ // used to calculate ping when update comes in
+ double querytime;
+
+ serverlist_info_t info;
+
+ // legacy stuff