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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
--- src/protocol.h 2002-10-30 16:16:06.000000000 +0100
+++ src/protocol.h 2007-02-03 01:27:40.000000000 +0100
@@ -53,6 +53,7 @@
#ifndef __PROTOCOL_H__
#define __PROTOCOL_H__
#include <time.h>
+#include <sys/types.h>
// Operating System types
@@ -109,20 +110,20 @@
#define revision "$Revision: 1.1 $"
struct __version_t {
- unsigned long major; // major version for incompatible versions
- unsigned long minor; // minor version for compatible versions
+ uint32_t major; // major version for incompatible versions
+ uint32_t minor; // minor version for compatible versions
};
// CLIENT REQUESTS //
// protocol specific
struct REQUEST_PROXY_HELO { // type number: 99
- char name[64]; // name of the client (for logging)
- int os; // operating system of the client
+ uint8_t name[64]; // name of the client (for logging)
+ uint32_t os; // operating system of the client
struct __version_t version; // version of the client
};
struct REQUEST_PROXY_AUTH { // type number: 98
- unsigned long auth_type; // authentication type desired
+ uint32_t auth_type; // authentication type desired
};
struct REQUEST_PROXY_KEEPALIVE { // type number: 97
@@ -171,11 +172,11 @@
// protocol specific
struct ANSWER_PROXY_HELO { // type number: 99
- char name[64]; // some kind of name for the server (zero-terminated)
- int os; // the operating system of the server
+ int8_t name[64]; // some kind of name for the server (zero-terminated)
+ int32_t os; // the operating system of the server
struct __version_t version; // the version of the server
- unsigned long auth_type; // the server tells the client which auth-methods it supports (each bit represents one method) !changed!
- int timeout; // in seconds, -1 means no timeout
+ int32_t auth_type; // the server tells the client which auth-methods it supports (each bit represents one method) !changed!
+ int32_t timeout; // in seconds, -1 means no timeout
};
struct ANSWER_PROXY_AUTH { // type number: 98
@@ -185,7 +186,7 @@
};
struct ANSWER_PROXY_SHUTDOWN { // type number: 96
- char reason[128];
+ int8_t reason[128];
// z.B. "Ich muss dringend aufs Klo!"; :-)
// no answer from the client expected
};
@@ -208,7 +209,7 @@
};
struct ANSWER_CAPI_MANUFACTURER { // type number: 6
- char manufacturer[64];
+ int8_t manufacturer[64];
};
struct ANSWER_CAPI_VERSION { // type number: 7
@@ -217,11 +218,11 @@
};
struct ANSWER_CAPI_SERIAL { // type number: 8
- char serial[8];
+ int8_t serial[8];
};
struct ANSWER_CAPI_PROFILE { // type number: 9
- char profile[64];
+ int8_t profile[64];
};
struct ANSWER_CAPI_INSTALLED { // type number: 10
@@ -229,30 +230,30 @@
struct REQUEST_HEADER {
- unsigned message_len;
- unsigned header_len;
- unsigned body_len;
- unsigned data_len;
-
- unsigned message_id;
- unsigned message_type;
- unsigned long app_id; // must be long!
- unsigned controller_id;
- unsigned session_id;
+ int32_t message_len;
+ int32_t header_len;
+ int32_t body_len;
+ int32_t data_len;
+
+ int32_t message_id;
+ int32_t message_type;
+ int32_t app_id;
+ int32_t controller_id;
+ int32_t session_id;
};
struct ANSWER_HEADER {
- unsigned message_len;
- unsigned header_len;
- unsigned body_len;
- unsigned data_len;
-
- unsigned message_id;
- unsigned message_type;
- unsigned long app_id; // must be long!
- unsigned session_id;
- unsigned proxy_error;
- unsigned long capi_error;
+ int32_t message_len;
+ int32_t header_len;
+ int32_t body_len;
+ int32_t data_len;
+
+ int32_t message_id;
+ int32_t message_type;
+ int32_t app_id;
+ int32_t session_id;
+ int32_t proxy_error;
+ int32_t capi_error;
};
#endif
|