summaryrefslogtreecommitdiffstats
path: root/lockdown.h
diff options
context:
space:
mode:
Diffstat (limited to 'lockdown.h')
-rw-r--r--lockdown.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/lockdown.h b/lockdown.h
new file mode 100644
index 0000000..0acd624
--- /dev/null
+++ b/lockdown.h
@@ -0,0 +1,36 @@
1/*
2 * lockdown.h
3 * Defines lockdown stuff, like the client struct.
4 */
5
6#ifndef LOCKDOWND_H
7#define LOCKDOWND_H
8
9#include "plist.h"
10
11#include <gnutls/gnutls.h>
12#include <string.h>
13
14typedef struct {
15 usbmux_tcp_header *connection;
16 gnutls_session_t *ssl_session;
17 iPhone *iphone;
18 int in_SSL;
19 char *gtls_buffer_hack;
20 int gtls_buffer_hack_len;
21} lockdownd_client;
22
23lockdownd_client *new_lockdownd_client(iPhone *phone);
24int lockdownd_hello(lockdownd_client *control);
25int lockdownd_recv(lockdownd_client *control, char **dump_data);
26int lockdownd_send(lockdownd_client *control, char *raw_data, uint32 length);
27void lockdownd_close(lockdownd_client *control);
28
29// SSL functions
30int lockdownd_start_SSL_session(lockdownd_client *control, const char *HostID);
31ssize_t lockdownd_securead(gnutls_transport_ptr_t transport, char *buffer, size_t length);
32ssize_t lockdownd_secuwrite(gnutls_transport_ptr_t transport, char *buffer, size_t length);
33
34// Higher-level lockdownd stuff
35int lockdownd_start_service(lockdownd_client *control, const char *service);
36#endif