#include <mach/rpc.h> also included by <mach/mach.h>

mach/rpc.h

Mach RPC Subsystem Interfaces
6 typedefs · 4 structs · 3 macros

typedefroutine_arg_type

Basic mach rpc types.
typedef unsigned int routine_arg_type

typedefroutine_arg_offset

typedef unsigned int routine_arg_offset

typedefroutine_arg_size

typedef unsigned int routine_arg_size

structrpc_routine_arg_descriptor

Definitions for a signature's argument and routine descriptor's.
size 16, align 4
routine_arg_typetypePort, Array, etc.
routine_arg_sizesizeelement size in bytes
routine_arg_sizecountnumber of elements
routine_arg_offsetoffsetOffset in list of routine args

typedefrpc_routine_arg_descriptor_t

typedef struct rpc_routine_arg_descriptor *rpc_routine_arg_descriptor_t

structrpc_routine_descriptor

size 40, align 8
mig_impl_routine_timpl_routineServer work func pointer
mig_stub_routine_tstub_routineUnmarshalling func pointer
unsigned intargcNumber of argument words
unsigned intdescr_countNumber of complex argument
rpc_routine_arg_descriptor_targ_descrdescriptors Pointer to beginning of
unsigned intmax_reply_msgthe arg_descr array Max size for reply msg

typedefrpc_routine_descriptor_t

typedef struct rpc_routine_descriptor *rpc_routine_descriptor_t

macroRPC_DESCR_SIZE

#define RPC_DESCR_SIZE(x) ((x)->descr_count *
	                        sizeof(struct rpc_routine_arg_descriptor))

structrpc_signature

size 56, align 8
struct rpc_routine_descriptorrd
struct rpc_routine_arg_descriptor[1]rad

macroRPC_SIGBUF_SIZE

#define RPC_SIGBUF_SIZE 8

structrpc_subsystem

A subsystem describes a set of server routines that can be invoked by mach_rpc() on the ports that are registered with the subsystem. For each routine, the routine number is given, along with the address of the implementation function in the server and a description of the arguments of the routine (it's "signature"). This structure definition is only a template for what is really a variable-length structure (generated by MIG for each subsystem). The actual structures do not always have one entry in the routine array, and also have a varying number of entries in the arg_descr array. Each routine has an array of zero or more arg descriptors one for each complex arg. These arrays are all catenated together to form the arg_descr field of the subsystem struct. The arg_descr field of each routine entry points to a unique sub-sequence within this catenated array. The goal is to keep everything contiguous.
size 88, align 8
void *reservedReserved for system use
mach_msg_id_tstartMin routine number
mach_msg_id_tendMax routine number + 1
unsigned intmaxsizeMax mach_msg size
vm_address_tbase_addrAddress of this struct in user
struct rpc_routine_descriptor[1]routine
struct rpc_routine_arg_descriptor[1]arg_descriptorcount fields for all routines

typedefrpc_subsystem_t

typedef struct rpc_subsystem *rpc_subsystem_t

macroRPC_SUBSYSTEM_NULL

#define RPC_SUBSYSTEM_NULL ((rpc_subsystem_t) 0)