1#ifndef _memory_error_notification_user_
2#define _memory_error_notification_user_
3
4/* Module memory_error_notification */
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 memory_error_notification_MSG_COUNT
58#define memory_error_notification_MSG_COUNT 2
59#endif /* memory_error_notification_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#include <kern/ecc.h>
67
68#ifdef __BeforeMigUserHeader
69__BeforeMigUserHeader
70#endif /* __BeforeMigUserHeader */
71
72#include <sys/cdefs.h>
73__BEGIN_DECLS
74
75
76/* SimpleRoutine memory_error_notification */
77#ifdef mig_external
78mig_external
79#else
80extern
81#endif /* mig_external */
82kern_return_t memory_error_notification
83(
84 mach_port_t memory_error_port,
85 ecc_event_t event
86);
87
88/* SimpleRoutine mcc_memory_error_notification */
89#ifdef mig_external
90mig_external
91#else
92extern
93#endif /* mig_external */
94kern_return_t mcc_memory_error_notification
95(
96 mach_port_t memory_error_port,
97 mcc_ecc_event_t event
98);
99
100__END_DECLS
101
102/********************** Caution **************************/
103/* The following data types should be used to calculate */
104/* maximum message sizes only. The actual message may be */
105/* smaller, and the position of the arguments within the */
106/* message layout may vary from what is presented here. */
107/* For example, if any of the arguments are variable- */
108/* sized, and less than the maximum is sent, the data */
109/* will be packed tight in the actual message to reduce */
110/* the presence of holes. */
111/********************** Caution **************************/
112
113/* typedefs for all requests */
114
115#ifndef __Request__memory_error_notification_subsystem__defined
116#define __Request__memory_error_notification_subsystem__defined
117
118#ifdef __MigPackStructs
119#pragma pack(push, 4)
120#endif
121 typedef struct {
122 mach_msg_header_t Head;
123 NDR_record_t NDR;
124 ecc_event_t event;
125 } __Request__memory_error_notification_t __attribute__((unused));
126#ifdef __MigPackStructs
127#pragma pack(pop)
128#endif
129
130#ifdef __MigPackStructs
131#pragma pack(push, 4)
132#endif
133 typedef struct {
134 mach_msg_header_t Head;
135 NDR_record_t NDR;
136 mcc_ecc_event_t event;
137 } __Request__mcc_memory_error_notification_t __attribute__((unused));
138#ifdef __MigPackStructs
139#pragma pack(pop)
140#endif
141#endif /* !__Request__memory_error_notification_subsystem__defined */
142
143/* union of all requests */
144
145#ifndef __RequestUnion__memory_error_notification_subsystem__defined
146#define __RequestUnion__memory_error_notification_subsystem__defined
147union __RequestUnion__memory_error_notification_subsystem {
148 __Request__memory_error_notification_t Request_memory_error_notification;
149 __Request__mcc_memory_error_notification_t Request_mcc_memory_error_notification;
150};
151#endif /* !__RequestUnion__memory_error_notification_subsystem__defined */
152/* typedefs for all replies */
153
154#ifndef __Reply__memory_error_notification_subsystem__defined
155#define __Reply__memory_error_notification_subsystem__defined
156
157#ifdef __MigPackStructs
158#pragma pack(push, 4)
159#endif
160 typedef struct {
161 mach_msg_header_t Head;
162 NDR_record_t NDR;
163 kern_return_t RetCode;
164 } __Reply__memory_error_notification_t __attribute__((unused));
165#ifdef __MigPackStructs
166#pragma pack(pop)
167#endif
168
169#ifdef __MigPackStructs
170#pragma pack(push, 4)
171#endif
172 typedef struct {
173 mach_msg_header_t Head;
174 NDR_record_t NDR;
175 kern_return_t RetCode;
176 } __Reply__mcc_memory_error_notification_t __attribute__((unused));
177#ifdef __MigPackStructs
178#pragma pack(pop)
179#endif
180#endif /* !__Reply__memory_error_notification_subsystem__defined */
181
182/* union of all replies */
183
184#ifndef __ReplyUnion__memory_error_notification_subsystem__defined
185#define __ReplyUnion__memory_error_notification_subsystem__defined
186union __ReplyUnion__memory_error_notification_subsystem {
187 __Reply__memory_error_notification_t Reply_memory_error_notification;
188 __Reply__mcc_memory_error_notification_t Reply_mcc_memory_error_notification;
189};
190#endif /* !__RequestUnion__memory_error_notification_subsystem__defined */
191
192#ifndef subsystem_to_name_map_memory_error_notification
193#define subsystem_to_name_map_memory_error_notification \
194 { "memory_error_notification", 5900 },\
195 { "mcc_memory_error_notification", 5901 }
196#endif
197
198#ifdef __AfterMigUserHeader
199__AfterMigUserHeader
200#endif /* __AfterMigUserHeader */
201
202#endif /* _memory_error_notification_user_ */
203