firehose_server_internal.h [plain text]
#ifndef __FIREHOSE_SERVER_INTERNAL__
#define __FIREHOSE_SERVER_INTERNAL__
OS_OBJECT_CLASS_DECL(firehose_client, object);
#define FIREHOSE_CLIENT_CLASS OS_OBJECT_VTABLE(firehose_client)
typedef struct firehose_snapshot_s *firehose_snapshot_t;
struct firehose_snapshot_s {
firehose_snapshot_handler_t handler;
dispatch_group_t fs_group;
};
struct firehose_client_s {
union {
_OS_OBJECT_HEADER(void *os_obj_isa, os_obj_ref_cnt, os_obj_xref_cnt);
struct _os_object_s fc_as_os_object;
};
TAILQ_ENTRY(firehose_client_s) fc_entry;
firehose_buffer_t fc_buffer;
uint64_t volatile fc_mem_sent_flushed_pos;
uint64_t volatile fc_mem_flushed_pos;
uint64_t volatile fc_io_sent_flushed_pos;
uint64_t volatile fc_io_flushed_pos;
void *volatile fc_ctxt;
union {
dispatch_mach_t fc_mach_channel;
dispatch_source_t fc_kernel_source;
};
dispatch_source_t fc_io_source;
dispatch_source_t fc_mem_source;
mach_port_t fc_recvp;
mach_port_t fc_sendp;
bool fc_use_notifs;
bool fc_memory_corrupted;
bool fc_needs_io_snapshot;
bool fc_needs_mem_snapshot;
bool fc_is_kernel;
};
void
_firehose_client_xref_dispose(struct firehose_client_s *fc);
void
_firehose_client_dispose(struct firehose_client_s *fc);
extern unsigned char __libfirehose_serverVersionString[];
extern double __libfirehose_serverVersionNumber;
#endif // __FIREHOSE_SERVER_INTERNAL__