summaryrefslogtreecommitdiffstats
path: root/usbmuxd.h
diff options
context:
space:
mode:
Diffstat (limited to 'usbmuxd.h')
-rw-r--r--usbmuxd.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/usbmuxd.h b/usbmuxd.h
new file mode 100644
index 0000000..fcbee52
--- /dev/null
+++ b/usbmuxd.h
@@ -0,0 +1,44 @@
1#ifndef __USBMUXD_H
2#define __USBMUXD_H
3
4#include <stdint.h>
5
6struct usbmux_header {
7 uint32_t length; // length of message, including header
8 uint32_t reserved; // always zero
9 uint32_t type; // message type
10 uint32_t tag; // responses to this query will echo back this tag
11};
12
13struct usbmux_result {
14 struct usbmux_header header;
15 uint32_t result;
16};
17
18struct usbmux_connect_request {
19 struct usbmux_header header;
20 uint32_t device_id;
21 uint16_t port; // TCP port number
22 uint16_t reserved; // set to zero
23};
24
25struct usbmux_dev_info {
26 uint32_t device_id;
27 uint16_t product_id;
28 char serial_number[40];
29};
30
31struct usbmux_dev_info_request {
32 struct usbmux_header header;
33 struct usbmux_dev_info dev_info;
34 unsigned char padding[222];
35};
36
37enum {
38 usbmux_result = 1,
39 usbmux_connect = 2,
40 usbmux_hello = 3,
41 usbmux_device_info = 4,
42};
43
44#endif