1 | #ifndef _arcade_upcall_user_ |
2 | #define _arcade_upcall_user_ |
3 | |
4 | /* Module arcade_upcall */ |
5 | |
6 | #include <string.h> |
7 | #include <mach/ndr.h> |
8 | #include <mach/boolean.h> |
9 | #include <mach/kern_return.h> |
10 | #include <mach/notify.h> |
11 | #include <mach/mach_types.h> |
12 | #include <mach/message.h> |
13 | #include <mach/mig_errors.h> |
14 | #include <mach/port.h> |
15 | |
16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ |
17 | |
18 | #if defined(__has_include) |
19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) |
20 | #ifndef USING_MIG_STRNCPY_ZEROFILL |
21 | #define USING_MIG_STRNCPY_ZEROFILL |
22 | #endif |
23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ |
25 | #ifdef __cplusplus |
26 | extern "C" { |
27 | #endif |
28 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS_CSTRING_ATTR |
29 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS_CSTRING_COUNTEDBY_ATTR(C) __unsafe_indexable |
30 | #endif |
31 | extern int mig_strncpy_zerofill(char * dest, const char * src, int len) __attribute__((weak_import)); |
32 | #ifdef __cplusplus |
33 | } |
34 | #endif |
35 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ |
36 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ |
37 | #endif /* __has_include */ |
38 | |
39 | /* END MIG_STRNCPY_ZEROFILL CODE */ |
40 | |
41 | #if (__MigKernelSpecificCode) || (_MIG_KERNEL_SPECIFIC_CODE_) |
42 | #include <kern/ipc_mig.h> |
43 | #endif /* __MigKernelSpecificCode */ |
44 | |
45 | #ifdef AUTOTEST |
46 | #ifndef FUNCTION_PTR_T |
47 | #define FUNCTION_PTR_T |
48 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); |
49 | typedef struct { |
50 | char * name; |
51 | function_ptr_t function; |
52 | } function_table_entry; |
53 | typedef function_table_entry *function_table_t; |
54 | #endif /* FUNCTION_PTR_T */ |
55 | #endif /* AUTOTEST */ |
56 | |
57 | #ifndef arcade_upcall_MSG_COUNT |
58 | #define arcade_upcall_MSG_COUNT 1 |
59 | #endif /* arcade_upcall_MSG_COUNT */ |
60 | |
61 | #include <Availability.h> |
62 | #include <mach/std_types.h> |
63 | #include <mach/mig.h> |
64 | #include <mach/mig.h> |
65 | #include <mach/mach_types.h> |
66 | |
67 | #ifdef __BeforeMigUserHeader |
68 | __BeforeMigUserHeader |
69 | #endif /* __BeforeMigUserHeader */ |
70 | |
71 | #include <sys/cdefs.h> |
72 | __BEGIN_DECLS |
73 | |
74 | |
75 | /* Routine arcade_upcall */ |
76 | #ifdef mig_external |
77 | mig_external |
78 | #else |
79 | extern |
80 | #endif /* mig_external */ |
81 | kern_return_t arcade_upcall |
82 | ( |
83 | mach_port_t arcade_upcall, |
84 | vm_offset_t path, |
85 | mach_msg_type_number_t pathCnt, |
86 | uint64_t offset, |
87 | boolean_t *should_kill |
88 | ); |
89 | |
90 | __END_DECLS |
91 | |
92 | /********************** Caution **************************/ |
93 | /* The following data types should be used to calculate */ |
94 | /* maximum message sizes only. The actual message may be */ |
95 | /* smaller, and the position of the arguments within the */ |
96 | /* message layout may vary from what is presented here. */ |
97 | /* For example, if any of the arguments are variable- */ |
98 | /* sized, and less than the maximum is sent, the data */ |
99 | /* will be packed tight in the actual message to reduce */ |
100 | /* the presence of holes. */ |
101 | /********************** Caution **************************/ |
102 | |
103 | /* typedefs for all requests */ |
104 | |
105 | #ifndef __Request__arcade_upcall_subsystem__defined |
106 | #define __Request__arcade_upcall_subsystem__defined |
107 | |
108 | #ifdef __MigPackStructs |
109 | #pragma pack(push, 4) |
110 | #endif |
111 | typedef struct { |
112 | mach_msg_header_t Head; |
113 | /* start of the kernel processed data */ |
114 | mach_msg_body_t msgh_body; |
115 | mach_msg_ool_descriptor_t path; |
116 | /* end of the kernel processed data */ |
117 | NDR_record_t NDR; |
118 | mach_msg_type_number_t pathCnt; |
119 | uint64_t offset; |
120 | } __Request__arcade_upcall_t __attribute__((unused)); |
121 | #ifdef __MigPackStructs |
122 | #pragma pack(pop) |
123 | #endif |
124 | #endif /* !__Request__arcade_upcall_subsystem__defined */ |
125 | |
126 | /* union of all requests */ |
127 | |
128 | #ifndef __RequestUnion__arcade_upcall_subsystem__defined |
129 | #define __RequestUnion__arcade_upcall_subsystem__defined |
130 | union __RequestUnion__arcade_upcall_subsystem { |
131 | __Request__arcade_upcall_t Request_arcade_upcall; |
132 | }; |
133 | #endif /* !__RequestUnion__arcade_upcall_subsystem__defined */ |
134 | /* typedefs for all replies */ |
135 | |
136 | #ifndef __Reply__arcade_upcall_subsystem__defined |
137 | #define __Reply__arcade_upcall_subsystem__defined |
138 | |
139 | #ifdef __MigPackStructs |
140 | #pragma pack(push, 4) |
141 | #endif |
142 | typedef struct { |
143 | mach_msg_header_t Head; |
144 | NDR_record_t NDR; |
145 | kern_return_t RetCode; |
146 | boolean_t should_kill; |
147 | } __Reply__arcade_upcall_t __attribute__((unused)); |
148 | #ifdef __MigPackStructs |
149 | #pragma pack(pop) |
150 | #endif |
151 | #endif /* !__Reply__arcade_upcall_subsystem__defined */ |
152 | |
153 | /* union of all replies */ |
154 | |
155 | #ifndef __ReplyUnion__arcade_upcall_subsystem__defined |
156 | #define __ReplyUnion__arcade_upcall_subsystem__defined |
157 | union __ReplyUnion__arcade_upcall_subsystem { |
158 | __Reply__arcade_upcall_t Reply_arcade_upcall; |
159 | }; |
160 | #endif /* !__RequestUnion__arcade_upcall_subsystem__defined */ |
161 | |
162 | #ifndef subsystem_to_name_map_arcade_upcall |
163 | #define subsystem_to_name_map_arcade_upcall \ |
164 | { "arcade_upcall", 61471 } |
165 | #endif |
166 | |
167 | #ifdef __AfterMigUserHeader |
168 | __AfterMigUserHeader |
169 | #endif /* __AfterMigUserHeader */ |
170 | |
171 | #endif /* _arcade_upcall_user_ */ |
172 | |