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

mach/port.h

NOTICE: This file was modified by McAfee Research in 2004 to introduce support for mandatory and extensible security protections. This notice is included in support of clause 2.2 (b) of the Apple Public License, Version 2.0.
129 macros · 25 typedefs · 7 structs · 2 enums

macroxnu_static_assert_struct_size

Helpers to declare and lock down the expected size for structures. Some structures must remain a constant size due to performance or ABI implications. It's not necessarily an issue if you need to bump a size passed to these macros: act judiciously.
#define xnu_static_assert_struct_size(name, expected_size) _Static_assert(
	sizeof(name) == expected_size, "struct changed size unexpectedly")

macroxnu_static_assert_struct_size_kernel_user

#define xnu_static_assert_struct_size_kernel_user(name, expected_kernel_size, expected_user_size) xnu_static_assert_struct_size(name, expected_user_size)

macroxnu_static_assert_struct_size_kernel_user64_user32

#define xnu_static_assert_struct_size_kernel_user64_user32(name, _kern_size, expected_user64_size, _u32_size) xnu_static_assert_struct_size(name, expected_user64_size)

typedefmach_port_name_t

typedef natural_t mach_port_name_t

typedefmach_port_name_array_t

typedef mach_port_name_t *mach_port_name_array_t

typedefmach_port_array_t

typedef mach_port_t *mach_port_array_t

macroMACH_PORT_NULL

#define MACH_PORT_NULL 0
intentional loose typing

macroMACH_PORT_DEAD

#define MACH_PORT_DEAD ((mach_port_name_t) ~0)

macroMACH_PORT_VALID

#define MACH_PORT_VALID(name) (((name) != MACH_PORT_NULL) &&
	         ((name) != MACH_PORT_DEAD))

macroMACH_PORT_INDEX

#define MACH_PORT_INDEX(name) ((name) >> 8)

macroMACH_PORT_GEN

#define MACH_PORT_GEN(name) (((name) & 0xff) << 24)

macroMACH_PORT_MAKE

#define MACH_PORT_MAKE(index, gen) (((index) << 8) | ((gen) >> 24))

typedefmach_port_right_t

typedef natural_t mach_port_right_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
MACH_PORT_RIGHT_RECEIVEmach_port_allocate creates a port. The new port is not a member of any port set. It doesn't have any extant send or send-once rights. Its make-send count is zero, its sequence number is zero, its queue limit is MACH_PORT_QLIMIT_DEFAULT, and it has no queued messages. name denotes the receive right for the new port. task does not hold send rights for the new port, only the receive right. mach_port_insert_right and mach_port_extract_right can be used to convert the receive right into a combined send/receive right.
MACH_PORT_RIGHT_PORT_SETmach_port_allocate creates a port set. The new port set has no members.
MACH_PORT_RIGHT_DEAD_NAMEmach_port_allocate creates a dead name. The new dead name has one user reference.

macroMACH_PORT_RIGHT_SEND

#define MACH_PORT_RIGHT_SEND ((mach_port_right_t) 0)

macroMACH_PORT_RIGHT_RECEIVE

#define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1)
CMU/MIT Mach reference · manual page · © Carnegie Mellon
mach_port_allocate creates a port. The new port is not a member of any port set. It doesn't have any extant send or send-once rights. Its make-send count is zero, its sequence number is zero, its queue limit is MACH_PORT_QLIMIT_DEFAULT, and it has no queued messages. name denotes the receive right for the new port. task does not hold send rights for the new port, only the receive right. mach_port_insert_right and mach_port_extract_right can be used to convert the receive right into a combined send/receive right.

macroMACH_PORT_RIGHT_SEND_ONCE

#define MACH_PORT_RIGHT_SEND_ONCE ((mach_port_right_t) 2)

macroMACH_PORT_RIGHT_PORT_SET

