1 | #ifndef _ktrace_background_user_ |
2 | #define _ktrace_background_user_ |
3 | |
4 | /* Module ktrace_background */ |
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 | |
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 ktrace_background_MSG_COUNT |
55 | #define ktrace_background_MSG_COUNT 1 |
56 | #endif /* ktrace_background_MSG_COUNT */ |
57 | |
58 | #include <Availability.h> |
59 | #include <mach/std_types.h> |
60 | #include <mach/mig.h> |
61 | #include <mach/mig.h> |
62 | #include <mach/mach_types.h> |
63 | |
64 | #ifdef __BeforeMigUserHeader |
65 | __BeforeMigUserHeader |
66 | #endif /* __BeforeMigUserHeader */ |
67 | |
68 | #include <sys/cdefs.h> |
69 | __BEGIN_DECLS |
70 | |
71 | |
72 | /* SimpleRoutine ktrace_background_available */ |
73 | #ifdef mig_external |
74 | mig_external |
75 | #else |
76 | extern |
77 | #endif /* mig_external */ |
78 | kern_return_t send_ktrace_background_available |
79 | ( |
80 | mach_port_t ktrace_background_port |
81 | ); |
82 | |
83 | __END_DECLS |
84 | |
85 | /********************** Caution **************************/ |
86 | /* The following data types should be used to calculate */ |
87 | /* maximum message sizes only. The actual message may be */ |
88 | /* smaller, and the position of the arguments within the */ |
89 | /* message layout may vary from what is presented here. */ |
90 | /* For example, if any of the arguments are variable- */ |
91 | /* sized, and less than the maximum is sent, the data */ |
92 | /* will be packed tight in the actual message to reduce */ |
93 | /* the presence of holes. */ |
94 | /********************** Caution **************************/ |
95 | |
96 | /* typedefs for all requests */ |
97 | |
98 | #ifndef __Request__ktrace_background_subsystem__defined |
99 | #define __Request__ktrace_background_subsystem__defined |
100 | |
101 | #ifdef __MigPackStructs |
102 | #pragma pack(push, 4) |
103 | #endif |
104 | typedef struct { |
105 | mach_msg_header_t Head; |
106 | } __Request__ktrace_background_available_t __attribute__((unused)); |
107 | #ifdef __MigPackStructs |
108 | #pragma pack(pop) |
109 | #endif |
110 | #endif /* !__Request__ktrace_background_subsystem__defined */ |
111 | |
112 | /* union of all requests */ |
113 | |
114 | #ifndef __RequestUnion__send_ktrace_background_subsystem__defined |
115 | #define __RequestUnion__send_ktrace_background_subsystem__defined |
116 | union __RequestUnion__send_ktrace_background_subsystem { |
117 | __Request__ktrace_background_available_t Request_send_ktrace_background_available; |
118 | }; |
119 | #endif /* !__RequestUnion__send_ktrace_background_subsystem__defined */ |
120 | /* typedefs for all replies */ |
121 | |
122 | #ifndef __Reply__ktrace_background_subsystem__defined |
123 | #define __Reply__ktrace_background_subsystem__defined |
124 | |
125 | #ifdef __MigPackStructs |
126 | #pragma pack(push, 4) |
127 | #endif |
128 | typedef struct { |
129 | mach_msg_header_t Head; |
130 | NDR_record_t NDR; |
131 | kern_return_t RetCode; |
132 | } __Reply__ktrace_background_available_t __attribute__((unused)); |
133 | #ifdef __MigPackStructs |
134 | #pragma pack(pop) |
135 | #endif |
136 | #endif /* !__Reply__ktrace_background_subsystem__defined */ |
137 | |
138 | /* union of all replies */ |
139 | |
140 | #ifndef __ReplyUnion__send_ktrace_background_subsystem__defined |
141 | #define __ReplyUnion__send_ktrace_background_subsystem__defined |
142 | union __ReplyUnion__send_ktrace_background_subsystem { |
143 | __Reply__ktrace_background_available_t Reply_send_ktrace_background_available; |
144 | }; |
145 | #endif /* !__RequestUnion__send_ktrace_background_subsystem__defined */ |
146 | |
147 | #ifndef subsystem_to_name_map_ktrace_background |
148 | #define subsystem_to_name_map_ktrace_background \ |
149 | { "ktrace_background_available", 670 } |
150 | #endif |
151 | |
152 | #ifdef __AfterMigUserHeader |
153 | __AfterMigUserHeader |
154 | #endif /* __AfterMigUserHeader */ |
155 | |
156 | #endif /* _ktrace_background_user_ */ |
157 | |