Voucher

A voucher.

Voucher.swift:174Voucher.md
class Voucher

Overview

A voucher is a kernel object that can be attached to a message using the Darwin/mach_msg_header_t/voucherPort property in the message header. A voucher is created from an array of command recipes. The commands are executed in sequence on an empty voucher to result in the desired voucher. Other subsequent commands can then be executed on the voucher.

Attributes

Vouchers contain attributes that are each managed in the kernel by an attribute manager. These attributes managers provide the functionality for initial recipe commands, as well as any subsequent commands executed on the voucher.

There are six attributes managers that are “well-known” to the kernel:

Attribute ManagerRecipe CommandsSubsequent Commands
atmVoucherATMAttributeRecipeCommandVoucherATMAction
importanceVoucherImportanceAttributeRecipeCommandVoucherImportanceAction
bankVoucherBankAttributeRecipeCommandVoucherBankAction
pthreadPriorityVoucherPthreadPriorityAttributeRecipeCommandNot Supported
userDataVoucherUserDataAttributeRecipeCommandNot Supported
testSame as userDataSame as userData

Creating Vouchers

Representing No Voucher

Getting The Recipes In A Voucher

Operating On A Voucher