#define MACH_PORT_RIGHT_PORT_SET ((mach_port_right_t) 3)
CMU/MIT Mach reference · manual page · © Carnegie Mellon
mach_port_allocate creates a port set. The new port set has no members.

macroMACH_PORT_RIGHT_DEAD_NAME

#define MACH_PORT_RIGHT_DEAD_NAME ((mach_port_right_t) 4)
CMU/MIT Mach reference · manual page · © Carnegie Mellon
mach_port_allocate creates a dead name. The new dead name has one user reference.

macroMACH_PORT_RIGHT_LABELH

#define MACH_PORT_RIGHT_LABELH ((mach_port_right_t) 5)
obsolete right

macroMACH_PORT_RIGHT_NUMBER

#define MACH_PORT_RIGHT_NUMBER ((mach_port_right_t) 6)
right not implemented

macroMACH_PORT_TYPE

#define MACH_PORT_TYPE(right) ((mach_port_type_t)(((mach_port_type_t) 1)
	<< ((right) + ((mach_port_right_t) 16))))

typedefmach_port_type_t

typedef natural_t mach_port_type_t

typedefmach_port_type_array_t

typedef mach_port_type_t *mach_port_type_array_t

macroMACH_PORT_TYPE_NONE

#define MACH_PORT_TYPE_NONE ((mach_port_type_t) 0L)

macroMACH_PORT_TYPE_LABELH

#define MACH_PORT_TYPE_LABELH MACH_PORT_TYPE(MACH_PORT_RIGHT_LABELH)
obsolete

macroMACH_PORT_TYPE_DNREQUEST

Dummy type bits that mach_port_type/mach_port_names can return.
#define MACH_PORT_TYPE_DNREQUEST 0x80000000

macroMACH_PORT_TYPE_SPREQUEST

#define MACH_PORT_TYPE_SPREQUEST 0x40000000

macroMACH_PORT_TYPE_SPREQUEST_DELAYED

#define MACH_PORT_TYPE_SPREQUEST_DELAYED 0x20000000

typedefmach_port_urefs_t

typedef natural_t mach_port_urefs_t

typedefmach_port_delta_t

typedef integer_t mach_port_delta_t
change in urefs

typedefmach_port_seqno_t

typedef natural_t mach_port_seqno_t
sequence number

typedefmach_port_mscount_t

typedef natural_t mach_port_mscount_t
make-send count

typedefmach_port_msgcount_t

typedef natural_t mach_port_msgcount_t
number of msgs

typedefmach_port_rights_t

typedef natural_t mach_port_rights_t
number of rights

macroMACH_PORT_SRIGHTS_NONE

Are there outstanding send rights for a given port?
#define MACH_PORT_SRIGHTS_NONE 0
no srights

macroMACH_PORT_SRIGHTS_PRESENT

#define MACH_PORT_SRIGHTS_PRESENT 1
srights

typedefmach_port_srights_t

typedef unsigned int mach_port_srights_t
status of send rights

structmach_port_status

size 40, align 4
mach_port_rights_tmps_psetcount of containing port sets
mach_port_seqno_tmps_seqnosequence number
mach_port_mscount_tmps_mscountmake-send count
mach_port_msgcount_tmps_qlimitqueue limit
mach_port_msgcount_tmps_msgcountnumber in the queue
mach_port_rights_tmps_sorightshow many send-once rights
boolean_tmps_srightsdo send rights exist?
boolean_tmps_pdrequestport-deleted requested?
boolean_tmps_nsrequestno-senders requested?
natural_tmps_flagsport flags
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Used to present a port's current status with respect to various important attributes.
The mach_port_status structure is used to provide information about a port in response to an invocation of the mach_port_get_attributes interface.
Notes. This structure is machine word length sensitive due to the presence of the port set name.

typedefmach_port_status_t

typedef struct mach_port_status mach_port_status_t;

macroMACH_PORT_QLIMIT_ZERO

System-wide values for setting queue limits on a port
#define MACH_PORT_QLIMIT_ZERO (0)

