ostrace.h File Reference

## Description

System log and tracing capabilities.

## Structs

struct | ostrace_packet_header_t

## Macros

#define | OSTRACE_SERVICE_NAME "com.apple.os_trace_relay"
| Service identifier passed to lockdownd_start_service() to start the os trace relay service.

## Typedefs

typedef ostrace_client_private * | ostrace_client_t
| The client handle.
typedef void(* | ostrace_activity_cb_t) (const void *buf, size_t len, void *user_data)
| Receives unparsed ostrace data from the ostrace service.
typedef int(* | ostrace_archive_write_cb_t) (const void *buf, size_t len, void *user_data)
| Receives archive data from the ostrace service.

## Enumerations

enum | ostrace_error_t { OSTRACE_E_SUCCESS = 0 , OSTRACE_E_INVALID_ARG = -1 , OSTRACE_E_MUX_ERROR = -2 , OSTRACE_E_SSL_ERROR = -3 , OSTRACE_E_NOT_ENOUGH_DATA = -4 , OSTRACE_E_TIMEOUT = -5 , OSTRACE_E_PLIST_ERROR = -6 , OSTRACE_E_REQUEST_FAILED = -7 , OSTRACE_E_UNKNOWN_ERROR = -256 }
| Error Codes.

## Functions

LIBIMOBILEDEVICE_API ostrace_error_t | ostrace_client_new (idevice_t device, lockdownd_service_descriptor_t service, ostrace_client_t *client)
| Connects to the os_trace_relay service on the specified device.
LIBIMOBILEDEVICE_API ostrace_error_t | ostrace_client_start_service (idevice_t device, ostrace_client_t *client, const char *label)
| Starts a new os_trace_relay service on the specified device and connects to it.
LIBIMOBILEDEVICE_API ostrace_error_t | ostrace_client_free (ostrace_client_t client)
| Disconnects a ostrace client from the device and frees up the ostrace client data.
LIBIMOBILEDEVICE_API ostrace_error_t | ostrace_start_activity (ostrace_client_t client, plist_t options, ostrace_activity_cb_t callback, void *user_data)
| Starts capturing OS trace activity data of the device using a callback.
LIBIMOBILEDEVICE_API ostrace_error_t | ostrace_stop_activity (ostrace_client_t client)
| Stops the ostrace activity.
LIBIMOBILEDEVICE_API ostrace_error_t | ostrace_get_pid_list (ostrace_client_t client, plist_t *list)
| Returns a dictionary with all currently running processes on the device.
LIBIMOBILEDEVICE_API ostrace_error_t | ostrace_create_archive (ostrace_client_t client, plist_t options, ostrace_archive_write_cb_t callback, void *user_data)
| Creates a syslog archive.