| 1 | #ifndef _audit_triggers_server_ |
| 2 | #define _audit_triggers_server_ |
| 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 |
| 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 audit_triggers_MSG_COUNT |
| 55 | #define audit_triggers_MSG_COUNT 2 |
| 56 | #endif /* audit_triggers_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 | #include <mach/audit_triggers_types.h> |
| 64 | |
| 65 | #ifdef __BeforeMigServerHeader |
| 66 | __BeforeMigServerHeader |
| 67 | #endif /* __BeforeMigServerHeader */ |
| 68 | |
| 69 | #ifndef MIG_SERVER_ROUTINE |
| 70 | #define MIG_SERVER_ROUTINE |
| 71 | #endif |
| 72 | |
| 73 | |
| 74 | /* SimpleRoutine audit_triggers */ |
| 75 | #ifdef mig_external |
| 76 | mig_external |
| 77 | #else |
| 78 | extern |
| 79 | #endif /* mig_external */ |
| 80 | MIG_SERVER_ROUTINE |
| 81 | kern_return_t audit_triggers |
| 82 | ( |
| 83 | mach_port_t audit_port, |
| 84 | int flags |
| 85 | ); |
| 86 | |
| 87 | /* SimpleRoutine audit_analytics */ |
| 88 | #ifdef mig_external |
| 89 | mig_external |
| 90 | #else |
| 91 | extern |
| 92 | #endif /* mig_external */ |
| 93 | MIG_SERVER_ROUTINE |
| 94 | kern_return_t audit_analytics |
| 95 | ( |
| 96 | mach_port_t audit_port, |
| 97 | string_t caller_id, |
| 98 | string_t caller_name |
| 99 | ); |
| 100 | |
| 101 | #ifdef mig_external |
| 102 | mig_external |
| 103 | #else |
| 104 | extern |
| 105 | #endif /* mig_external */ |
| 106 | boolean_t audit_triggers_server( |
| 107 | mach_msg_header_t *InHeadP, |
| 108 | mach_msg_header_t *OutHeadP); |
| 109 | |
| 110 | #ifdef mig_external |
| 111 | mig_external |
| 112 | #else |
| 113 | extern |
| 114 | #endif /* mig_external */ |
| 115 | mig_routine_t audit_triggers_server_routine( |
| 116 | mach_msg_header_t *InHeadP); |
| 117 | |
| 118 | |
| 119 | /* Description of this subsystem, for use in direct RPC */ |
| 120 | extern const struct audit_triggers_subsystem { |
| 121 | mig_server_routine_t server; /* Server routine */ |
| 122 | mach_msg_id_t start; /* Min routine number */ |
| 123 | mach_msg_id_t end; /* Max routine number + 1 */ |
| 124 | unsigned int maxsize; /* Max msg size */ |
| 125 | vm_address_t reserved; /* Reserved */ |
| 126 | struct routine_descriptor /* Array of routine descriptors */ |
| 127 | routine[2]; |
| 128 | } audit_triggers_subsystem; |
| 129 | |
| 130 | /* typedefs for all requests */ |
| 131 | |
| 132 | #ifndef __Request__audit_triggers_subsystem__defined |
| 133 | #define __Request__audit_triggers_subsystem__defined |
| 134 | |
| 135 | #ifdef __MigPackStructs |
| 136 | #pragma pack(push, 4) |
| 137 | #endif |
| 138 | typedef struct { |
| 139 | mach_msg_header_t Head; |
| 140 | NDR_record_t NDR; |
| 141 | int flags; |
| 142 | } __Request__audit_triggers_t __attribute__((unused)); |
| 143 | #ifdef __MigPackStructs |
| 144 | #pragma pack(pop) |
| 145 | #endif |
| 146 | |
| 147 | #ifdef __MigPackStructs |
| 148 | #pragma pack(push, 4) |
| 149 | #endif |
| 150 | typedef struct { |
| 151 | mach_msg_header_t Head; |
| 152 | NDR_record_t NDR; |
| 153 | mach_msg_type_number_t caller_idOffset; /* MiG doesn't use it */ |
| 154 | mach_msg_type_number_t caller_idCnt; |
| 155 | char caller_id[1024]; |
| 156 | mach_msg_type_number_t caller_nameOffset; /* MiG doesn't use it */ |
| 157 | mach_msg_type_number_t caller_nameCnt; |
| 158 | char caller_name[1024]; |
| 159 | } __Request__audit_analytics_t __attribute__((unused)); |
| 160 | #ifdef __MigPackStructs |
| 161 | #pragma pack(pop) |
| 162 | #endif |
| 163 | #endif /* !__Request__audit_triggers_subsystem__defined */ |
| 164 | |
| 165 | |
| 166 | /* union of all requests */ |
| 167 | |
| 168 | #ifndef __RequestUnion__audit_triggers_subsystem__defined |
| 169 | #define __RequestUnion__audit_triggers_subsystem__defined |
| 170 | union __RequestUnion__audit_triggers_subsystem { |
| 171 | __Request__audit_triggers_t Request_audit_triggers; |
| 172 | __Request__audit_analytics_t Request_audit_analytics; |
| 173 | }; |
| 174 | #endif /* __RequestUnion__audit_triggers_subsystem__defined */ |
| 175 | /* typedefs for all replies */ |
| 176 | |
| 177 | #ifndef __Reply__audit_triggers_subsystem__defined |
| 178 | #define __Reply__audit_triggers_subsystem__defined |
| 179 | |
| 180 | #ifdef __MigPackStructs |
| 181 | #pragma pack(push, 4) |
| 182 | #endif |
| 183 | typedef struct { |
| 184 | mach_msg_header_t Head; |
| 185 | NDR_record_t NDR; |
| 186 | kern_return_t RetCode; |
| 187 | } __Reply__audit_triggers_t __attribute__((unused)); |
| 188 | #ifdef __MigPackStructs |
| 189 | #pragma pack(pop) |
| 190 | #endif |
| 191 | |
| 192 | #ifdef __MigPackStructs |
| 193 | #pragma pack(push, 4) |
| 194 | #endif |
| 195 | typedef struct { |
| 196 | mach_msg_header_t Head; |
| 197 | NDR_record_t NDR; |
| 198 | kern_return_t RetCode; |
| 199 | } __Reply__audit_analytics_t __attribute__((unused)); |
| 200 | #ifdef __MigPackStructs |
| 201 | #pragma pack(pop) |
| 202 | #endif |
| 203 | #endif /* !__Reply__audit_triggers_subsystem__defined */ |
| 204 | |
| 205 | |
| 206 | /* union of all replies */ |
| 207 | |
| 208 | #ifndef __ReplyUnion__audit_triggers_subsystem__defined |
| 209 | #define __ReplyUnion__audit_triggers_subsystem__defined |
| 210 | union __ReplyUnion__audit_triggers_subsystem { |
| 211 | __Reply__audit_triggers_t Reply_audit_triggers; |
| 212 | __Reply__audit_analytics_t Reply_audit_analytics; |
| 213 | }; |
| 214 | #endif /* __ReplyUnion__audit_triggers_subsystem__defined */ |
| 215 | |
| 216 | #ifndef subsystem_to_name_map_audit_triggers |
| 217 | #define subsystem_to_name_map_audit_triggers \ |
| 218 | { "audit_triggers", 123 },\ |
| 219 | { "audit_analytics", 124 } |
| 220 | #endif |
| 221 | |
| 222 | #ifdef __AfterMigServerHeader |
| 223 | __AfterMigServerHeader |
| 224 | #endif /* __AfterMigServerHeader */ |
| 225 | |
| 226 | #endif /* _audit_triggers_server_ */ |
| 227 | |