macroMACH_PORT_QLIMIT_BASIC

#define MACH_PORT_QLIMIT_BASIC (5)

macroMACH_PORT_QLIMIT_SMALL

#define MACH_PORT_QLIMIT_SMALL (16)

macroMACH_PORT_QLIMIT_LARGE

#define MACH_PORT_QLIMIT_LARGE (1024)

macroMACH_PORT_QLIMIT_KERNEL

#define MACH_PORT_QLIMIT_KERNEL (65534)

macroMACH_PORT_QLIMIT_MIN

#define MACH_PORT_QLIMIT_MIN MACH_PORT_QLIMIT_ZERO

macroMACH_PORT_QLIMIT_DEFAULT

#define MACH_PORT_QLIMIT_DEFAULT MACH_PORT_QLIMIT_BASIC

macroMACH_PORT_QLIMIT_MAX

#define MACH_PORT_QLIMIT_MAX MACH_PORT_QLIMIT_LARGE

structmach_port_limits

size 4, align 4
mach_port_msgcount_tmpl_qlimitnumber of msgs
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Specifies a port's resource and message queue limits.
The mach_port_limits structure defines various limits governing the messages that can be sent through the port. (In the current implementation, the structure maintains only a queue length limit.)

typedefmach_port_limits_t

typedef struct mach_port_limits mach_port_limits_t;

macroMACH_PORT_STATUS_FLAG_TEMPOWNER

Possible values for mps_flags (part of mach_port_status_t)
#define MACH_PORT_STATUS_FLAG_TEMPOWNER 0x01

macroMACH_PORT_STATUS_FLAG_GUARDED

#define MACH_PORT_STATUS_FLAG_GUARDED 0x02

macroMACH_PORT_STATUS_FLAG_STRICT_GUARD

#define MACH_PORT_STATUS_FLAG_STRICT_GUARD 0x04

macroMACH_PORT_STATUS_FLAG_IMP_DONATION

#define MACH_PORT_STATUS_FLAG_IMP_DONATION 0x08

macroMACH_PORT_STATUS_FLAG_REVIVE

#define MACH_PORT_STATUS_FLAG_REVIVE 0x10

macroMACH_PORT_STATUS_FLAG_TASKPTR

#define MACH_PORT_STATUS_FLAG_TASKPTR 0x20

macroMACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE

#define MACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE 0x40

macroMACH_PORT_STATUS_FLAG_NO_GRANT

#define MACH_PORT_STATUS_FLAG_NO_GRANT 0x80
Obsolete

structmach_port_info_ext

size 68, align 4
mach_port_status_tmpie_status
mach_port_msgcount_tmpie_boost_cnt
uint32_t[6]reserved

typedefmach_port_info_ext_t

typedef struct mach_port_info_ext mach_port_info_ext_t;

structmach_port_guard_info

size 8, align 8
uint64_tmpgi_guardguard value

typedefmach_port_guard_info_t

typedef struct mach_port_guard_info mach_port_guard_info_t;

typedefmach_port_info_t

typedef integer_t *mach_port_info_t
varying array of natural_t

typedefmach_port_flavor_t

Flavors for mach_port_get/set/assert_attributes()
typedef int mach_port_flavor_t
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Defined values:
MACH_PORT_LIMITS_INFOReturns the resource limits for the port. The declaration of this data is found in structure mach_port_limits.
MACH_PORT_RECEIVE_STATUSReturns random information about the rights and messages associated with the port. The declaration of this data is found in structure mach_port_status.

macroMACH_PORT_LIMITS_INFO

#define MACH_PORT_LIMITS_INFO 1
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Returns the resource limits for the port. The declaration of this data is found in structure mach_port_limits.

macroMACH_PORT_RECEIVE_STATUS

#define MACH_PORT_RECEIVE_STATUS 2
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Returns random information about the rights and messages associated with the port. The declaration of this data is found in structure mach_port_status.

