summaryrefslogtreecommitdiffstats
path: root/src/usbmux.h
diff options
context:
space:
mode:
authorGravatar Matt Colyer2008-08-04 23:41:56 -0700
committerGravatar Matt Colyer2008-08-04 23:41:56 -0700
commit62bcedced863a9c4ecc3601638635dfe172a9130 (patch)
tree9937b4f6fbb848c1854e0add40f7ee86bba10d88 /src/usbmux.h
parent294f6080e7c26cb390093eead11c8e0757e00fe2 (diff)
downloadlibimobiledevice-62bcedced863a9c4ecc3601638635dfe172a9130.tar.gz
libimobiledevice-62bcedced863a9c4ecc3601638635dfe172a9130.tar.bz2
Zack's C. rewrite of usbmux (with a few additions by Matt Colyer).
Diffstat (limited to 'src/usbmux.h')
-rw-r--r--src/usbmux.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/usbmux.h b/src/usbmux.h
index 7c17dd1..332dc8a 100644
--- a/src/usbmux.h
+++ b/src/usbmux.h
@@ -43,6 +43,13 @@ typedef struct {
43 uint16 window, nullnull, length16; 43 uint16 window, nullnull, length16;
44} usbmux_tcp_header; 44} usbmux_tcp_header;
45 45
46typedef struct {
47 usbmux_tcp_header *header;
48 iPhone *phone;
49 char *recv_buffer;
50 int r_len;
51} usbmux_connection;
52
46usbmux_tcp_header *new_mux_packet(uint16 s_port, uint16 d_port); 53usbmux_tcp_header *new_mux_packet(uint16 s_port, uint16 d_port);
47 54
48typedef struct { 55typedef struct {
@@ -51,8 +58,10 @@ typedef struct {
51 58
52usbmux_version_header *version_header(); 59usbmux_version_header *version_header();
53 60
54usbmux_tcp_header *mux_connect(iPhone *phone, uint16 s_port, uint16 d_port); 61usbmux_connection *mux_connect(iPhone *phone, uint16 s_port, uint16 d_port);
55void mux_close_connection(iPhone *phone, usbmux_tcp_header *connection); 62void mux_close_connection(usbmux_connection *connection);
56int mux_send(iPhone *phone, usbmux_tcp_header *connection, char *data, uint32 datalen); 63int mux_send(usbmux_connection *connection, const char *data, uint32 datalen);
57int mux_recv(iPhone *phone, usbmux_tcp_header *connection, char *data, uint32 datalen); 64int mux_recv(usbmux_connection *connection, char *data, uint32 datalen);
65
66
58#endif 67#endif