1 | #ifndef _atm_notification_user_ |
2 | #define _atm_notification_user_ |
3 | |
4 | /* Module atm_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 |
26 | extern "C" { |
27 | #endif |
28 | extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); |
29 | #ifdef __cplusplus |
30 | } |
31 | #endif |
32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ |
33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ |
34 | #endif /* __has_include */ |
35 | |
36 | /* END MIG_STRNCPY_ZEROFILL CODE */ |
37 | |
38 | #if (__MigKernelSpecificCode) || (_MIG_KERNEL_SPECIFIC_CODE_) |
39 | #include <kern/ipc_mig.h> |
40 | #endif /* __MigKernelSpecificCode */ |
41 | |
42 | #ifdef AUTOTEST |
43 | #ifndef FUNCTION_PTR_T |
44 | #define FUNCTION_PTR_T |
45 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); |
46 | typedef struct { |
47 | char *name; |
48 | function_ptr_t function; |
49 | } function_table_entry; |
50 | typedef function_table_entry *function_table_t; |
51 | #endif /* FUNCTION_PTR_T */ |
52 | #endif /* AUTOTEST */ |
53 | |
54 | #ifndef atm_notification_MSG_COUNT |
55 | #define atm_notification_MSG_COUNT 2 |
56 | #endif /* atm_notification_MSG_COUNT */ |
57 | |
58 | #include <mach/std_types.h> |
59 | #include <mach/mig.h> |
60 | #include <mach/mig.h> |
61 | #include <mach/mach_types.h> |
62 | #include <atm/atm_types.h> |
63 | |
64 | #ifdef __BeforeMigUserHeader |
65 | __BeforeMigUserHeader |
66 | #endif /* __BeforeMigUserHeader */ |
67 | |
68 | #include <sys/cdefs.h> |
69 | __BEGIN_DECLS |
70 | |
71 | |
72 | /* SimpleRoutine atm_collect_trace_info */ |
73 | #ifdef mig_external |
74 | mig_external |
75 | #else |
76 | extern |
77 | #endif /* mig_external */ |
78 | kern_return_t atm_collect_trace_info |
79 | ( |
80 | mach_port_t atm_port, |
81 | atm_aid_t activity_trace_id, |
82 | mach_atm_subaid_t sub_activity_id, |
83 | uint32_t flags, |
84 | atm_memory_descriptor_array_t memory_buffers, |
85 | mach_msg_type_number_t memory_buffersCnt, |
86 | atm_memory_size_array_t buffer_sizes, |
87 | mach_msg_type_number_t buffer_sizesCnt |
88 | ); |
89 | |
90 | /* SimpleRoutine atm_inspect_process_buffer */ |
91 | #ifdef mig_external |
92 | mig_external |
93 | #else |
94 | extern |
95 | #endif /* mig_external */ |
96 | kern_return_t atm_inspect_process_buffer |
97 | ( |
98 | mach_port_t atm_port, |
99 | uint32_t proc_pid, |
100 | uint64_t proc_uniqueid, |
101 | uint64_t buffer_size, |
102 | mach_port_t trace_buffer |
103 | ); |
104 | |
105 | __END_DECLS |
106 | |
107 | /********************** Caution **************************/ |
108 | /* The following data types should be used to calculate */ |
109 | /* maximum message sizes only. The actual message may be */ |
110 | /* smaller, and the position of the arguments within the */ |
111 | /* message layout may vary from what is presented here. */ |
112 | /* For example, if any of the arguments are variable- */ |
113 | /* sized, and less than the maximum is sent, the data */ |
114 | /* will be packed tight in the actual message to reduce */ |
115 | /* the presence of holes. */ |
116 | /********************** Caution **************************/ |
117 | |
118 | /* typedefs for all requests */ |
119 | |
120 | #ifndef __Request__atm_notification_subsystem__defined |
121 | #define __Request__atm_notification_subsystem__defined |
122 | |
123 | #ifdef __MigPackStructs |
124 | #pragma pack(4) |
125 | #endif |
126 | typedef struct { |
127 | mach_msg_header_t Head; |
128 | /* start of the kernel processed data */ |
129 | mach_msg_body_t msgh_body; |
130 | mach_msg_port_descriptor_t memory_buffers[512]; |
131 | /* end of the kernel processed data */ |
132 | NDR_record_t NDR; |
133 | atm_aid_t activity_trace_id; |
134 | mach_atm_subaid_t sub_activity_id; |
135 | uint32_t flags; |
136 | mach_msg_type_number_t memory_buffersCnt; |
137 | mach_msg_type_number_t buffer_sizesCnt; |
138 | uint64_t buffer_sizes[512]; |
139 | } __Request__atm_collect_trace_info_t __attribute__((unused)); |
140 | #ifdef __MigPackStructs |
141 | #pragma pack() |
142 | #endif |
143 | |
144 | #ifdef __MigPackStructs |
145 | #pragma pack(4) |
146 | #endif |
147 | typedef struct { |
148 | mach_msg_header_t Head; |
149 | /* start of the kernel processed data */ |
150 | mach_msg_body_t msgh_body; |
151 | mach_msg_port_descriptor_t trace_buffer; |
152 | /* end of the kernel processed data */ |
153 | NDR_record_t NDR; |
154 | uint32_t proc_pid; |
155 | uint64_t proc_uniqueid; |
156 | uint64_t buffer_size; |
157 | } __Request__atm_inspect_process_buffer_t __attribute__((unused)); |
158 | #ifdef __MigPackStructs |
159 | #pragma pack() |
160 | #endif |
161 | #endif /* !__Request__atm_notification_subsystem__defined */ |
162 | |
163 | /* union of all requests */ |
164 | |
165 | #ifndef __RequestUnion__atm_notification_subsystem__defined |
166 | #define __RequestUnion__atm_notification_subsystem__defined |
167 | union __RequestUnion__atm_notification_subsystem { |
168 | __Request__atm_collect_trace_info_t Request_atm_collect_trace_info; |
169 | __Request__atm_inspect_process_buffer_t Request_atm_inspect_process_buffer; |
170 | }; |
171 | #endif /* !__RequestUnion__atm_notification_subsystem__defined */ |
172 | /* typedefs for all replies */ |
173 | |
174 | #ifndef __Reply__atm_notification_subsystem__defined |
175 | #define __Reply__atm_notification_subsystem__defined |
176 | |
177 | #ifdef __MigPackStructs |
178 | #pragma pack(4) |
179 | #endif |
180 | typedef struct { |
181 | mach_msg_header_t Head; |
182 | NDR_record_t NDR; |
183 | kern_return_t RetCode; |
184 | } __Reply__atm_collect_trace_info_t __attribute__((unused)); |
185 | #ifdef __MigPackStructs |
186 | #pragma pack() |
187 | #endif |
188 | |
189 | #ifdef __MigPackStructs |
190 | #pragma pack(4) |
191 | #endif |
192 | typedef struct { |
193 | mach_msg_header_t Head; |
194 | NDR_record_t NDR; |
195 | kern_return_t RetCode; |
196 | } __Reply__atm_inspect_process_buffer_t __attribute__((unused)); |
197 | #ifdef __MigPackStructs |
198 | #pragma pack() |
199 | #endif |
200 | #endif /* !__Reply__atm_notification_subsystem__defined */ |
201 | |
202 | /* union of all replies */ |
203 | |
204 | #ifndef __ReplyUnion__atm_notification_subsystem__defined |
205 | #define __ReplyUnion__atm_notification_subsystem__defined |
206 | union __ReplyUnion__atm_notification_subsystem { |
207 | __Reply__atm_collect_trace_info_t Reply_atm_collect_trace_info; |
208 | __Reply__atm_inspect_process_buffer_t Reply_atm_inspect_process_buffer; |
209 | }; |
210 | #endif /* !__RequestUnion__atm_notification_subsystem__defined */ |
211 | |
212 | #ifndef subsystem_to_name_map_atm_notification |
213 | #define subsystem_to_name_map_atm_notification \ |
214 | { "atm_collect_trace_info", 11500 },\ |
215 | { "atm_inspect_process_buffer", 11501 } |
216 | #endif |
217 | |
218 | #ifdef __AfterMigUserHeader |
219 | __AfterMigUserHeader |
220 | #endif /* __AfterMigUserHeader */ |
221 | |
222 | #endif /* _atm_notification_user_ */ |
223 | |