2017-04-09 16:56:11 +00:00
|
|
|
/**************************
|
|
|
|
* Data-Structures *
|
|
|
|
***************************
|
|
|
|
* Designed & Developed by *
|
|
|
|
* Adrien Marquès *
|
|
|
|
* <xdrm-brackets> *
|
|
|
|
***************************
|
|
|
|
* doowap31@gmail.com *
|
|
|
|
**************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-06 11:36:51 +00:00
|
|
|
#ifndef _DATA_H_
|
|
|
|
#define _DATA_H_
|
|
|
|
|
|
|
|
#define TERMREQ_FBK 0x01
|
|
|
|
#define TERMREQ_CAP 0x02
|
|
|
|
#define TERMREQ_SPD 0x04
|
|
|
|
#define TERMREQ_ALT 0x08
|
2017-05-05 11:51:07 +00:00
|
|
|
#define TERMREQ_OFF 0x10
|
2017-04-06 11:36:51 +00:00
|
|
|
|
2017-04-07 18:25:53 +00:00
|
|
|
#define PLANE_LEN ( sizeof(char)*6+sizeof(int)*5 )
|
2017-04-06 11:36:51 +00:00
|
|
|
struct plane{
|
|
|
|
char code[6];
|
2017-04-08 16:20:17 +00:00
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int z;
|
|
|
|
int cap;
|
|
|
|
int spd;
|
2017-04-26 21:23:28 +00:00
|
|
|
char online;
|
2017-04-06 11:36:51 +00:00
|
|
|
};
|
|
|
|
|
2017-04-28 12:54:02 +00:00
|
|
|
struct plane_update{
|
|
|
|
char flags;
|
|
|
|
int z;
|
|
|
|
int cap;
|
|
|
|
int spd;
|
|
|
|
char done;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define TERMREQ_LEN ( sizeof(char)+PLANE_LEN )
|
2017-04-06 11:36:51 +00:00
|
|
|
struct term_req{
|
2017-04-25 13:00:25 +00:00
|
|
|
char flags;
|
2017-04-28 12:54:02 +00:00
|
|
|
struct plane update;
|
2017-04-06 11:36:51 +00:00
|
|
|
};
|
|
|
|
|
2017-04-07 16:14:21 +00:00
|
|
|
struct term_res{
|
2017-04-25 13:00:25 +00:00
|
|
|
char flags;
|
|
|
|
char n;
|
2017-04-07 16:14:21 +00:00
|
|
|
struct plane* data;
|
|
|
|
};
|
|
|
|
|
2017-04-06 11:36:51 +00:00
|
|
|
|
2017-04-26 12:25:05 +00:00
|
|
|
#define BINDHDR_LEN ( sizeof(char)+sizeof(in_addr_t)+sizeof(unsigned short) )
|
2017-04-25 09:54:15 +00:00
|
|
|
#define BINDHEAD_UDP 0x01 // is terminal (ask for UDP socket)
|
|
|
|
#define BINDHEAD_TCP 0x02 // is plane (ask for TCP socket)
|
|
|
|
#define BINDHEAD_CTL 0x04 // is ctrlTerm (else: viewTerm)
|
2017-04-06 11:36:51 +00:00
|
|
|
|
|
|
|
struct bind_header{
|
2017-04-09 14:06:31 +00:00
|
|
|
char flags;
|
2017-04-26 12:25:05 +00:00
|
|
|
in_addr_t addr;
|
2017-04-13 18:01:56 +00:00
|
|
|
unsigned short port;
|
2017-04-06 11:36:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|