1#ifndef _audit_triggers_user_
2#define _audit_triggers_user_
3
4/* Module audit_triggers */
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 audit_triggers_MSG_COUNT
58#define audit_triggers_MSG_COUNT 2
59#endif /* audit_triggers_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 <mach/audit_triggers_types.h>
67
68#ifdef __BeforeMigUserHeader
69__BeforeMigUserHeader
70#endif /* __BeforeMigUserHeader */
71
72#include <sys/cdefs.h>
73__BEGIN_DECLS
74
75
76/* SimpleRoutine audit_triggers */
77#ifdef mig_external
78mig_external
79#else
80extern
81#endif /* mig_external */
82kern_return_t audit_triggers
83(
84 mach_port_t audit_port,
85 int flags
86);
87
88/* SimpleRoutine audit_analytics */
89#ifdef mig_external
90mig_external
91#else
92extern
93#endif /* mig_external */
94kern_return_t audit_analytics
95(
96 mach_port_t audit_port,
97 string_t caller_id,
98 string_t caller_name
99);
100
101__END_DECLS
102
103/********************** Caution **************************/
104/* The following data types should be used to calculate */
105/* maximum message sizes only. The actual message may be */
106/* smaller, and the position of the arguments within the */
107/* message layout may vary from what is presented here. */
108/* For example, if any of the arguments are variable- */
109/* sized, and less than the maximum is sent, the data */
110/* will be packed tight in the actual message to reduce */
111/* the presence of holes. */
112/********************** Caution **************************/
113
114/* typedefs for all requests */
115
116#ifndef __Request__audit_triggers_subsystem__defined
117#define __Request__audit_triggers_subsystem__defined
118
119#ifdef __MigPackStructs
120#pragma pack(push, 4)
121#endif
122 typedef struct {
123 mach_msg_header_t Head;
124 NDR_record_t NDR;
125 int flags;
126 } __Request__audit_triggers_t __attribute__((unused));
127#ifdef __MigPackStructs
128#pragma pack(pop)
129#endif
130
131#ifdef __MigPackStructs
132#pragma pack(push, 4)
133#endif
134 typedef struct {
135 mach_msg_header_t Head;
136 NDR_record_t NDR;
137 mach_msg_type_number_t caller_idOffset; /* MiG doesn't use it */
138 mach_msg_type_number_t caller_idCnt;
139 char caller_id[1024];
140 mach_msg_type_number_t caller_nameOffset; /* MiG doesn't use it */
141 mach_msg_type_number_t caller_nameCnt;
142 char caller_name[1024];
143 } __Request__audit_analytics_t __attribute__((unused));
144#ifdef __MigPackStructs
145#pragma pack(pop)
146#endif
147#endif /* !__Request__audit_triggers_subsystem__defined */
148
149/* union of all requests */
150
151#ifndef __RequestUnion__audit_triggers_subsystem__defined
152#define __RequestUnion__audit_triggers_subsystem__defined
153union __RequestUnion__audit_triggers_subsystem {
154 __Request__audit_triggers_t Request_audit_triggers;
155 __Request__audit_analytics_t Request_audit_analytics;
156};
157#endif /* !__RequestUnion__audit_triggers_subsystem__defined */
158/* typedefs for all replies */
159
160#ifndef __Reply__audit_triggers_subsystem__defined
161#define __Reply__audit_triggers_subsystem__defined
162
163#ifdef __MigPackStructs
164#pragma pack(push, 4)
165#endif
166 typedef struct {
167 mach_msg_header_t Head;
168 NDR_record_t NDR;
169 kern_return_t RetCode;
170 } __Reply__audit_triggers_t __attribute__((unused));
171#ifdef __MigPackStructs
172#pragma pack(pop)
173#endif
174
175#ifdef __MigPackStructs
176#pragma pack(push, 4)
177#endif
178 typedef struct {
179 mach_msg_header_t Head;
180 NDR_record_t NDR;
181 kern_return_t RetCode;
182 } __Reply__audit_analytics_t __attribute__((unused));
183#ifdef __MigPackStructs
184#pragma pack(pop)
185#endif
186#endif /* !__Reply__audit_triggers_subsystem__defined */
187
188/* union of all replies */
189
190#ifndef __ReplyUnion__audit_triggers_subsystem__defined
191#define __ReplyUnion__audit_triggers_subsystem__defined
192union __ReplyUnion__audit_triggers_subsystem {
193 __Reply__audit_triggers_t Reply_audit_triggers;
194 __Reply__audit_analytics_t Reply_audit_analytics;
195};
196#endif /* !__RequestUnion__audit_triggers_subsystem__defined */
197
198#ifndef subsystem_to_name_map_audit_triggers
199#define subsystem_to_name_map_audit_triggers \
200 { "audit_triggers", 123 },\
201 { "audit_analytics", 124 }
202#endif
203
204#ifdef __AfterMigUserHeader
205__AfterMigUserHeader
206#endif /* __AfterMigUserHeader */
207
208#endif /* _audit_triggers_user_ */
209