macroMACH_PORT_DNREQUESTS_SIZE

#define MACH_PORT_DNREQUESTS_SIZE 3
info is int

macroMACH_PORT_TEMPOWNER

#define MACH_PORT_TEMPOWNER 4
indicates receive right will be reassigned to another task

macroMACH_PORT_IMPORTANCE_RECEIVER

#define MACH_PORT_IMPORTANCE_RECEIVER 5
indicates recieve right accepts priority donation

macroMACH_PORT_DENAP_RECEIVER

#define MACH_PORT_DENAP_RECEIVER 6
indicates receive right accepts de-nap donation

macroMACH_PORT_INFO_EXT

#define MACH_PORT_INFO_EXT 7

macroMACH_PORT_GUARD_INFO

#define MACH_PORT_GUARD_INFO 8
asserts if the strict guard value is correct

macroMACH_PORT_SERVICE_THROTTLED

#define MACH_PORT_SERVICE_THROTTLED 9
info is an integer that indicates if service port is throttled or not

macroMACH_PORT_LIMITS_INFO_COUNT

#define MACH_PORT_LIMITS_INFO_COUNT ((natural_t)
	(sizeof(mach_port_limits_t)/sizeof(natural_t)))

macroMACH_PORT_RECEIVE_STATUS_COUNT

#define MACH_PORT_RECEIVE_STATUS_COUNT ((natural_t)
	(sizeof(mach_port_status_t)/sizeof(natural_t)))

macroMACH_PORT_DNREQUESTS_SIZE_COUNT

#define MACH_PORT_DNREQUESTS_SIZE_COUNT 1

macroMACH_PORT_INFO_EXT_COUNT

#define MACH_PORT_INFO_EXT_COUNT ((natural_t)
	(sizeof(mach_port_info_ext_t)/sizeof(natural_t)))

macroMACH_PORT_GUARD_INFO_COUNT

#define MACH_PORT_GUARD_INFO_COUNT ((natural_t)
	(sizeof(mach_port_guard_info_t)/sizeof(natural_t)))

macroMACH_PORT_SERVICE_THROTTLED_COUNT

#define MACH_PORT_SERVICE_THROTTLED_COUNT 1

structmach_port_qos

Structure used to pass information about port allocation requests. Must be padded to 64-bits total length.
size 8, align 4
unsigned int:1namename given
unsigned int:1preallocprealloced message
boolean_t:30pad1
natural_tlen
CMU/MIT Mach reference · manual page · © Carnegie Mellon
Specifies a port's attributes with respect to "Quality Of Service."
The mach_port_qos structure is used to specify a port's "quality of service" attributes when allocating the port via the mach_port_allocate_qos interface.

typedefmach_port_qos_t

typedef struct mach_port_qos mach_port_qos_t;

macroMACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN

Structure used to pass information about the service port
#define MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN 255
Maximum length of the port string name buffer

structmach_service_port_info

size 256, align 1
char[255]mspi_string_nameService port's string name
uint8_tmspi_domain_typeService port domain

typedefmach_service_port_info_data_t

typedef struct mach_service_port_info mach_service_port_info_data_t;

macroMACH_SERVICE_PORT_INFO_COUNT

#define MACH_SERVICE_PORT_INFO_COUNT ((char)
	(sizeof(mach_service_port_info_data_t)/sizeof(char)))

typedefmach_service_port_info_t

typedef struct mach_service_port_info * mach_service_port_info_t

macroMACH_PORT_CONNECTION_PORT_WITH_PORT_ARRAY

Platform binaries are not allowed to send OOL port array to any port. MACH_MSG_OOL_PORTS_DESCRIPTOR are allowed to be sent ONLY to receive rights that are explicitly allow to receive that descriptor. Such ports have a dedicated port type, and are created using the MPO_CONNECTION_PORT_WITH_PORT_ARRAY flag. Creation of such ports requires the binary to have the following entitlement.
#define MACH_PORT_CONNECTION_PORT_WITH_PORT_ARRAY "com.apple.developer.allow-connection-port-with-port-array"

