Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/external/source/exploits/CVE-2016-4655/headers/IOKit/OSMessageNotification.h
Views: 11789
/*1* Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.2*3* @APPLE_OSREFERENCE_LICENSE_HEADER_START@4*5* This file contains Original Code and/or Modifications of Original Code6* as defined in and that are subject to the Apple Public Source License7* Version 2.0 (the 'License'). You may not use this file except in8* compliance with the License. The rights granted to you under the License9* may not be used to create, or enable the creation or redistribution of,10* unlawful or unlicensed copies of an Apple operating system, or to11* circumvent, violate, or enable the circumvention or violation of, any12* terms of an Apple operating system software license agreement.13*14* Please obtain a copy of the License at15* http://www.opensource.apple.com/apsl/ and read it before using this file.16*17* The Original Code and all software distributed under the License are18* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER19* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,20* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,21* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.22* Please see the License for the specific language governing rights and23* limitations under the License.24*25* @APPLE_OSREFERENCE_LICENSE_HEADER_END@26*/27/*28* Copyright (c) 1999 Apple Computer, Inc. All rights reserved.29*30* HISTORY31*32*/3334#ifndef __OS_OSMESSAGENOTIFICATION_H35#define __OS_OSMESSAGENOTIFICATION_H3637#ifdef __cplusplus38extern "C" {39#endif4041#include <mach/mach_types.h>42#include <device/device_types.h>43#include <IOKit/IOReturn.h>4445enum {46kFirstIOKitNotificationType = 100,47kIOServicePublishNotificationType = 100,48kIOServiceMatchedNotificationType = 101,49kIOServiceTerminatedNotificationType = 102,50kIOAsyncCompletionNotificationType = 150,51kIOServiceMessageNotificationType = 160,52kLastIOKitNotificationType = 199,5354// reserved bits55kIOKitNoticationTypeMask = 0x00000FFF,56kIOKitNoticationTypeSizeAdjShift = 30,57kIOKitNoticationMsgSizeMask = 3,58};5960enum {61kOSNotificationMessageID = 53,62kOSAsyncCompleteMessageID = 57,63kMaxAsyncArgs = 1664};6566enum {67kIOAsyncReservedIndex = 0,68kIOAsyncReservedCount,6970kIOAsyncCalloutFuncIndex = kIOAsyncReservedCount,71kIOAsyncCalloutRefconIndex,72kIOAsyncCalloutCount,7374kIOMatchingCalloutFuncIndex = kIOAsyncReservedCount,75kIOMatchingCalloutRefconIndex,76kIOMatchingCalloutCount,7778kIOInterestCalloutFuncIndex = kIOAsyncReservedCount,79kIOInterestCalloutRefconIndex,80kIOInterestCalloutServiceIndex,81kIOInterestCalloutCount82};83848586// --------------87enum {88kOSAsyncRef64Count = 8,89kOSAsyncRef64Size = kOSAsyncRef64Count * ((int) sizeof(io_user_reference_t))90};91typedef io_user_reference_t OSAsyncReference64[kOSAsyncRef64Count];9293struct OSNotificationHeader64 {94mach_msg_size_t size; /* content size */95natural_t type;96OSAsyncReference64 reference;9798#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)99unsigned char content[];100#else101unsigned char content[0];102#endif103};104105#pragma pack(4)106struct IOServiceInterestContent64 {107natural_t messageType;108io_user_reference_t messageArgument[1];109};110#pragma pack()111// --------------112113#if !KERNEL_USER32114115enum {116kOSAsyncRefCount = 8,117kOSAsyncRefSize = 32118};119typedef natural_t OSAsyncReference[kOSAsyncRefCount];120121struct OSNotificationHeader {122mach_msg_size_t size; /* content size */123natural_t type;124OSAsyncReference reference;125126#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)127unsigned char content[];128#else129unsigned char content[0];130#endif131};132133#pragma pack(4)134struct IOServiceInterestContent {135natural_t messageType;136void * messageArgument[1];137};138#pragma pack()139140#endif /* KERNEL_USER32 */141142struct IOAsyncCompletionContent {143IOReturn result;144#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)145void * args[] __attribute__ ((packed));146#else147void * args[0] __attribute__ ((packed));148#endif149};150151#ifndef __cplusplus152typedef struct OSNotificationHeader OSNotificationHeader;153typedef struct IOServiceInterestContent IOServiceInterestContent;154typedef struct IOAsyncCompletionContent IOAsyncCompletionContent;155#endif156157#ifdef __cplusplus158}159#endif160161#endif /* __OS_OSMESSAGENOTIFICATION_H */162163164165