diff options
author | Nikias Bassen | 2009-02-20 11:24:52 +0100 |
---|---|---|
committer | Nikias Bassen | 2009-02-20 11:24:52 +0100 |
commit | 71d8775f865b431135cd3c178763d0a294b8ff9e (patch) | |
tree | 2d6ea791e24db2d206ad943dce42b3cec5557d43 /usbmuxd.h | |
download | usbmuxd-71d8775f865b431135cd3c178763d0a294b8ff9e.tar.gz usbmuxd-71d8775f865b431135cd3c178763d0a294b8ff9e.tar.bz2 |
initial import
Diffstat (limited to 'usbmuxd.h')
-rw-r--r-- | usbmuxd.h | 44 |
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 @@ +#ifndef __USBMUXD_H +#define __USBMUXD_H + +#include <stdint.h> + +struct usbmux_header { + uint32_t length; // length of message, including header + uint32_t reserved; // always zero + uint32_t type; // message type + uint32_t tag; // responses to this query will echo back this tag +}; + +struct usbmux_result { + struct usbmux_header header; + uint32_t result; +}; + +struct usbmux_connect_request { + struct usbmux_header header; + uint32_t device_id; + uint16_t port; // TCP port number + uint16_t reserved; // set to zero +}; + +struct usbmux_dev_info { + uint32_t device_id; + uint16_t product_id; + char serial_number[40]; +}; + +struct usbmux_dev_info_request { + struct usbmux_header header; + struct usbmux_dev_info dev_info; + unsigned char padding[222]; +}; + +enum { + usbmux_result = 1, + usbmux_connect = 2, + usbmux_hello = 3, + usbmux_device_info = 4, +}; + +#endif |