| libimobiledevice 1.3.0-dirty API Documentation - Return to Homepage

- About
- Structs
- Files
- Related Pages

- File List
- Globals

Macros | Typedefs | Enumerations | Functions
reverse_proxy.h File Reference

## Description

Provide a reverse proxy to allow the device to communicate through, which is used during firmware restore.

## Macros
#define | REVERSE_PROXY_DEFAULT_PORT 1082
| default port the reverse proxy is listening on

## Typedefs
typedef reverse_proxy_client_private * | reverse_proxy_client_t
| The client handle.
typedef void(* | reverse_proxy_log_cb_t) (reverse_proxy_client_t client, const char *log_msg, void *user_data)
| Log callback function prototype.
typedef void(* | reverse_proxy_data_cb_t) (reverse_proxy_client_t client, reverse_proxy_data_direction_t direction, const char *buffer, uint32_t length, void *user_data)
| Data callback function prototype.
typedef void(* | reverse_proxy_status_cb_t) (reverse_proxy_client_t client, reverse_proxy_status_t status, const char *status_msg, void *user_data)
| Status callback function prototype.

## Enumerations
enum | reverse_proxy_error_t { REVERSE_PROXY_E_SUCCESS = 0 , REVERSE_PROXY_E_INVALID_ARG = -1 , REVERSE_PROXY_E_PLIST_ERROR = -2 , REVERSE_PROXY_E_MUX_ERROR = -3 , REVERSE_PROXY_E_SSL_ERROR = -4 , REVERSE_PROXY_E_NOT_ENOUGH_DATA = -5 , REVERSE_PROXY_E_TIMEOUT = -6 , REVERSE_PROXY_E_UNKNOWN_ERROR = -256 }
| Error Codes.
enum | reverse_proxy_client_type_t { RP_TYPE_CTRL = 1 , RP_TYPE_CONN }
| reverse proxy client type More...
enum | reverse_proxy_status_t { RP_STATUS_READY = 1 , RP_STATUS_TERMINATE , RP_STATUS_CONNECT_REQ , RP_STATUS_SHUTDOWN_REQ , RP_STATUS_CONNECTED , RP_STATUS_DISCONNECTED }
| reverse proxy status for reverse_proxy_status_cb_t callback More...
enum | reverse_proxy_data_direction_t { RP_DATA_DIRECTION_OUT = 1 , RP_DATA_DIRECTION_IN }
| reverse proxy data direction passed to reverse_proxy_data_cb_t callback More...

## Functions
reverse_proxy_error_t | reverse_proxy_client_create_with_service (idevice_t device, reverse_proxy_client_t *client, const char *label)
| Create a reverse proxy client using com.apple.PurpleReverseProxy.Ctrl and com.apple.PurpleReverseProxy.Conn lockdown services.
reverse_proxy_error_t | reverse_proxy_client_create_with_port (idevice_t device, reverse_proxy_client_t *client, uint16_t device_port)
| Create a reverse proxy client using an open port on the device.
reverse_proxy_error_t | reverse_proxy_client_free (reverse_proxy_client_t client)
| Disconnects a reverse proxy client and frees up the client data.
reverse_proxy_error_t | reverse_proxy_client_start_proxy (reverse_proxy_client_t client, int control_protocol_version)
| Make an initialized reverse proxy client operational, i.e.
void | reverse_proxy_client_set_status_callback (reverse_proxy_client_t client, reverse_proxy_status_cb_t callback, void *user_data)
| Set a status callback function.
void | reverse_proxy_client_set_log_callback (reverse_proxy_client_t client, reverse_proxy_log_cb_t callback, void *user_data)
| Set a log callback function.
void | reverse_proxy_client_set_data_callback (reverse_proxy_client_t client, reverse_proxy_data_cb_t callback, void *user_data)
| Set a data callback function.
reverse_proxy_client_type_t | reverse_proxy_get_type (reverse_proxy_client_t client)
| Helper function to return the type of a given reverse proxy client, which is either RP_TYPE_CTRL or RP_TYPE_CONN.