blob: 0dfd27f98e93c2e193b304a4f3de76d6bd0852e9 (
plain)
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
|
diff --git a/include/usbmuxd-proto.h b/include/usbmuxd-proto.h
index 38473f5..d004232 100644
--- a/include/usbmuxd-proto.h
+++ b/include/usbmuxd-proto.h
@@ -57,28 +57,30 @@ enum usbmuxd_msgtype {
MESSAGE_PLIST = 8,
};
+#pragma pack(push, 1)
+
struct usbmuxd_header {
uint32_t length; // length of message, including header
uint32_t version; // protocol version
uint32_t message; // message type
uint32_t tag; // responses to this query will echo back this tag
-} __attribute__((__packed__));
+};
struct usbmuxd_result_msg {
struct usbmuxd_header header;
uint32_t result;
-} __attribute__((__packed__));
+};
struct usbmuxd_connect_request {
struct usbmuxd_header header;
uint32_t device_id;
uint16_t port; // TCP port number
uint16_t reserved; // set to zero
-} __attribute__((__packed__));
+};
struct usbmuxd_listen_request {
struct usbmuxd_header header;
-} __attribute__((__packed__));
+};
struct usbmuxd_device_record {
uint32_t device_id;
@@ -86,7 +88,9 @@ struct usbmuxd_device_record {
char serial_number[256];
uint16_t padding;
uint32_t location;
-} __attribute__((__packed__));
+};
+
+#pragma pack(pop)
#ifdef __cplusplus
}
|