-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconnection_request.h
More file actions
44 lines (31 loc) · 870 Bytes
/
connection_request.h
File metadata and controls
44 lines (31 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/**
* file : connection_request.h
* license : GPLV3
* copyright : Hugo Camboulive
* description : This header contains information
* about functions and structures used to connect
* to a teamspeak server.
*/
#ifndef __CONNECTION_REQUEST_H__
#define __CONNECTION_REQUEST_H__
#include "compat.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <strings.h>
#include <arpa/inet.h> /* htons */
#include <stdlib.h>
#include <string.h>
#include "crc.h"
/** This structure contains information
* to connect to a teamspeak server */
struct connection_request {
char * machine;
char * login;
char * pass;
char * nick;
uint8_t assign_nick;
};
/** Connect to a teamspeak server.
* @return : socket */
int connect_to(struct connection_request * req, int * sockfd, struct sockaddr_in * servaddr);
#endif