macroMACH_PORT_WEAK_REPLY_ENTITLEMENT

Allows 1p process to create weak reply port
#define MACH_PORT_WEAK_REPLY_ENTITLEMENT "com.apple.private.allow-weak-reply-port"

macroMPO_CONTEXT_AS_GUARD

MPO options flags
#define MPO_CONTEXT_AS_GUARD 0x01
Add guard to the port

macroMPO_QLIMIT

#define MPO_QLIMIT 0x02
Set qlimit for the port msg queue

macroMPO_TEMPOWNER

#define MPO_TEMPOWNER 0x04
Set the tempowner bit of the port

macroMPO_IMPORTANCE_RECEIVER

#define MPO_IMPORTANCE_RECEIVER 0x08
Mark the port as importance receiver

macroMPO_INSERT_SEND_RIGHT

#define MPO_INSERT_SEND_RIGHT 0x10
Insert a send right for the port

macroMPO_STRICT

#define MPO_STRICT 0x20
Apply strict guarding for port

macroMPO_DENAP_RECEIVER

#define MPO_DENAP_RECEIVER 0x40
Mark the port as App de-nap receiver

macroMPO_IMMOVABLE_RECEIVE

#define MPO_IMMOVABLE_RECEIVE 0x80
Mark the port as immovable; protected by the guard context

macroMPO_FILTER_MSG

#define MPO_FILTER_MSG 0x100
Allow message filtering

macroMPO_TG_BLOCK_TRACKING

#define MPO_TG_BLOCK_TRACKING 0x200
Track blocking relationship for thread group during sync IPC

macroMPO_ENFORCE_REPLY_PORT_SEMANTICS

#define MPO_ENFORCE_REPLY_PORT_SEMANTICS 0x2000
When talking to this port, local port of mach msg needs to follow reply port semantics.

macroMPO_STRICT_SERVICE_PORT

This service port has requested security hardening
#define MPO_STRICT_SERVICE_PORT (MPO_SERVICE_PORT | MPO_ENFORCE_REPLY_PORT_SEMANTICS)

macroMPO_MAKE_PORT_TYPE

MPO port type flags
#define MPO_MAKE_PORT_TYPE(a, b) (((a & 0x7) << 14) | ((b & 0x7) << 10))

macroMPO_PORT_TYPE_MASK

#define MPO_PORT_TYPE_MASK MPO_MAKE_PORT_TYPE(0x7, 0x7)
0x1dc00

macroMPO_PORT

These need to be defined for libxpc and other clients who `#ifdef`
#define MPO_PORT MPO_PORT

macroMPO_SERVICE_PORT

#define MPO_SERVICE_PORT MPO_SERVICE_PORT

macroMPO_CONNECTION_PORT

#define MPO_CONNECTION_PORT MPO_CONNECTION_PORT

macroMPO_REPLY_PORT

#define MPO_REPLY_PORT MPO_REPLY_PORT

macroMPO_WEAK_REPLY_PORT

#define MPO_WEAK_REPLY_PORT MPO_WEAK_REPLY_PORT

macroMPO_NOTIFICATION_PORT

#define MPO_NOTIFICATION_PORT MPO_NOTIFICATION_PORT

macroMPO_EXCEPTION_PORT

#define MPO_EXCEPTION_PORT MPO_EXCEPTION_PORT

macroMPO_CONNECTION_PORT_WITH_PORT_ARRAY

#define MPO_CONNECTION_PORT_WITH_PORT_ARRAY MPO_CONNECTION_PORT_WITH_PORT_ARRAY

enummpo_flags_t

