|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#ifndef CHECK_CSGO_H
#define CHECK_CSGO_H
#include <iostream>
#include <sstream>
#include <fstream>
#include <limits>
#include <ctype.h>
#include <cstdlib>
#include <unistd.h>
#include <cstring>
#include <sys/time.h>
#include "auxiliar.h"
|
|
17
|
#include "udp.h"
|
|
18
19
|
#define VERSION "1.0"
|
|
20
21
|
#define DATAGRAM_LENGTH 1400
#define HDR_SIZE 4
|
|
22
|
|
|
23
24
25
26
27
|
struct sourcedspacket_struct {
ssize_t length;
char* data;
};
typedef struct sourcedspacket_struct SOURCEDS_PACKET;
|
|
28
29
|
struct serverinfo_struct {
|
|
30
31
32
33
|
string name;
string game;
string map;
uint8_t players;
|
|
34
|
uint8_t max_players;
|
|
35
36
37
|
};
typedef struct serverinfo_struct SERVERINFO;
|
|
38
|
SOURCEDS_PACKET* getSourceDSResponse(int s, sockaddr_in *server);
|
|
39
40
41
42
43
|
int check_csgo(char *hostname, uint16_t port, SERVERINFO *server_info);
void printVersion();
void printHelp(bool longVersion);
#endif
|