mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-24 04:39:50 +00:00
Add some pre-generated MIG headers
Reason: CMake's dependency scanner doesn't detect that some of the headers are generated and it doesn't try to generate them for other targets that depend on them indirectly (e.g. libc) and therefore parallel builds will fail. The temporary solution is to check-in the generated headers into the source (just like we were doing before in `platform-include`). The proper solution would be to manually add dependencies for each target that needs the headers (which is pretty much *everything*), but that's ridiculous. Honestly, CMake should be able to detect this on its own, but whatever; this is a workaround.
This commit is contained in:
parent
22c72fc204
commit
7bf91da1d4
@ -0,0 +1,270 @@
|
||||
#ifndef _clock_user_
|
||||
#define _clock_user_
|
||||
|
||||
/* Module clock */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 clock_MSG_COUNT
|
||||
#define clock_MSG_COUNT 3
|
||||
#endif /* clock_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine clock_get_time */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t clock_get_time
|
||||
(
|
||||
clock_serv_t clock_serv,
|
||||
mach_timespec_t *cur_time
|
||||
);
|
||||
|
||||
/* Routine clock_get_attributes */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t clock_get_attributes
|
||||
(
|
||||
clock_serv_t clock_serv,
|
||||
clock_flavor_t flavor,
|
||||
clock_attr_t clock_attr,
|
||||
mach_msg_type_number_t *clock_attrCnt
|
||||
);
|
||||
|
||||
/* Routine clock_alarm */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t clock_alarm
|
||||
(
|
||||
clock_serv_t clock_serv,
|
||||
alarm_type_t alarm_type,
|
||||
mach_timespec_t alarm_time,
|
||||
clock_reply_t alarm_port
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__clock_subsystem__defined
|
||||
#define __Request__clock_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__clock_get_time_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
clock_flavor_t flavor;
|
||||
mach_msg_type_number_t clock_attrCnt;
|
||||
} __Request__clock_get_attributes_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t alarm_port;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
alarm_type_t alarm_type;
|
||||
mach_timespec_t alarm_time;
|
||||
} __Request__clock_alarm_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__clock_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__clock_subsystem__defined
|
||||
#define __RequestUnion__clock_subsystem__defined
|
||||
union __RequestUnion__clock_subsystem {
|
||||
__Request__clock_get_time_t Request_clock_get_time;
|
||||
__Request__clock_get_attributes_t Request_clock_get_attributes;
|
||||
__Request__clock_alarm_t Request_clock_alarm;
|
||||
};
|
||||
#endif /* !__RequestUnion__clock_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__clock_subsystem__defined
|
||||
#define __Reply__clock_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_timespec_t cur_time;
|
||||
} __Reply__clock_get_time_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_msg_type_number_t clock_attrCnt;
|
||||
int clock_attr[1];
|
||||
} __Reply__clock_get_attributes_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__clock_alarm_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__clock_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__clock_subsystem__defined
|
||||
#define __ReplyUnion__clock_subsystem__defined
|
||||
union __ReplyUnion__clock_subsystem {
|
||||
__Reply__clock_get_time_t Reply_clock_get_time;
|
||||
__Reply__clock_get_attributes_t Reply_clock_get_attributes;
|
||||
__Reply__clock_alarm_t Reply_clock_alarm;
|
||||
};
|
||||
#endif /* !__RequestUnion__clock_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_clock
|
||||
#define subsystem_to_name_map_clock \
|
||||
{ "clock_get_time", 1000 },\
|
||||
{ "clock_get_attributes", 1001 },\
|
||||
{ "clock_alarm", 1002 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _clock_user_ */
|
@ -0,0 +1,224 @@
|
||||
#ifndef _clock_priv_user_
|
||||
#define _clock_priv_user_
|
||||
|
||||
/* Module clock_priv */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 clock_priv_MSG_COUNT
|
||||
#define clock_priv_MSG_COUNT 2
|
||||
#endif /* clock_priv_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine clock_set_time */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t clock_set_time
|
||||
(
|
||||
clock_ctrl_t clock_ctrl,
|
||||
mach_timespec_t new_time
|
||||
);
|
||||
|
||||
/* Routine clock_set_attributes */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t clock_set_attributes
|
||||
(
|
||||
clock_ctrl_t clock_ctrl,
|
||||
clock_flavor_t flavor,
|
||||
clock_attr_t clock_attr,
|
||||
mach_msg_type_number_t clock_attrCnt
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__clock_priv_subsystem__defined
|
||||
#define __Request__clock_priv_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
mach_timespec_t new_time;
|
||||
} __Request__clock_set_time_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
clock_flavor_t flavor;
|
||||
mach_msg_type_number_t clock_attrCnt;
|
||||
int clock_attr[1];
|
||||
} __Request__clock_set_attributes_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__clock_priv_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__clock_priv_subsystem__defined
|
||||
#define __RequestUnion__clock_priv_subsystem__defined
|
||||
union __RequestUnion__clock_priv_subsystem {
|
||||
__Request__clock_set_time_t Request_clock_set_time;
|
||||
__Request__clock_set_attributes_t Request_clock_set_attributes;
|
||||
};
|
||||
#endif /* !__RequestUnion__clock_priv_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__clock_priv_subsystem__defined
|
||||
#define __Reply__clock_priv_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__clock_set_time_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__clock_set_attributes_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__clock_priv_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__clock_priv_subsystem__defined
|
||||
#define __ReplyUnion__clock_priv_subsystem__defined
|
||||
union __ReplyUnion__clock_priv_subsystem {
|
||||
__Reply__clock_set_time_t Reply_clock_set_time;
|
||||
__Reply__clock_set_attributes_t Reply_clock_set_attributes;
|
||||
};
|
||||
#endif /* !__RequestUnion__clock_priv_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_clock_priv
|
||||
#define subsystem_to_name_map_clock_priv \
|
||||
{ "clock_set_time", 1200 },\
|
||||
{ "clock_set_attributes", 1201 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _clock_priv_user_ */
|
@ -0,0 +1,184 @@
|
||||
#ifndef _clock_reply_user_
|
||||
#define _clock_reply_user_
|
||||
|
||||
/* Module clock_reply */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 clock_reply_MSG_COUNT
|
||||
#define clock_reply_MSG_COUNT 1
|
||||
#endif /* clock_reply_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* SimpleRoutine clock_alarm_reply */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t clock_alarm_reply
|
||||
(
|
||||
clock_reply_t alarm_port,
|
||||
mach_msg_type_name_t alarm_portPoly,
|
||||
kern_return_t alarm_code,
|
||||
alarm_type_t alarm_type,
|
||||
mach_timespec_t alarm_time
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__clock_reply_subsystem__defined
|
||||
#define __Request__clock_reply_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t alarm_code;
|
||||
alarm_type_t alarm_type;
|
||||
mach_timespec_t alarm_time;
|
||||
} __Request__clock_alarm_reply_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__clock_reply_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__clock_reply_subsystem__defined
|
||||
#define __RequestUnion__clock_reply_subsystem__defined
|
||||
union __RequestUnion__clock_reply_subsystem {
|
||||
__Request__clock_alarm_reply_t Request_clock_alarm_reply;
|
||||
};
|
||||
#endif /* !__RequestUnion__clock_reply_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__clock_reply_subsystem__defined
|
||||
#define __Reply__clock_reply_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__clock_alarm_reply_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__clock_reply_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__clock_reply_subsystem__defined
|
||||
#define __ReplyUnion__clock_reply_subsystem__defined
|
||||
union __ReplyUnion__clock_reply_subsystem {
|
||||
__Reply__clock_alarm_reply_t Reply_clock_alarm_reply;
|
||||
};
|
||||
#endif /* !__RequestUnion__clock_reply_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_clock_reply
|
||||
#define subsystem_to_name_map_clock_reply \
|
||||
{ "clock_alarm_reply", 3125107 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _clock_reply_user_ */
|
@ -0,0 +1,306 @@
|
||||
#ifndef _exc_user_
|
||||
#define _exc_user_
|
||||
|
||||
/* Module exc */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 exc_MSG_COUNT
|
||||
#define exc_MSG_COUNT 3
|
||||
#endif /* exc_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine exception_raise */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t exception_raise
|
||||
(
|
||||
mach_port_t exception_port,
|
||||
mach_port_t thread,
|
||||
mach_port_t task,
|
||||
exception_type_t exception,
|
||||
exception_data_t code,
|
||||
mach_msg_type_number_t codeCnt
|
||||
);
|
||||
|
||||
/* Routine exception_raise_state */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t exception_raise_state
|
||||
(
|
||||
mach_port_t exception_port,
|
||||
exception_type_t exception,
|
||||
const exception_data_t code,
|
||||
mach_msg_type_number_t codeCnt,
|
||||
int *flavor,
|
||||
const thread_state_t old_state,
|
||||
mach_msg_type_number_t old_stateCnt,
|
||||
thread_state_t new_state,
|
||||
mach_msg_type_number_t *new_stateCnt
|
||||
);
|
||||
|
||||
/* Routine exception_raise_state_identity */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t exception_raise_state_identity
|
||||
(
|
||||
mach_port_t exception_port,
|
||||
mach_port_t thread,
|
||||
mach_port_t task,
|
||||
exception_type_t exception,
|
||||
exception_data_t code,
|
||||
mach_msg_type_number_t codeCnt,
|
||||
int *flavor,
|
||||
thread_state_t old_state,
|
||||
mach_msg_type_number_t old_stateCnt,
|
||||
thread_state_t new_state,
|
||||
mach_msg_type_number_t *new_stateCnt
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__exc_subsystem__defined
|
||||
#define __Request__exc_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t thread;
|
||||
mach_msg_port_descriptor_t task;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
exception_type_t exception;
|
||||
mach_msg_type_number_t codeCnt;
|
||||
integer_t code[2];
|
||||
} __Request__exception_raise_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
exception_type_t exception;
|
||||
mach_msg_type_number_t codeCnt;
|
||||
integer_t code[2];
|
||||
int flavor;
|
||||
mach_msg_type_number_t old_stateCnt;
|
||||
natural_t old_state[614];
|
||||
} __Request__exception_raise_state_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t thread;
|
||||
mach_msg_port_descriptor_t task;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
exception_type_t exception;
|
||||
mach_msg_type_number_t codeCnt;
|
||||
integer_t code[2];
|
||||
int flavor;
|
||||
mach_msg_type_number_t old_stateCnt;
|
||||
natural_t old_state[614];
|
||||
} __Request__exception_raise_state_identity_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__exc_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__exc_subsystem__defined
|
||||
#define __RequestUnion__exc_subsystem__defined
|
||||
union __RequestUnion__exc_subsystem {
|
||||
__Request__exception_raise_t Request_exception_raise;
|
||||
__Request__exception_raise_state_t Request_exception_raise_state;
|
||||
__Request__exception_raise_state_identity_t Request_exception_raise_state_identity;
|
||||
};
|
||||
#endif /* !__RequestUnion__exc_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__exc_subsystem__defined
|
||||
#define __Reply__exc_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__exception_raise_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
int flavor;
|
||||
mach_msg_type_number_t new_stateCnt;
|
||||
natural_t new_state[614];
|
||||
} __Reply__exception_raise_state_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
int flavor;
|
||||
mach_msg_type_number_t new_stateCnt;
|
||||
natural_t new_state[614];
|
||||
} __Reply__exception_raise_state_identity_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__exc_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__exc_subsystem__defined
|
||||
#define __ReplyUnion__exc_subsystem__defined
|
||||
union __ReplyUnion__exc_subsystem {
|
||||
__Reply__exception_raise_t Reply_exception_raise;
|
||||
__Reply__exception_raise_state_t Reply_exception_raise_state;
|
||||
__Reply__exception_raise_state_identity_t Reply_exception_raise_state_identity;
|
||||
};
|
||||
#endif /* !__RequestUnion__exc_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_exc
|
||||
#define subsystem_to_name_map_exc \
|
||||
{ "exception_raise", 2401 },\
|
||||
{ "exception_raise_state", 2402 },\
|
||||
{ "exception_raise_state_identity", 2403 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _exc_user_ */
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,246 @@
|
||||
#ifndef _host_security_user_
|
||||
#define _host_security_user_
|
||||
|
||||
/* Module host_security */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 host_security_MSG_COUNT
|
||||
#define host_security_MSG_COUNT 2
|
||||
#endif /* host_security_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine host_security_create_task_token */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t host_security_create_task_token
|
||||
(
|
||||
host_security_t host_security,
|
||||
task_t parent_task,
|
||||
security_token_t sec_token,
|
||||
audit_token_t audit_token,
|
||||
host_t host,
|
||||
ledger_array_t ledgers,
|
||||
mach_msg_type_number_t ledgersCnt,
|
||||
boolean_t inherit_memory,
|
||||
task_t *child_task
|
||||
);
|
||||
|
||||
/* Routine host_security_set_task_token */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t host_security_set_task_token
|
||||
(
|
||||
host_security_t host_security,
|
||||
task_t target_task,
|
||||
security_token_t sec_token,
|
||||
audit_token_t audit_token,
|
||||
host_t host
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__host_security_subsystem__defined
|
||||
#define __Request__host_security_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t parent_task;
|
||||
mach_msg_port_descriptor_t host;
|
||||
mach_msg_ool_ports_descriptor_t ledgers;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
security_token_t sec_token;
|
||||
audit_token_t audit_token;
|
||||
mach_msg_type_number_t ledgersCnt;
|
||||
boolean_t inherit_memory;
|
||||
} __Request__host_security_create_task_token_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t target_task;
|
||||
mach_msg_port_descriptor_t host;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
security_token_t sec_token;
|
||||
audit_token_t audit_token;
|
||||
} __Request__host_security_set_task_token_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__host_security_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__host_security_subsystem__defined
|
||||
#define __RequestUnion__host_security_subsystem__defined
|
||||
union __RequestUnion__host_security_subsystem {
|
||||
__Request__host_security_create_task_token_t Request_host_security_create_task_token;
|
||||
__Request__host_security_set_task_token_t Request_host_security_set_task_token;
|
||||
};
|
||||
#endif /* !__RequestUnion__host_security_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__host_security_subsystem__defined
|
||||
#define __Reply__host_security_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t child_task;
|
||||
/* end of the kernel processed data */
|
||||
} __Reply__host_security_create_task_token_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__host_security_set_task_token_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__host_security_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__host_security_subsystem__defined
|
||||
#define __ReplyUnion__host_security_subsystem__defined
|
||||
union __ReplyUnion__host_security_subsystem {
|
||||
__Reply__host_security_create_task_token_t Reply_host_security_create_task_token;
|
||||
__Reply__host_security_set_task_token_t Reply_host_security_set_task_token;
|
||||
};
|
||||
#endif /* !__RequestUnion__host_security_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_host_security
|
||||
#define subsystem_to_name_map_host_security \
|
||||
{ "host_security_create_task_token", 600 },\
|
||||
{ "host_security_set_task_token", 601 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _host_security_user_ */
|
@ -0,0 +1,375 @@
|
||||
#ifndef _lock_set_user_
|
||||
#define _lock_set_user_
|
||||
|
||||
/* Module lock_set */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 lock_set_MSG_COUNT
|
||||
#define lock_set_MSG_COUNT 6
|
||||
#endif /* lock_set_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine lock_acquire */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_acquire
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_release */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_release
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_try */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_try
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_make_stable */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_make_stable
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_handoff */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_handoff
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
/* Routine lock_handoff_accept */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t lock_handoff_accept
|
||||
(
|
||||
lock_set_t lock_set,
|
||||
int lock_id
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__lock_set_subsystem__defined
|
||||
#define __Request__lock_set_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_acquire_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_release_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_try_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_make_stable_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_handoff_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int lock_id;
|
||||
} __Request__lock_handoff_accept_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__lock_set_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__lock_set_subsystem__defined
|
||||
#define __RequestUnion__lock_set_subsystem__defined
|
||||
union __RequestUnion__lock_set_subsystem {
|
||||
__Request__lock_acquire_t Request_lock_acquire;
|
||||
__Request__lock_release_t Request_lock_release;
|
||||
__Request__lock_try_t Request_lock_try;
|
||||
__Request__lock_make_stable_t Request_lock_make_stable;
|
||||
__Request__lock_handoff_t Request_lock_handoff;
|
||||
__Request__lock_handoff_accept_t Request_lock_handoff_accept;
|
||||
};
|
||||
#endif /* !__RequestUnion__lock_set_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__lock_set_subsystem__defined
|
||||
#define __Reply__lock_set_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_acquire_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_release_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_try_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_make_stable_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_handoff_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__lock_handoff_accept_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__lock_set_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__lock_set_subsystem__defined
|
||||
#define __ReplyUnion__lock_set_subsystem__defined
|
||||
union __ReplyUnion__lock_set_subsystem {
|
||||
__Reply__lock_acquire_t Reply_lock_acquire;
|
||||
__Reply__lock_release_t Reply_lock_release;
|
||||
__Reply__lock_try_t Reply_lock_try;
|
||||
__Reply__lock_make_stable_t Reply_lock_make_stable;
|
||||
__Reply__lock_handoff_t Reply_lock_handoff;
|
||||
__Reply__lock_handoff_accept_t Reply_lock_handoff_accept;
|
||||
};
|
||||
#endif /* !__RequestUnion__lock_set_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_lock_set
|
||||
#define subsystem_to_name_map_lock_set \
|
||||
{ "lock_acquire", 617000 },\
|
||||
{ "lock_release", 617001 },\
|
||||
{ "lock_try", 617002 },\
|
||||
{ "lock_make_stable", 617003 },\
|
||||
{ "lock_handoff", 617004 },\
|
||||
{ "lock_handoff_accept", 617005 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _lock_set_user_ */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,365 @@
|
||||
#ifndef _mach_voucher_user_
|
||||
#define _mach_voucher_user_
|
||||
|
||||
/* Module mach_voucher */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 mach_voucher_MSG_COUNT
|
||||
#define mach_voucher_MSG_COUNT 5
|
||||
#endif /* mach_voucher_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine mach_voucher_extract_attr_content */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t mach_voucher_extract_attr_content
|
||||
(
|
||||
ipc_voucher_t voucher,
|
||||
mach_voucher_attr_key_t key,
|
||||
mach_voucher_attr_content_t content,
|
||||
mach_msg_type_number_t *contentCnt
|
||||
);
|
||||
|
||||
/* Routine mach_voucher_extract_attr_recipe */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t mach_voucher_extract_attr_recipe
|
||||
(
|
||||
ipc_voucher_t voucher,
|
||||
mach_voucher_attr_key_t key,
|
||||
mach_voucher_attr_raw_recipe_t recipe,
|
||||
mach_msg_type_number_t *recipeCnt
|
||||
);
|
||||
|
||||
/* Routine mach_voucher_extract_all_attr_recipes */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t mach_voucher_extract_all_attr_recipes
|
||||
(
|
||||
ipc_voucher_t voucher,
|
||||
mach_voucher_attr_raw_recipe_array_t recipes,
|
||||
mach_msg_type_number_t *recipesCnt
|
||||
);
|
||||
|
||||
/* Routine mach_voucher_attr_command */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t mach_voucher_attr_command
|
||||
(
|
||||
ipc_voucher_t voucher,
|
||||
mach_voucher_attr_key_t key,
|
||||
mach_voucher_attr_command_t command,
|
||||
mach_voucher_attr_content_t in_content,
|
||||
mach_msg_type_number_t in_contentCnt,
|
||||
mach_voucher_attr_content_t out_content,
|
||||
mach_msg_type_number_t *out_contentCnt
|
||||
);
|
||||
|
||||
/* Routine mach_voucher_debug_info */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t mach_voucher_debug_info
|
||||
(
|
||||
ipc_space_t task,
|
||||
mach_port_name_t voucher_name,
|
||||
mach_voucher_attr_raw_recipe_array_t recipes,
|
||||
mach_msg_type_number_t *recipesCnt
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__mach_voucher_subsystem__defined
|
||||
#define __Request__mach_voucher_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
mach_voucher_attr_key_t key;
|
||||
mach_msg_type_number_t contentCnt;
|
||||
} __Request__mach_voucher_extract_attr_content_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
mach_voucher_attr_key_t key;
|
||||
mach_msg_type_number_t recipeCnt;
|
||||
} __Request__mach_voucher_extract_attr_recipe_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
mach_msg_type_number_t recipesCnt;
|
||||
} __Request__mach_voucher_extract_all_attr_recipes_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
mach_voucher_attr_key_t key;
|
||||
mach_voucher_attr_command_t command;
|
||||
mach_msg_type_number_t in_contentCnt;
|
||||
uint8_t in_content[4096];
|
||||
mach_msg_type_number_t out_contentCnt;
|
||||
} __Request__mach_voucher_attr_command_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
mach_port_name_t voucher_name;
|
||||
mach_msg_type_number_t recipesCnt;
|
||||
} __Request__mach_voucher_debug_info_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__mach_voucher_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__mach_voucher_subsystem__defined
|
||||
#define __RequestUnion__mach_voucher_subsystem__defined
|
||||
union __RequestUnion__mach_voucher_subsystem {
|
||||
__Request__mach_voucher_extract_attr_content_t Request_mach_voucher_extract_attr_content;
|
||||
__Request__mach_voucher_extract_attr_recipe_t Request_mach_voucher_extract_attr_recipe;
|
||||
__Request__mach_voucher_extract_all_attr_recipes_t Request_mach_voucher_extract_all_attr_recipes;
|
||||
__Request__mach_voucher_attr_command_t Request_mach_voucher_attr_command;
|
||||
__Request__mach_voucher_debug_info_t Request_mach_voucher_debug_info;
|
||||
};
|
||||
#endif /* !__RequestUnion__mach_voucher_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__mach_voucher_subsystem__defined
|
||||
#define __Reply__mach_voucher_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_msg_type_number_t contentCnt;
|
||||
uint8_t content[4096];
|
||||
} __Reply__mach_voucher_extract_attr_content_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_msg_type_number_t recipeCnt;
|
||||
uint8_t recipe[4096];
|
||||
} __Reply__mach_voucher_extract_attr_recipe_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_msg_type_number_t recipesCnt;
|
||||
uint8_t recipes[5120];
|
||||
} __Reply__mach_voucher_extract_all_attr_recipes_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_msg_type_number_t out_contentCnt;
|
||||
uint8_t out_content[4096];
|
||||
} __Reply__mach_voucher_attr_command_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_msg_type_number_t recipesCnt;
|
||||
uint8_t recipes[5120];
|
||||
} __Reply__mach_voucher_debug_info_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__mach_voucher_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__mach_voucher_subsystem__defined
|
||||
#define __ReplyUnion__mach_voucher_subsystem__defined
|
||||
union __ReplyUnion__mach_voucher_subsystem {
|
||||
__Reply__mach_voucher_extract_attr_content_t Reply_mach_voucher_extract_attr_content;
|
||||
__Reply__mach_voucher_extract_attr_recipe_t Reply_mach_voucher_extract_attr_recipe;
|
||||
__Reply__mach_voucher_extract_all_attr_recipes_t Reply_mach_voucher_extract_all_attr_recipes;
|
||||
__Reply__mach_voucher_attr_command_t Reply_mach_voucher_attr_command;
|
||||
__Reply__mach_voucher_debug_info_t Reply_mach_voucher_debug_info;
|
||||
};
|
||||
#endif /* !__RequestUnion__mach_voucher_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_mach_voucher
|
||||
#define subsystem_to_name_map_mach_voucher \
|
||||
{ "mach_voucher_extract_attr_content", 5400 },\
|
||||
{ "mach_voucher_extract_attr_recipe", 5401 },\
|
||||
{ "mach_voucher_extract_all_attr_recipes", 5402 },\
|
||||
{ "mach_voucher_attr_command", 5403 },\
|
||||
{ "mach_voucher_debug_info", 5404 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _mach_voucher_user_ */
|
@ -0,0 +1,274 @@
|
||||
#ifndef _memory_entry_user_
|
||||
#define _memory_entry_user_
|
||||
|
||||
/* Module memory_entry */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 memory_entry_MSG_COUNT
|
||||
#define memory_entry_MSG_COUNT 3
|
||||
#endif /* memory_entry_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach_debug/mach_debug_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine mach_memory_entry_purgable_control */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t mach_memory_entry_purgable_control
|
||||
(
|
||||
mem_entry_name_port_t mem_entry,
|
||||
vm_purgable_t control,
|
||||
int *state
|
||||
);
|
||||
|
||||
/* Routine mach_memory_entry_access_tracking */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t mach_memory_entry_access_tracking
|
||||
(
|
||||
mem_entry_name_port_t mem_entry,
|
||||
int *access_tracking,
|
||||
uint32_t *access_tracking_reads,
|
||||
uint32_t *access_tracking_writes
|
||||
);
|
||||
|
||||
/* Routine mach_memory_entry_ownership */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t mach_memory_entry_ownership
|
||||
(
|
||||
mem_entry_name_port_t mem_entry,
|
||||
task_t owner,
|
||||
int ledger_tag,
|
||||
int ledger_flags
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__memory_entry_subsystem__defined
|
||||
#define __Request__memory_entry_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
vm_purgable_t control;
|
||||
int state;
|
||||
} __Request__mach_memory_entry_purgable_control_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int access_tracking;
|
||||
} __Request__mach_memory_entry_access_tracking_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t owner;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
int ledger_tag;
|
||||
int ledger_flags;
|
||||
} __Request__mach_memory_entry_ownership_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__memory_entry_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__memory_entry_subsystem__defined
|
||||
#define __RequestUnion__memory_entry_subsystem__defined
|
||||
union __RequestUnion__memory_entry_subsystem {
|
||||
__Request__mach_memory_entry_purgable_control_t Request_mach_memory_entry_purgable_control;
|
||||
__Request__mach_memory_entry_access_tracking_t Request_mach_memory_entry_access_tracking;
|
||||
__Request__mach_memory_entry_ownership_t Request_mach_memory_entry_ownership;
|
||||
};
|
||||
#endif /* !__RequestUnion__memory_entry_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__memory_entry_subsystem__defined
|
||||
#define __Reply__memory_entry_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
int state;
|
||||
} __Reply__mach_memory_entry_purgable_control_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
int access_tracking;
|
||||
uint32_t access_tracking_reads;
|
||||
uint32_t access_tracking_writes;
|
||||
} __Reply__mach_memory_entry_access_tracking_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__mach_memory_entry_ownership_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__memory_entry_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__memory_entry_subsystem__defined
|
||||
#define __ReplyUnion__memory_entry_subsystem__defined
|
||||
union __ReplyUnion__memory_entry_subsystem {
|
||||
__Reply__mach_memory_entry_purgable_control_t Reply_mach_memory_entry_purgable_control;
|
||||
__Reply__mach_memory_entry_access_tracking_t Reply_mach_memory_entry_access_tracking;
|
||||
__Reply__mach_memory_entry_ownership_t Reply_mach_memory_entry_ownership;
|
||||
};
|
||||
#endif /* !__RequestUnion__memory_entry_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_memory_entry
|
||||
#define subsystem_to_name_map_memory_entry \
|
||||
{ "mach_memory_entry_purgable_control", 4900 },\
|
||||
{ "mach_memory_entry_access_tracking", 4901 },\
|
||||
{ "mach_memory_entry_ownership", 4902 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _memory_entry_user_ */
|
@ -0,0 +1,385 @@
|
||||
#ifndef _processor_user_
|
||||
#define _processor_user_
|
||||
|
||||
/* Module processor */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 processor_MSG_COUNT
|
||||
#define processor_MSG_COUNT 6
|
||||
#endif /* processor_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine processor_start */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_start
|
||||
(
|
||||
processor_t processor
|
||||
);
|
||||
|
||||
/* Routine processor_exit */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_exit
|
||||
(
|
||||
processor_t processor
|
||||
);
|
||||
|
||||
/* Routine processor_info */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_info
|
||||
(
|
||||
processor_t processor,
|
||||
processor_flavor_t flavor,
|
||||
host_t *host,
|
||||
processor_info_t processor_info_out,
|
||||
mach_msg_type_number_t *processor_info_outCnt
|
||||
);
|
||||
|
||||
/* Routine processor_control */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_control
|
||||
(
|
||||
processor_t processor,
|
||||
processor_info_t processor_cmd,
|
||||
mach_msg_type_number_t processor_cmdCnt
|
||||
);
|
||||
|
||||
/* Routine processor_assign */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_assign
|
||||
(
|
||||
processor_t processor,
|
||||
processor_set_t new_set,
|
||||
boolean_t wait
|
||||
);
|
||||
|
||||
/* Routine processor_get_assignment */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_get_assignment
|
||||
(
|
||||
processor_t processor,
|
||||
processor_set_name_t *assigned_set
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__processor_subsystem__defined
|
||||
#define __Request__processor_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__processor_start_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__processor_exit_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
processor_flavor_t flavor;
|
||||
mach_msg_type_number_t processor_info_outCnt;
|
||||
} __Request__processor_info_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
mach_msg_type_number_t processor_cmdCnt;
|
||||
integer_t processor_cmd[20];
|
||||
} __Request__processor_control_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t new_set;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
boolean_t wait;
|
||||
} __Request__processor_assign_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__processor_get_assignment_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__processor_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__processor_subsystem__defined
|
||||
#define __RequestUnion__processor_subsystem__defined
|
||||
union __RequestUnion__processor_subsystem {
|
||||
__Request__processor_start_t Request_processor_start;
|
||||
__Request__processor_exit_t Request_processor_exit;
|
||||
__Request__processor_info_t Request_processor_info;
|
||||
__Request__processor_control_t Request_processor_control;
|
||||
__Request__processor_assign_t Request_processor_assign;
|
||||
__Request__processor_get_assignment_t Request_processor_get_assignment;
|
||||
};
|
||||
#endif /* !__RequestUnion__processor_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__processor_subsystem__defined
|
||||
#define __Reply__processor_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__processor_start_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__processor_exit_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t host;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
mach_msg_type_number_t processor_info_outCnt;
|
||||
integer_t processor_info_out[20];
|
||||
} __Reply__processor_info_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__processor_control_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__processor_assign_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t assigned_set;
|
||||
/* end of the kernel processed data */
|
||||
} __Reply__processor_get_assignment_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__processor_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__processor_subsystem__defined
|
||||
#define __ReplyUnion__processor_subsystem__defined
|
||||
union __ReplyUnion__processor_subsystem {
|
||||
__Reply__processor_start_t Reply_processor_start;
|
||||
__Reply__processor_exit_t Reply_processor_exit;
|
||||
__Reply__processor_info_t Reply_processor_info;
|
||||
__Reply__processor_control_t Reply_processor_control;
|
||||
__Reply__processor_assign_t Reply_processor_assign;
|
||||
__Reply__processor_get_assignment_t Reply_processor_get_assignment;
|
||||
};
|
||||
#endif /* !__RequestUnion__processor_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_processor
|
||||
#define subsystem_to_name_map_processor \
|
||||
{ "processor_start", 3000 },\
|
||||
{ "processor_exit", 3001 },\
|
||||
{ "processor_info", 3002 },\
|
||||
{ "processor_control", 3003 },\
|
||||
{ "processor_assign", 3004 },\
|
||||
{ "processor_get_assignment", 3005 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _processor_user_ */
|
@ -0,0 +1,565 @@
|
||||
#ifndef _processor_set_user_
|
||||
#define _processor_set_user_
|
||||
|
||||
/* Module processor_set */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 processor_set_MSG_COUNT
|
||||
#define processor_set_MSG_COUNT 10
|
||||
#endif /* processor_set_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mig.h>
|
||||
#include <mach/mach_types.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine processor_set_statistics */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_statistics
|
||||
(
|
||||
processor_set_name_t pset,
|
||||
processor_set_flavor_t flavor,
|
||||
processor_set_info_t info_out,
|
||||
mach_msg_type_number_t *info_outCnt
|
||||
);
|
||||
|
||||
/* Routine processor_set_destroy */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_destroy
|
||||
(
|
||||
processor_set_t set
|
||||
);
|
||||
|
||||
/* Routine processor_set_max_priority */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_max_priority
|
||||
(
|
||||
processor_set_t processor_set,
|
||||
int max_priority,
|
||||
boolean_t change_threads
|
||||
);
|
||||
|
||||
/* Routine processor_set_policy_enable */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_policy_enable
|
||||
(
|
||||
processor_set_t processor_set,
|
||||
int policy
|
||||
);
|
||||
|
||||
/* Routine processor_set_policy_disable */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_policy_disable
|
||||
(
|
||||
processor_set_t processor_set,
|
||||
int policy,
|
||||
boolean_t change_threads
|
||||
);
|
||||
|
||||
/* Routine processor_set_tasks */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_tasks
|
||||
(
|
||||
processor_set_t processor_set,
|
||||
task_array_t *task_list,
|
||||
mach_msg_type_number_t *task_listCnt
|
||||
);
|
||||
|
||||
/* Routine processor_set_threads */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_threads
|
||||
(
|
||||
processor_set_t processor_set,
|
||||
thread_act_array_t *thread_list,
|
||||
mach_msg_type_number_t *thread_listCnt
|
||||
);
|
||||
|
||||
/* Routine processor_set_policy_control */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_policy_control
|
||||
(
|
||||
processor_set_t pset,
|
||||
processor_set_flavor_t flavor,
|
||||
processor_set_info_t policy_info,
|
||||
mach_msg_type_number_t policy_infoCnt,
|
||||
boolean_t change
|
||||
);
|
||||
|
||||
/* Routine processor_set_stack_usage */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_stack_usage
|
||||
(
|
||||
processor_set_t pset,
|
||||
unsigned *ltotal,
|
||||
vm_size_t *space,
|
||||
vm_size_t *resident,
|
||||
vm_size_t *maxusage,
|
||||
vm_offset_t *maxstack
|
||||
);
|
||||
|
||||
/* Routine processor_set_info */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t processor_set_info
|
||||
(
|
||||
processor_set_name_t set_name,
|
||||
int flavor,
|
||||
host_t *host,
|
||||
processor_set_info_t info_out,
|
||||
mach_msg_type_number_t *info_outCnt
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__processor_set_subsystem__defined
|
||||
#define __Request__processor_set_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
processor_set_flavor_t flavor;
|
||||
mach_msg_type_number_t info_outCnt;
|
||||
} __Request__processor_set_statistics_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__processor_set_destroy_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int max_priority;
|
||||
boolean_t change_threads;
|
||||
} __Request__processor_set_max_priority_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int policy;
|
||||
} __Request__processor_set_policy_enable_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int policy;
|
||||
boolean_t change_threads;
|
||||
} __Request__processor_set_policy_disable_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__processor_set_tasks_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__processor_set_threads_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
processor_set_flavor_t flavor;
|
||||
mach_msg_type_number_t policy_infoCnt;
|
||||
integer_t policy_info[5];
|
||||
boolean_t change;
|
||||
} __Request__processor_set_policy_control_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__processor_set_stack_usage_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
int flavor;
|
||||
mach_msg_type_number_t info_outCnt;
|
||||
} __Request__processor_set_info_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__processor_set_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__processor_set_subsystem__defined
|
||||
#define __RequestUnion__processor_set_subsystem__defined
|
||||
union __RequestUnion__processor_set_subsystem {
|
||||
__Request__processor_set_statistics_t Request_processor_set_statistics;
|
||||
__Request__processor_set_destroy_t Request_processor_set_destroy;
|
||||
__Request__processor_set_max_priority_t Request_processor_set_max_priority;
|
||||
__Request__processor_set_policy_enable_t Request_processor_set_policy_enable;
|
||||
__Request__processor_set_policy_disable_t Request_processor_set_policy_disable;
|
||||
__Request__processor_set_tasks_t Request_processor_set_tasks;
|
||||
__Request__processor_set_threads_t Request_processor_set_threads;
|
||||
__Request__processor_set_policy_control_t Request_processor_set_policy_control;
|
||||
__Request__processor_set_stack_usage_t Request_processor_set_stack_usage;
|
||||
__Request__processor_set_info_t Request_processor_set_info;
|
||||
};
|
||||
#endif /* !__RequestUnion__processor_set_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__processor_set_subsystem__defined
|
||||
#define __Reply__processor_set_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_msg_type_number_t info_outCnt;
|
||||
integer_t info_out[5];
|
||||
} __Reply__processor_set_statistics_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__processor_set_destroy_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__processor_set_max_priority_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__processor_set_policy_enable_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__processor_set_policy_disable_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_ool_ports_descriptor_t task_list;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
mach_msg_type_number_t task_listCnt;
|
||||
} __Reply__processor_set_tasks_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_ool_ports_descriptor_t thread_list;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
mach_msg_type_number_t thread_listCnt;
|
||||
} __Reply__processor_set_threads_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__processor_set_policy_control_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
unsigned ltotal;
|
||||
vm_size_t space;
|
||||
vm_size_t resident;
|
||||
vm_size_t maxusage;
|
||||
vm_offset_t maxstack;
|
||||
} __Reply__processor_set_stack_usage_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t host;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
mach_msg_type_number_t info_outCnt;
|
||||
integer_t info_out[5];
|
||||
} __Reply__processor_set_info_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__processor_set_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__processor_set_subsystem__defined
|
||||
#define __ReplyUnion__processor_set_subsystem__defined
|
||||
union __ReplyUnion__processor_set_subsystem {
|
||||
__Reply__processor_set_statistics_t Reply_processor_set_statistics;
|
||||
__Reply__processor_set_destroy_t Reply_processor_set_destroy;
|
||||
__Reply__processor_set_max_priority_t Reply_processor_set_max_priority;
|
||||
__Reply__processor_set_policy_enable_t Reply_processor_set_policy_enable;
|
||||
__Reply__processor_set_policy_disable_t Reply_processor_set_policy_disable;
|
||||
__Reply__processor_set_tasks_t Reply_processor_set_tasks;
|
||||
__Reply__processor_set_threads_t Reply_processor_set_threads;
|
||||
__Reply__processor_set_policy_control_t Reply_processor_set_policy_control;
|
||||
__Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage;
|
||||
__Reply__processor_set_info_t Reply_processor_set_info;
|
||||
};
|
||||
#endif /* !__RequestUnion__processor_set_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_processor_set
|
||||
#define subsystem_to_name_map_processor_set \
|
||||
{ "processor_set_statistics", 4000 },\
|
||||
{ "processor_set_destroy", 4001 },\
|
||||
{ "processor_set_max_priority", 4002 },\
|
||||
{ "processor_set_policy_enable", 4003 },\
|
||||
{ "processor_set_policy_disable", 4004 },\
|
||||
{ "processor_set_tasks", 4005 },\
|
||||
{ "processor_set_threads", 4006 },\
|
||||
{ "processor_set_policy_control", 4007 },\
|
||||
{ "processor_set_stack_usage", 4008 },\
|
||||
{ "processor_set_info", 4009 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _processor_set_user_ */
|
@ -0,0 +1,322 @@
|
||||
#ifndef _netname_user_
|
||||
#define _netname_user_
|
||||
|
||||
/* Module netname */
|
||||
|
||||
#include <string.h>
|
||||
#include <mach/ndr.h>
|
||||
#include <mach/boolean.h>
|
||||
#include <mach/kern_return.h>
|
||||
#include <mach/notify.h>
|
||||
#include <mach/mach_types.h>
|
||||
#include <mach/message.h>
|
||||
#include <mach/mig_errors.h>
|
||||
#include <mach/port.h>
|
||||
|
||||
/* BEGIN VOUCHER CODE */
|
||||
|
||||
#ifndef KERNEL
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_voucher_support.h>)
|
||||
#ifndef USING_VOUCHERS
|
||||
#define USING_VOUCHERS
|
||||
#endif
|
||||
#ifndef __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#define __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif // __VOUCHER_FORWARD_TYPE_DECLS__
|
||||
#endif // __has_include(<mach/mach_voucher_types.h>)
|
||||
#endif // __has_include
|
||||
#endif // !KERNEL
|
||||
|
||||
/* END VOUCHER CODE */
|
||||
|
||||
|
||||
/* BEGIN MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<mach/mig_strncpy_zerofill_support.h>)
|
||||
#ifndef USING_MIG_STRNCPY_ZEROFILL
|
||||
#define USING_MIG_STRNCPY_ZEROFILL
|
||||
#endif
|
||||
#ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */
|
||||
#endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */
|
||||
#endif /* __has_include */
|
||||
|
||||
/* END MIG_STRNCPY_ZEROFILL CODE */
|
||||
|
||||
|
||||
#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 netname_MSG_COUNT
|
||||
#define netname_MSG_COUNT 4
|
||||
#endif /* netname_MSG_COUNT */
|
||||
|
||||
#include <mach/std_types.h>
|
||||
#include <mach/mig.h>
|
||||
#include <servers/netname_defs.h>
|
||||
|
||||
#ifdef __BeforeMigUserHeader
|
||||
__BeforeMigUserHeader
|
||||
#endif /* __BeforeMigUserHeader */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__BEGIN_DECLS
|
||||
|
||||
|
||||
/* Routine netname_check_in */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t netname_check_in
|
||||
(
|
||||
mach_port_t server_port,
|
||||
netname_name_t port_name,
|
||||
mach_port_t signature,
|
||||
mach_port_t port_id
|
||||
);
|
||||
|
||||
/* Routine netname_look_up */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t netname_look_up
|
||||
(
|
||||
mach_port_t server_port,
|
||||
netname_name_t host_name,
|
||||
netname_name_t port_name,
|
||||
mach_port_t *port_id
|
||||
);
|
||||
|
||||
/* Routine netname_check_out */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t netname_check_out
|
||||
(
|
||||
mach_port_t server_port,
|
||||
netname_name_t port_name,
|
||||
mach_port_t signature
|
||||
);
|
||||
|
||||
/* Routine netname_version */
|
||||
#ifdef mig_external
|
||||
mig_external
|
||||
#else
|
||||
extern
|
||||
#endif /* mig_external */
|
||||
kern_return_t netname_version
|
||||
(
|
||||
mach_port_t server_port,
|
||||
netname_name_t version
|
||||
);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
/********************** Caution **************************/
|
||||
/* The following data types should be used to calculate */
|
||||
/* maximum message sizes only. The actual message may be */
|
||||
/* smaller, and the position of the arguments within the */
|
||||
/* message layout may vary from what is presented here. */
|
||||
/* For example, if any of the arguments are variable- */
|
||||
/* sized, and less than the maximum is sent, the data */
|
||||
/* will be packed tight in the actual message to reduce */
|
||||
/* the presence of holes. */
|
||||
/********************** Caution **************************/
|
||||
|
||||
/* typedefs for all requests */
|
||||
|
||||
#ifndef __Request__netname_subsystem__defined
|
||||
#define __Request__netname_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t signature;
|
||||
mach_msg_port_descriptor_t port_id;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
mach_msg_type_number_t port_nameOffset; /* MiG doesn't use it */
|
||||
mach_msg_type_number_t port_nameCnt;
|
||||
char port_name[80];
|
||||
} __Request__netname_check_in_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
mach_msg_type_number_t host_nameOffset; /* MiG doesn't use it */
|
||||
mach_msg_type_number_t host_nameCnt;
|
||||
char host_name[80];
|
||||
mach_msg_type_number_t port_nameOffset; /* MiG doesn't use it */
|
||||
mach_msg_type_number_t port_nameCnt;
|
||||
char port_name[80];
|
||||
} __Request__netname_look_up_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t signature;
|
||||
/* end of the kernel processed data */
|
||||
NDR_record_t NDR;
|
||||
mach_msg_type_number_t port_nameOffset; /* MiG doesn't use it */
|
||||
mach_msg_type_number_t port_nameCnt;
|
||||
char port_name[80];
|
||||
} __Request__netname_check_out_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
} __Request__netname_version_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Request__netname_subsystem__defined */
|
||||
|
||||
/* union of all requests */
|
||||
|
||||
#ifndef __RequestUnion__netname_subsystem__defined
|
||||
#define __RequestUnion__netname_subsystem__defined
|
||||
union __RequestUnion__netname_subsystem {
|
||||
__Request__netname_check_in_t Request_netname_check_in;
|
||||
__Request__netname_look_up_t Request_netname_look_up;
|
||||
__Request__netname_check_out_t Request_netname_check_out;
|
||||
__Request__netname_version_t Request_netname_version;
|
||||
};
|
||||
#endif /* !__RequestUnion__netname_subsystem__defined */
|
||||
/* typedefs for all replies */
|
||||
|
||||
#ifndef __Reply__netname_subsystem__defined
|
||||
#define __Reply__netname_subsystem__defined
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__netname_check_in_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
/* start of the kernel processed data */
|
||||
mach_msg_body_t msgh_body;
|
||||
mach_msg_port_descriptor_t port_id;
|
||||
/* end of the kernel processed data */
|
||||
} __Reply__netname_look_up_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
} __Reply__netname_check_out_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(push, 4)
|
||||
#endif
|
||||
typedef struct {
|
||||
mach_msg_header_t Head;
|
||||
NDR_record_t NDR;
|
||||
kern_return_t RetCode;
|
||||
mach_msg_type_number_t versionOffset; /* MiG doesn't use it */
|
||||
mach_msg_type_number_t versionCnt;
|
||||
char version[80];
|
||||
} __Reply__netname_version_t __attribute__((unused));
|
||||
#ifdef __MigPackStructs
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
#endif /* !__Reply__netname_subsystem__defined */
|
||||
|
||||
/* union of all replies */
|
||||
|
||||
#ifndef __ReplyUnion__netname_subsystem__defined
|
||||
#define __ReplyUnion__netname_subsystem__defined
|
||||
union __ReplyUnion__netname_subsystem {
|
||||
__Reply__netname_check_in_t Reply_netname_check_in;
|
||||
__Reply__netname_look_up_t Reply_netname_look_up;
|
||||
__Reply__netname_check_out_t Reply_netname_check_out;
|
||||
__Reply__netname_version_t Reply_netname_version;
|
||||
};
|
||||
#endif /* !__RequestUnion__netname_subsystem__defined */
|
||||
|
||||
#ifndef subsystem_to_name_map_netname
|
||||
#define subsystem_to_name_map_netname \
|
||||
{ "netname_check_in", 1040 },\
|
||||
{ "netname_look_up", 1041 },\
|
||||
{ "netname_check_out", 1042 },\
|
||||
{ "netname_version", 1043 }
|
||||
#endif
|
||||
|
||||
#ifdef __AfterMigUserHeader
|
||||
__AfterMigUserHeader
|
||||
#endif /* __AfterMigUserHeader */
|
||||
|
||||
#endif /* _netname_user_ */
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user