underlying type uint32_t
MPO_PORT0
MPO_SERVICE_PORT1024
MPO_CONNECTION_PORT2048
MPO_REPLY_PORT4096
MPO_WEAK_REPLY_PORT16384
MPO_NOTIFICATION_PORT17408
MPO_EXCEPTION_PORT32768
MPO_CONNECTION_PORT_WITH_PORT_ARRAY65536

typedefmpo_flags_t

typedef enum mpo_flags_t mpo_flags_t;

macroMPO_PROVISIONAL_REPLY_PORT

For bincompat: weak reply port used to be called provisional reply port
#define MPO_PROVISIONAL_REPLY_PORT MPO_WEAK_REPLY_PORT

macroMPO_UNUSED_BITS

#define MPO_UNUSED_BITS ~(MPO_OPTIONS_MASK | MPO_PORT_TYPE_MASK)

macroMPO_ANONYMOUS_SERVICE

Denotes an anonymous service
#define MPO_ANONYMOUS_SERVICE (MACH_PORT_DEAD - 1)

structmach_port_options

Structure to define optional attributes for a newly constructed port.
size 24, align 8
uint32_tflags
mach_port_limits_tmplMessage queue limit for port

typedefmach_port_options_t

typedef struct mach_port_options mach_port_options_t;

typedefmach_port_options_ptr_t

typedef mach_port_options_t *mach_port_options_ptr_t

macroGUARD_TYPE_MACH_PORT

EXC_GUARD represents a guard violation for both mach ports and file descriptors. GUARD_TYPE_ is used to differentiate among them.
#define GUARD_TYPE_MACH_PORT 0x1

enummach_port_guard_exception_codes

Reasons for exception for a guarded mach port Arguments are documented in doc/mach_ipc/guard_exceptions.md, please update when adding a new type. Note: these had been designed as bitfields, hence the weird spaced values, but are truly an enum, please add new values in the "holes".
underlying type unsigned int
kGUARD_EXC_NONE0never sent
kGUARD_EXC_DESTROY1
kGUARD_EXC_MOD_REFS2
kGUARD_EXC_INVALID_OPTIONS3
kGUARD_EXC_SET_CONTEXT4
kGUARD_EXC_THREAD_SET_STATE5
kGUARD_EXC_EXCEPTION_BEHAVIOR_ENFORCE6
kGUARD_EXC_SERVICE_PORT_VIOLATION_FATAL7
kGUARD_EXC_UNGUARDED8
kGUARD_EXC_KOBJECT_REPLY_PORT_SEMANTICS9
kGUARD_EXC_REQUIRE_REPLY_PORT_SEMANTICS10
kGUARD_EXC_INCORRECT_GUARD16
kGUARD_EXC_IMMOVABLE32
kGUARD_EXC_STRICT_REPLY64
kGUARD_EXC_INVALID_NOTIFICATION_REQ65
kGUARD_EXC_INVALID_MPO_ENTITLEMENT66
kGUARD_EXC_DESCRIPTOR_VIOLATION67
kGUARD_EXC_MSG_FILTERED128
kGUARD_EXC_INVALID_RIGHT256start of [optionally] non-fatal guards
kGUARD_EXC_INVALID_NAME512
kGUARD_EXC_INVALID_VALUE1024
kGUARD_EXC_INVALID_ARGUMENT2048really kGUARD_EXC_ALREADY_GUARDED
kGUARD_EXC_RIGHT_EXISTS4096unused
kGUARD_EXC_KERN_NO_SPACE8192unused
kGUARD_EXC_KERN_FAILURE16384really kGUARD_EXC_INVALID_PDREQUEST
kGUARD_EXC_KERN_RESOURCE32768unused
kGUARD_EXC_SEND_INVALID_REPLY65536
kGUARD_EXC_SEND_INVALID_VOUCHER131072
kGUARD_EXC_SEND_INVALID_RIGHT262144
kGUARD_EXC_RCV_INVALID_NAME524288
kGUARD_EXC_RCV_GUARDED_DESC1048576start of always non-fatal guards for development only
kGUARD_EXC_SERVICE_PORT_VIOLATION_NON_FATAL1048577unused
kGUARD_EXC_INVALID_NOTIFICATION_PORT1048582
kGUARD_EXC_MACH_EXC_THREAD_SET_STATE1048583
kGUARD_EXC_CV_NOTIFICATION_PORT_REQ1048584
kGUARD_EXC_WEAK_REPLY_PORT1048578unused
kGUARD_EXC_OOL_PORT_ARRAY_CREATION1048579unused
kGUARD_EXC_MOVE_WEAK_REPLY_PORT1048580
kGUARD_EXC_REPLY_PORT_SINGLE_SO_RIGHT1048581
kGUARD_EXC_MOD_REFS_NON_FATAL2097152
kGUARD_EXC_IMMOVABLE_NON_FATAL4194304unused

