X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/80e2389990082500d76eb566d4946be3e786c3ef..d8f41ccd20de16f8ebe2ccc84d47bf1cb2b26bbb:/Security/libsecurity_utilities/lib/mach_notify.h diff --git a/Security/libsecurity_utilities/lib/mach_notify.h b/Security/libsecurity_utilities/lib/mach_notify.h new file mode 100644 index 00000000..86853c6b --- /dev/null +++ b/Security/libsecurity_utilities/lib/mach_notify.h @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2000-2001,2004,2011,2014 Apple Inc. All Rights Reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ + + +#ifndef _notify_user_ +#define _notify_user_ + +/* Module notify */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef AUTOTEST +#ifndef FUNCTION_PTR_T +#define FUNCTION_PTR_T +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); +typedef struct { + char *name; + function_ptr_t function; +} function_table_entry; +typedef function_table_entry *function_table_t; +#endif /* FUNCTION_PTR_T */ +#endif /* AUTOTEST */ + +#ifndef notify_MSG_COUNT +#define notify_MSG_COUNT 9 +#endif /* notify_MSG_COUNT */ + +#include + +#ifdef __BeforeMigUserHeader +__BeforeMigUserHeader +#endif /* __BeforeMigUserHeader */ + + +/* SimpleRoutine mach_notify_port_deleted */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_notify_port_deleted +( + mach_port_t notify, + mach_port_name_t name +); + +/* SimpleRoutine mach_notify_port_destroyed */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_notify_port_destroyed +( + mach_port_t notify, + mach_port_t rights, + mach_msg_type_name_t rightsPoly +); + +/* SimpleRoutine mach_notify_no_senders */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_notify_no_senders +( + mach_port_t notify, + mach_port_mscount_t mscount +); + +/* SimpleRoutine mach_notify_send_once */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_notify_send_once +( + mach_port_t notify +); + +/* SimpleRoutine mach_notify_dead_name */ +#ifdef mig_external +mig_external +#else +extern +#endif /* mig_external */ +kern_return_t mach_notify_dead_name +( + mach_port_t notify, + mach_port_name_t name +); + +#ifndef subsystem_to_name_map_notify +#define subsystem_to_name_map_notify \ + { "mach_notify_port_deleted", 65 },\ + { "mach_notify_port_destroyed", 69 },\ + { "mach_notify_no_senders", 70 },\ + { "mach_notify_send_once", 71 },\ + { "mach_notify_dead_name", 72 } +#endif + +#ifdef __AfterMigUserHeader +__AfterMigUserHeader +#endif /* __AfterMigUserHeader */ + +#endif /* _notify_user_ */