1#ifndef _mach_test_upcall_user_
2#define _mach_test_upcall_user_
3
4/* Module mach_test_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
26extern "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
48typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
49typedef struct {
50 char * name;
51 function_ptr_t function;
52} function_table_entry;
53typedef function_table_entry *function_table_t;
54#endif /* FUNCTION_PTR_T */
55#endif /* AUTOTEST */
56
57#ifndef mach_test_upcall_MSG_COUNT
58#define mach_test_upcall_MSG_COUNT 2
59#endif /* mach_test_upcall_MSG_COUNT */
60
61#include <Availability.h>
62#include <mach/std_types.h>
63#include <mach/mig.h>
64
65#ifdef __BeforeMigUserHeader
66__BeforeMigUserHeader
67#endif /* __BeforeMigUserHeader */
68
69#include <sys/cdefs.h>
70__BEGIN_DECLS
71
72
73/* Routine mach_test_sync_upcall */
74#ifdef mig_external
75mig_external
76#else
77extern
78#endif /* mig_external */
79kern_return_t mach_test_sync_upcall
80(
81 mach_port_t port
82);
83
84/* SimpleRoutine mach_test_async_upcall */
85#ifdef mig_external
86mig_external
87#else
88extern
89#endif /* mig_external */
90kern_return_t mach_test_async_upcall
91(
92 mach_port_t port
93);
94
95__END_DECLS
96
97/********************** Caution **************************/
98/* The following data types should be used to calculate */
99/* maximum message sizes only. The actual message may be */
100/* smaller, and the position of the arguments within the */
101/* message layout may vary from what is presented here. */
102/* For example, if any of the arguments are variable- */
103/* sized, and less than the maximum is sent, the data */
104/* will be packed tight in the actual message to reduce */
105/* the presence of holes. */
106/********************** Caution **************************/
107
108/* typedefs for all requests */
109
110#ifndef __Request__mach_test_upcall_subsystem__defined
111#define __Request__mach_test_upcall_subsystem__defined
112
113#ifdef __MigPackStructs
114#pragma pack(push, 4)
115#endif
116 typedef struct {
117 mach_msg_header_t Head;
118 } __Request__mach_test_sync_upcall_t __attribute__((unused));
119#ifdef __MigPackStructs
120#pragma pack(pop)
121#endif
122
123#ifdef __MigPackStructs
124#pragma pack(push, 4)
125#endif
126 typedef struct {
127 mach_msg_header_t Head;
128 } __Request__mach_test_async_upcall_t __attribute__((unused));
129#ifdef __MigPackStructs
130#pragma pack(pop)
131#endif
132#endif /* !__Request__mach_test_upcall_subsystem__defined */
133
134/* union of all requests */
135
136#ifndef __RequestUnion__mach_test_upcall_subsystem__defined
137#define __RequestUnion__mach_test_upcall_subsystem__defined
138union __RequestUnion__mach_test_upcall_subsystem {
139 __Request__mach_test_sync_upcall_t Request_mach_test_sync_upcall;
140 __Request__mach_test_async_upcall_t Request_mach_test_async_upcall;
141};
142#endif /* !__RequestUnion__mach_test_upcall_subsystem__defined */
143/* typedefs for all replies */
144
145#ifndef __Reply__mach_test_upcall_subsystem__defined
146#define __Reply__mach_test_upcall_subsystem__defined
147
148#ifdef __MigPackStructs
149#pragma pack(push, 4)
150#endif
151 typedef struct {
152 mach_msg_header_t Head;
153 NDR_record_t NDR;
154 kern_return_t RetCode;
155 } __Reply__mach_test_sync_upcall_t __attribute__((unused));
156#ifdef __MigPackStructs
157#pragma pack(pop)
158#endif
159
160#ifdef __MigPackStructs
161#pragma pack(push, 4)
162#endif
163 typedef struct {
164 mach_msg_header_t Head;
165 NDR_record_t NDR;
166 kern_return_t RetCode;
167 } __Reply__mach_test_async_upcall_t __attribute__((unused));
168#ifdef __MigPackStructs
169#pragma pack(pop)
170#endif
171#endif /* !__Reply__mach_test_upcall_subsystem__defined */
172
173/* union of all replies */
174
175#ifndef __ReplyUnion__mach_test_upcall_subsystem__defined
176#define __ReplyUnion__mach_test_upcall_subsystem__defined
177union __ReplyUnion__mach_test_upcall_subsystem {
178 __Reply__mach_test_sync_upcall_t Reply_mach_test_sync_upcall;
179 __Reply__mach_test_async_upcall_t Reply_mach_test_async_upcall;
180};
181#endif /* !__RequestUnion__mach_test_upcall_subsystem__defined */
182
183#ifndef subsystem_to_name_map_mach_test_upcall
184#define subsystem_to_name_map_mach_test_upcall \
185 { "mach_test_sync_upcall", 125 },\
186 { "mach_test_async_upcall", 126 }
187#endif
188
189#ifdef __AfterMigUserHeader
190__AfterMigUserHeader
191#endif /* __AfterMigUserHeader */
192
193#endif /* _mach_test_upcall_user_ */
194