macroMAX_FATAL_kGUARD_EXC_CODE

#define MAX_FATAL_kGUARD_EXC_CODE kGUARD_EXC_MSG_FILTERED

macroMAX_OPTIONAL_kGUARD_EXC_CODE

#define MAX_OPTIONAL_kGUARD_EXC_CODE kGUARD_EXC_RCV_INVALID_NAME

macrokGUARD_EXC_PROVISIONAL_REPLY_PORT

Temporary! Should be removed after rdar://166892063
#define kGUARD_EXC_PROVISIONAL_REPLY_PORT kGUARD_EXC_WEAK_REPLY_PORT

macrokGUARD_EXC_MOVE_PROVISIONAL_REPLY_PORT

#define kGUARD_EXC_MOVE_PROVISIONAL_REPLY_PORT kGUARD_EXC_MOVE_WEAK_REPLY_PORT

macroMPG_FLAGS_NONE

Mach port guard flags.
#define MPG_FLAGS_NONE 0x00

macroMPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER

These flags are used as bits in the subcode of kGUARD_EXC_STRICT_REPLY exceptions.
#define MPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER 0x04

macroMPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA

#define MPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA 0x10

macroMPG_FLAGS_MOD_REFS_PINNED_DEALLOC

These flags are used as bits in the subcode of kGUARD_EXC_MOD_REFS exceptions.
#define MPG_FLAGS_MOD_REFS_PINNED_DEALLOC 0x01

macroMPG_FLAGS_MOD_REFS_PINNED_DESTROY

#define MPG_FLAGS_MOD_REFS_PINNED_DESTROY 0x02

macroMPG_FLAGS_MOD_REFS_PINNED_COPYIN

#define MPG_FLAGS_MOD_REFS_PINNED_COPYIN 0x03

macroMPG_FLAGS_INVALID_RIGHT_RECV

These flags are used as bits in the subcode of kGUARD_EXC_INVALID_RIGHT exceptions.
#define MPG_FLAGS_INVALID_RIGHT_RECV 0x01
does not have receive right

macroMPG_FLAGS_INVALID_RIGHT_DELTA

#define MPG_FLAGS_INVALID_RIGHT_DELTA 0x02
ipc_right_delta()

macroMPG_FLAGS_INVALID_RIGHT_DESTRUCT

#define MPG_FLAGS_INVALID_RIGHT_DESTRUCT 0x03
ipc_right_destruct()

macroMPG_FLAGS_INVALID_RIGHT_COPYIN

#define MPG_FLAGS_INVALID_RIGHT_COPYIN 0x04
ipc_right_copyin()

macroMPG_FLAGS_INVALID_RIGHT_DEALLOC

#define MPG_FLAGS_INVALID_RIGHT_DEALLOC 0x05
ipc_right_dealloc()

macroMPG_FLAGS_INVALID_RIGHT_DEALLOC_KERNEL

#define MPG_FLAGS_INVALID_RIGHT_DEALLOC_KERNEL 0x06
mach_port_deallocate_kernel()

