You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1011 B
61 lines
1011 B
#ifndef _TS3INIT_HEADER_H |
|
#define _TS3INIT_HEADER_H |
|
|
|
enum |
|
{ |
|
TS3INIT_HEADER_CLIENT_LENGTH = 18, |
|
TS3INIT_HEADER_SERVER_LENGTH = 12, |
|
}; |
|
|
|
/* |
|
* Magic number of a TS3INIT packet. |
|
*/ |
|
struct ts3_init_header_tag |
|
{ |
|
union |
|
{ |
|
char tag8[8]; |
|
__aligned_u64 tag64; |
|
}; |
|
}; |
|
|
|
/* |
|
* Header of a TS3INIT client packet. |
|
*/ |
|
struct ts3_init_client_header |
|
{ |
|
struct ts3_init_header_tag tag; |
|
__be16 packet_id; |
|
__be16 client_id; |
|
__u8 flags; |
|
__u8 client_version[4]; |
|
__u8 command; |
|
}; |
|
|
|
/* |
|
* Header of a TS3INIT server packet. |
|
*/ |
|
struct ts3_init_server_header |
|
{ |
|
struct ts3_init_header_tag tag; |
|
__be16 packet_id; |
|
__u8 flags; |
|
__u8 command; |
|
}; |
|
|
|
/* |
|
* The available TS3INIT commands, both client and server. |
|
*/ |
|
enum |
|
{ |
|
COMMAND_GET_COOKIE = 0, |
|
COMMAND_SET_COOKIE, |
|
COMMAND_GET_PUZZLE, |
|
COMMAND_SET_PUZZLE, |
|
COMMAND_SOLVE_PUZZLE, |
|
COMMAND_RESET_PUZZLE, |
|
COMMAND_MAX, |
|
COMMAND_RESET = 127 |
|
}; |
|
|
|
#endif /* _TS3INIT_HEADER_H */
|
|
|