/* * Copyright (c) 2024, Andrew Kaster * Copyright (c) 2024, Aliaksandr Kalenik * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #if !defined(AK_OS_MACH) # error "This file is only available on Mach platforms" #endif #include namespace IPC { struct MessageBodyWithSelfTaskPort { mach_msg_body_t body; mach_msg_port_descriptor_t port_descriptor; mach_msg_audit_trailer_t trailer; }; struct MessageWithSelfTaskPort { mach_msg_header_t header; mach_msg_body_t body; mach_msg_port_descriptor_t port_descriptor; }; struct ReceivedMachMessage { mach_msg_header_t header; MessageBodyWithSelfTaskPort body; }; struct MessageWithIPCChannelPorts { mach_msg_header_t header; mach_msg_body_t body; mach_msg_port_descriptor_t receive_port; mach_msg_port_descriptor_t send_port; }; struct ReceivedIPCChannelPortsMessage { mach_msg_header_t header; mach_msg_body_t body; mach_msg_port_descriptor_t receive_port; mach_msg_port_descriptor_t send_port; mach_msg_trailer_t trailer; }; static constexpr mach_msg_id_t SELF_TASK_PORT_MESSAGE_ID = 0x1234CAFE; static constexpr mach_msg_id_t IPC_CHANNEL_PORTS_MESSAGE_ID = 0x4950C002; }