macroMPG_FLAGS_INVALID_RIGHT_TRANSLATE_PORT

#define MPG_FLAGS_INVALID_RIGHT_TRANSLATE_PORT 0x07
port in ipc_object_translate_port_pset()

macroMPG_FLAGS_INVALID_RIGHT_TRANSLATE_PSET

#define MPG_FLAGS_INVALID_RIGHT_TRANSLATE_PSET 0x08
pset in ipc_object_translate_port_pset()

macroMPG_FLAGS_INVALID_VALUE_PEEK

These flags are used as bits in the subcode of kGUARD_EXC_INVALID_VALUE exceptions.
#define MPG_FLAGS_INVALID_VALUE_PEEK 0x01

macroMPG_FLAGS_INVALID_VALUE_DELTA

#define MPG_FLAGS_INVALID_VALUE_DELTA 0x02
ipc_right_delta()

macroMPG_FLAGS_INVALID_VALUE_DESTRUCT

#define MPG_FLAGS_INVALID_VALUE_DESTRUCT 0x03
ipc_right_destruct()

macroMPG_FLAGS_KERN_FAILURE_TASK

These flags are used as bits in the subcode of kGUARD_EXC_KERN_FAILURE exceptions.
#define MPG_FLAGS_KERN_FAILURE_TASK 0x01
task other than launchd arm pd on service ports

macroMPG_FLAGS_KERN_FAILURE_NOTIFY_TYPE

#define MPG_FLAGS_KERN_FAILURE_NOTIFY_TYPE 0x02
not using IOT_NOTIFICATION_PORT for pd notification

macroMPG_FLAGS_KERN_FAILURE_NOTIFY_RECV

#define MPG_FLAGS_KERN_FAILURE_NOTIFY_RECV 0x03
notification port not owned by launchd

macroMPG_FLAGS_KERN_FAILURE_MULTI_NOTI

#define MPG_FLAGS_KERN_FAILURE_MULTI_NOTI 0x04
register multiple pd notification

macroMPG_FLAGS_SEND_INVALID_RIGHT_PORT

These flags are used as bits in the subcode of kGUARD_EXC_SEND_INVALID_RIGHT exceptions.
#define MPG_FLAGS_SEND_INVALID_RIGHT_PORT 0x01
ipc_kmsg_copyin_port_descriptor()

macroMPG_FLAGS_SEND_INVALID_RIGHT_OOL_PORT

#define MPG_FLAGS_SEND_INVALID_RIGHT_OOL_PORT 0x02
ipc_kmsg_copyin_ool_ports_descriptor()

macroMPG_FLAGS_SEND_INVALID_RIGHT_GUARDED

#define MPG_FLAGS_SEND_INVALID_RIGHT_GUARDED 0x03
ipc_kmsg_copyin_guarded_port_descriptor

macroMPG_FLAGS_INVALID_OPTIONS_OOL_DISP

These flags are used as bits in the subcode of kGUARD_EXC_INVALID_OPTIONS exceptions.
#define MPG_FLAGS_INVALID_OPTIONS_OOL_DISP 0x01
ipc_kmsg_copyin_ool_ports_descriptor()

macroMPG_FLAGS_INVALID_OPTIONS_OOL_ARRAYS

#define MPG_FLAGS_INVALID_OPTIONS_OOL_ARRAYS 0x02
ipc_validate_kmsg_header_from_user()

macroMPG_FLAGS_INVALID_OPTIONS_OOL_RIGHT

#define MPG_FLAGS_INVALID_OPTIONS_OOL_RIGHT 0x03
ipc_validate_kmsg_header_from_user()

macroMPG_STRICT

Flags for mach_port_guard_with_flags. These flags extend the attributes associated with a guarded port.
#define MPG_STRICT 0x01
Apply strict guarding for a port

macroMPG_IMMOVABLE_RECEIVE

#define MPG_IMMOVABLE_RECEIVE 0x02
Receive right cannot be moved out of the space