1/*
2 * IDENTIFICATION:
3 * stub generated by bootstrap_cmds-133
4 * OPTIONS:
5 * KernelServer
6 */
7
8/* Module UNDReply */
9
10#define __MIG_check__Request__UNDReply_subsystem__ 1
11
12#include "UNDReplyServer.h"
13
14#ifndef mig_internal
15#define mig_internal static __inline__
16#endif /* mig_internal */
17
18#ifndef mig_external
19#define mig_external
20#endif /* mig_external */
21
22#if !defined(__MigTypeCheck) && defined(TypeCheck)
23#define __MigTypeCheck TypeCheck /* Legacy setting */
24#endif /* !defined(__MigTypeCheck) */
25
26#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_)
27#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */
28#endif /* !defined(__MigKernelSpecificCode) */
29
30#ifndef LimitCheck
31#define LimitCheck 0
32#endif /* LimitCheck */
33
34#ifndef min
35#define min(a,b) ( ((a) < (b))? (a): (b) )
36#endif /* min */
37
38#if !defined(_WALIGN_)
39#define _WALIGN_(x) (((x) + 3) & ~3)
40#endif /* !defined(_WALIGN_) */
41
42#if !defined(_WALIGNSZ_)
43#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
44#endif /* !defined(_WALIGNSZ_) */
45
46#ifndef UseStaticTemplates
47#define UseStaticTemplates 0
48#endif /* UseStaticTemplates */
49
50#ifndef MIG_SERVER_ROUTINE
51#define MIG_SERVER_ROUTINE
52#endif
53
54#ifndef __DeclareRcvRpc
55#define __DeclareRcvRpc(_NUM_, _NAME_)
56#endif /* __DeclareRcvRpc */
57
58#ifndef __BeforeRcvRpc
59#define __BeforeRcvRpc(_NUM_, _NAME_)
60#endif /* __BeforeRcvRpc */
61
62#ifndef __AfterRcvRpc
63#define __AfterRcvRpc(_NUM_, _NAME_)
64#endif /* __AfterRcvRpc */
65
66#ifndef __DeclareRcvSimple
67#define __DeclareRcvSimple(_NUM_, _NAME_)
68#endif /* __DeclareRcvSimple */
69
70#ifndef __BeforeRcvSimple
71#define __BeforeRcvSimple(_NUM_, _NAME_)
72#endif /* __BeforeRcvSimple */
73
74#ifndef __AfterRcvSimple
75#define __AfterRcvSimple(_NUM_, _NAME_)
76#endif /* __AfterRcvSimple */
77
78#define novalue void
79
80#if __MigKernelSpecificCode
81#define msgh_request_port msgh_remote_port
82#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_REMOTE(bits)
83#define msgh_reply_port msgh_local_port
84#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_LOCAL(bits)
85#else
86#define msgh_request_port msgh_local_port
87#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits)
88#define msgh_reply_port msgh_remote_port
89#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits)
90#endif /* __MigKernelSpecificCode */
91
92#define MIG_RETURN_ERROR(X, code) {\
93 ((mig_reply_error_t *)X)->RetCode = code;\
94 ((mig_reply_error_t *)X)->NDR = NDR_record;\
95 return;\
96 }
97
98/* Forward Declarations */
99
100
101mig_internal novalue _XUNDAlertCompletedWithResult_rpc
102 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
103
104mig_internal novalue _XUNDNotificationCreated_rpc
105 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP);
106
107
108#if ( __MigTypeCheck )
109#if __MIG_check__Request__UNDReply_subsystem__
110#if !defined(__MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined)
111#define __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined
112
113mig_internal kern_return_t __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t(
114 __attribute__((__unused__)) __RequestKData__UNDAlertCompletedWithResult_rpc_t *InKP,
115 __attribute__((__unused__)) __RequestUData__UNDAlertCompletedWithResult_rpc_t *In0UP,
116 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
117{
118
119 typedef __Request__UNDAlertCompletedWithResult_rpc_t __Request;
120 typedef __RequestUData__UNDAlertCompletedWithResult_rpc_t __RequestU __attribute__((unused));
121#if __MigTypeCheck
122 if (!(InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
123 (InKP->msgh_body.msgh_descriptor_count != 1) ||
124 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
125 return MIG_BAD_ARGUMENTS;
126#endif /* __MigTypeCheck */
127
128#if __MigTypeCheck
129 if (InKP->data.type != MACH_MSG_OOL_DESCRIPTOR)
130 return MIG_TYPE_ERROR;
131#endif /* __MigTypeCheck */
132
133#if __MigTypeCheck
134 if (InKP->data.size != In0UP->dataCnt)
135 return MIG_TYPE_ERROR;
136#endif /* __MigTypeCheck */
137
138 return MACH_MSG_SUCCESS;
139}
140#endif /* !defined(__MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined) */
141#endif /* __MIG_check__Request__UNDReply_subsystem__ */
142#endif /* ( __MigTypeCheck ) */
143
144
145/* SimpleRoutine UNDAlertCompletedWithResult_rpc */
146mig_internal novalue _XUNDAlertCompletedWithResult_rpc
147 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
148 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
149 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
150{
151
152#ifdef __MigPackStructs
153#pragma pack(push, 4)
154#endif
155 typedef struct {
156 NDR_record_t NDR;
157 int result;
158 mach_msg_type_number_t dataCnt;
159 mach_msg_trailer_t trailer;
160 char padding[0]; /* Avoid generating empty UData structs */
161 } RequestU __attribute__((unused));
162#ifdef __MigPackStructs
163#pragma pack(pop)
164#endif
165 typedef __RequestKData__UNDAlertCompletedWithResult_rpc_t RequestK;
166 typedef __RequestUData__UNDAlertCompletedWithResult_rpc_t __RequestU;
167 typedef __ReplyKData__UNDAlertCompletedWithResult_rpc_t ReplyK __attribute__((unused));
168 typedef __ReplyUData__UNDAlertCompletedWithResult_rpc_t ReplyU __attribute__((unused));
169 typedef __Reply__UNDAlertCompletedWithResult_rpc_t Reply __attribute__((unused));
170 typedef __Request__UNDAlertCompletedWithResult_rpc_t __Request __attribute__((unused));
171
172 /*
173 * typedef struct {
174 * mach_msg_header_t Head;
175 * NDR_record_t NDR;
176 * kern_return_t RetCode;
177 * } mig_reply_error_t;
178 */
179
180 RequestK *InKP = (RequestK *) InHeadP;
181 RequestU *In0UP = (RequestU *) InDataP;
182 ReplyK *OutKP = (ReplyK *) OutHeadP;
183 ReplyU *OutUP = (ReplyU *) OutDataP;
184 (void)OutUP;
185#ifdef __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined
186 kern_return_t check_result;
187#endif /* __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined */
188
189#if __MigKernelSpecificCode
190#else
191#endif /* __MigKernelSpecificCode */
192 __DeclareRcvSimple(6200, "UNDAlertCompletedWithResult_rpc")
193 __BeforeRcvSimple(6200, "UNDAlertCompletedWithResult_rpc")
194
195#if defined(__MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined)
196 check_result = __MIG_check__Request__UNDAlertCompletedWithResult_rpc_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
197 if (check_result != MACH_MSG_SUCCESS)
198 { MIG_RETURN_ERROR(OutKP, check_result); }
199#endif /* defined(__MIG_check__Request__UNDAlertCompletedWithResult_rpc_t__defined) */
200
201 OutUP->RetCode = UNDAlertCompletedWithResult_rpc(reply: convert_port_to_UNDReply(InKP->Head.msgh_request_port), result: In0UP->result, data: (xmlData_t)(InKP->data.address), dataCnt: InKP->data.size);
202#if __MigKernelSpecificCode
203#endif /* __MigKernelSpecificCode */
204 __AfterRcvSimple(6200, "UNDAlertCompletedWithResult_rpc")
205}
206
207#if ( __MigTypeCheck )
208#if __MIG_check__Request__UNDReply_subsystem__
209#if !defined(__MIG_check__Request__UNDNotificationCreated_rpc_t__defined)
210#define __MIG_check__Request__UNDNotificationCreated_rpc_t__defined
211
212mig_internal kern_return_t __MIG_check__Request__UNDNotificationCreated_rpc_t(
213 __attribute__((__unused__)) __RequestKData__UNDNotificationCreated_rpc_t *InKP,
214 __attribute__((__unused__)) __RequestUData__UNDNotificationCreated_rpc_t *In0UP,
215 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP)
216{
217
218 typedef __Request__UNDNotificationCreated_rpc_t __Request;
219 typedef __RequestUData__UNDNotificationCreated_rpc_t __RequestU __attribute__((unused));
220#if __MigTypeCheck
221 if ((InKP->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) ||
222 (InKP->Head.msgh_size != (mach_msg_size_t)sizeof(__Request)))
223 return MIG_BAD_ARGUMENTS;
224#endif /* __MigTypeCheck */
225
226 return MACH_MSG_SUCCESS;
227}
228#endif /* !defined(__MIG_check__Request__UNDNotificationCreated_rpc_t__defined) */
229#endif /* __MIG_check__Request__UNDReply_subsystem__ */
230#endif /* ( __MigTypeCheck ) */
231
232
233/* SimpleRoutine UNDNotificationCreated_rpc */
234mig_internal novalue _XUNDNotificationCreated_rpc
235 (mach_msg_header_t *InHeadP, __attribute__((__unused__)) void *InDataP,
236 __attribute__((__unused__)) mach_msg_max_trailer_t *InTrailerP,
237 mach_msg_header_t *OutHeadP, __attribute__((__unused__)) void *OutDataP)
238{
239
240#ifdef __MigPackStructs
241#pragma pack(push, 4)
242#endif
243 typedef struct {
244 NDR_record_t NDR;
245 int userLandNotificationKey;
246 mach_msg_trailer_t trailer;
247 char padding[0]; /* Avoid generating empty UData structs */
248 } RequestU __attribute__((unused));
249#ifdef __MigPackStructs
250#pragma pack(pop)
251#endif
252 typedef __RequestKData__UNDNotificationCreated_rpc_t RequestK;
253 typedef __RequestUData__UNDNotificationCreated_rpc_t __RequestU;
254 typedef __ReplyKData__UNDNotificationCreated_rpc_t ReplyK __attribute__((unused));
255 typedef __ReplyUData__UNDNotificationCreated_rpc_t ReplyU __attribute__((unused));
256 typedef __Reply__UNDNotificationCreated_rpc_t Reply __attribute__((unused));
257 typedef __Request__UNDNotificationCreated_rpc_t __Request __attribute__((unused));
258
259 /*
260 * typedef struct {
261 * mach_msg_header_t Head;
262 * NDR_record_t NDR;
263 * kern_return_t RetCode;
264 * } mig_reply_error_t;
265 */
266
267 RequestK *InKP = (RequestK *) InHeadP;
268 RequestU *In0UP = (RequestU *) InDataP;
269 ReplyK *OutKP = (ReplyK *) OutHeadP;
270 ReplyU *OutUP = (ReplyU *) OutDataP;
271 (void)OutUP;
272#ifdef __MIG_check__Request__UNDNotificationCreated_rpc_t__defined
273 kern_return_t check_result;
274#endif /* __MIG_check__Request__UNDNotificationCreated_rpc_t__defined */
275
276#if __MigKernelSpecificCode
277#else
278#endif /* __MigKernelSpecificCode */
279 __DeclareRcvSimple(6201, "UNDNotificationCreated_rpc")
280 __BeforeRcvSimple(6201, "UNDNotificationCreated_rpc")
281
282#if defined(__MIG_check__Request__UNDNotificationCreated_rpc_t__defined)
283 check_result = __MIG_check__Request__UNDNotificationCreated_rpc_t(InKP: (RequestK *)InKP, In0UP: (__RequestU *)In0UP, InTrailerP);
284 if (check_result != MACH_MSG_SUCCESS)
285 { MIG_RETURN_ERROR(OutKP, check_result); }
286#endif /* defined(__MIG_check__Request__UNDNotificationCreated_rpc_t__defined) */
287
288 OutUP->RetCode = UNDNotificationCreated_rpc(reply: convert_port_to_UNDReply(InKP->Head.msgh_request_port), userLandNotificationKey: In0UP->userLandNotificationKey);
289#if __MigKernelSpecificCode
290#endif /* __MigKernelSpecificCode */
291 __AfterRcvSimple(6201, "UNDNotificationCreated_rpc")
292}
293
294
295
296/* Description of this kernel subsystem, for use in direct RPC */
297const struct UNDReply_subsystem UNDReply_subsystem = {
298 UNDReply_server_routine,
299 6200,
300 6202,
301 (mach_msg_size_t)sizeof(union __ReplyUnion__UNDReply_subsystem),
302 (vm_address_t)0,
303 {
304 { (mig_impl_routine_t) 0,
305 (mig_stub_kern_routine_t) _XUNDAlertCompletedWithResult_rpc, 4, 0, 0, (mach_msg_size_t)sizeof(__Reply__UNDAlertCompletedWithResult_rpc_t)},
306 { .impl_routine: (mig_impl_routine_t) 0,
307 .kstub_routine: (mig_stub_kern_routine_t) _XUNDNotificationCreated_rpc, .argc: 2, .descr_count: 0, .reply_descr_count: 0, .max_reply_msg: (mach_msg_size_t)sizeof(__Reply__UNDNotificationCreated_rpc_t)},
308 }
309};
310
311mig_external boolean_t UNDReply_server
312 (mach_msg_header_t *InHeadP, void *InDataP, mach_msg_max_trailer_t *InTrailerP, mach_msg_header_t *OutHeadP, void *OutDataP)
313{
314 /*
315 * typedef struct {
316 * mach_msg_header_t Head;
317 * NDR_record_t NDR;
318 * kern_return_t RetCode;
319 * } mig_reply_error_t;
320 */
321
322 mig_kern_routine_t routine;
323
324 OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0);
325 OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port;
326 /* Minimal size: routine() will update it if different */
327 OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t);
328 OutHeadP->msgh_local_port = MACH_PORT_NULL;
329 OutHeadP->msgh_id = InHeadP->msgh_id + 100;
330 OutHeadP->msgh_reserved = 0;
331
332 if ((InHeadP->msgh_id > 6201) || (InHeadP->msgh_id < 6200) ||
333 ((routine = UNDReply_subsystem.kroutine[InHeadP->msgh_id - 6200].kstub_routine) == 0)) {
334 ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record;
335 ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID;
336 return FALSE;
337 }
338 (*routine) (InHeadP, InDataP, InTrailerP, OutHeadP, OutDataP);
339 return TRUE;
340}
341
342mig_external mig_kern_routine_t UNDReply_server_routine
343 (mach_msg_header_t *InHeadP)
344{
345 int msgh_id;
346
347 msgh_id = InHeadP->msgh_id - 6200;
348
349 if ((msgh_id > 1) || (msgh_id < 0))
350 return 0;
351
352 return UNDReply_subsystem.kroutine[msgh_id].kstub_routine;
353}
354