summaryrefslogtreecommitdiffstats
path: root/libusbmuxd/usbmuxd-proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'libusbmuxd/usbmuxd-proto.h')
-rw-r--r--libusbmuxd/usbmuxd-proto.h97
1 files changed, 0 insertions, 97 deletions
diff --git a/libusbmuxd/usbmuxd-proto.h b/libusbmuxd/usbmuxd-proto.h
deleted file mode 100644
index be9e709..0000000
--- a/libusbmuxd/usbmuxd-proto.h
+++ /dev/null
@@ -1,97 +0,0 @@
1/*
2 libusbmuxd - client library to talk to usbmuxd
3
4Copyright (C) 2009 Paul Sladen <libiphone@paul.sladen.org>
5Copyright (C) 2009 Nikias Bassen <nikias@gmx.li>
6Copyright (C) 2009 Hector Martin "marcan" <hector@marcansoft.com>
7
8This library is free software; you can redistribute it and/or modify
9it under the terms of the GNU Lesser General Public License as
10published by the Free Software Foundation, either version 2.1 of the
11License, or (at your option) any later version.
12
13This library is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU Lesser General Public
19License along with this program; if not, write to the Free Software
20Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
22*/
23
24/* Protocol defintion for usbmuxd proxy protocol */
25#ifndef __USBMUXD_PROTO_H
26#define __USBMUXD_PROTO_H
27
28#include <stdint.h>
29#define USBMUXD_PROTOCOL_VERSION 0
30
31#if defined(WIN32) || defined(__CYGWIN__)
32#define USBMUXD_SOCKET_PORT 27015
33#else
34#define USBMUXD_SOCKET_FILE "/var/run/usbmuxd"
35#endif
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41enum usbmuxd_result {
42 RESULT_OK = 0,
43 RESULT_BADCOMMAND = 1,
44 RESULT_BADDEV = 2,
45 RESULT_CONNREFUSED = 3,
46 // ???
47 // ???
48 RESULT_BADVERSION = 6,
49};
50
51enum usbmuxd_msgtype {
52 MESSAGE_RESULT = 1,
53 MESSAGE_CONNECT = 2,
54 MESSAGE_LISTEN = 3,
55 MESSAGE_DEVICE_ADD = 4,
56 MESSAGE_DEVICE_REMOVE = 5,
57 //???
58 //???
59 MESSAGE_PLIST = 8,
60};
61
62struct usbmuxd_header {
63 uint32_t length; // length of message, including header
64 uint32_t version; // protocol version
65 uint32_t message; // message type
66 uint32_t tag; // responses to this query will echo back this tag
67} __attribute__((__packed__));
68
69struct usbmuxd_result_msg {
70 struct usbmuxd_header header;
71 uint32_t result;
72} __attribute__((__packed__));
73
74struct usbmuxd_connect_request {
75 struct usbmuxd_header header;
76 uint32_t device_id;
77 uint16_t port; // TCP port number
78 uint16_t reserved; // set to zero
79} __attribute__((__packed__));
80
81struct usbmuxd_listen_request {
82 struct usbmuxd_header header;
83} __attribute__((__packed__));
84
85struct usbmuxd_device_record {
86 uint32_t device_id;
87 uint16_t product_id;
88 char serial_number[256];
89 uint16_t padding;
90 uint32_t location;
91} __attribute__((__packed__));
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif /* __USBMUXD_PROTO_H */