| 1 | /* |
| 2 | * IDENTIFICATION: |
| 3 | * stub generated Tue Apr 9 11:33:41 2019 |
| 4 | * with a MiG generated by bootstrap_cmds-96.20.2.200.4 |
| 5 | * OPTIONS: |
| 6 | * KernelServer |
| 7 | */ |
| 8 | |
| 9 | /* Module mach_host */ |
| 10 | |
| 11 | #define __MIG_check__Request__mach_host_subsystem__ 1 |
| 12 | |
| 13 | #include "mach_host_server.h" |
| 14 | |
| 15 | #ifndef mig_internal |
| 16 | #define mig_internal static __inline__ |
| 17 | #endif /* mig_internal */ |
| 18 | |
| 19 | #ifndef mig_external |
| 20 | #define mig_external |
| 21 | #endif /* mig_external */ |
| 22 | |
| 23 | #if !defined(__MigTypeCheck) && defined(TypeCheck) |
| 24 | #define __MigTypeCheck TypeCheck /* Legacy setting */ |
| 25 | #endif /* !defined(__MigTypeCheck) */ |
| 26 | |
| 27 | #if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) |
| 28 | #define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ |
| 29 | #endif /* !defined(__MigKernelSpecificCode) */ |
| 30 | |
| 31 | #ifndef LimitCheck |
| 32 | #define LimitCheck 0 |
| 33 | #endif /* LimitCheck */ |
| 34 | |
| 35 | #ifndef min |
| 36 | #define min(a,b) ( ((a) < (b))? (a): (b) ) |
| 37 | #endif /* min */ |
| 38 | |
| 39 | #if !defined(_WALIGN_) |
| 40 | #define _WALIGN_(x) (((x) + 3) & ~3) |
| 41 | #endif /* !defined(_WALIGN_) */ |
| 42 | |
| 43 | #if !defined(_WALIGNSZ_) |
| 44 | #define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) |
| 45 | #endif /* !defined(_WALIGNSZ_) */ |
| 46 | |
| 47 | #ifndef UseStaticTemplates |
| 48 | #define UseStaticTemplates 0 |
| 49 | #endif /* UseStaticTemplates */ |
| 50 | |
| 51 | #ifndef __DeclareRcvRpc |
| 52 | #define __DeclareRcvRpc(_NUM_, _NAME_) |
| 53 | #endif /* __DeclareRcvRpc */ |
| 54 | |
| 55 | #ifndef __BeforeRcvRpc |
| 56 | #define __BeforeRcvRpc(_NUM_, _NAME_) |
| 57 | #endif /* __BeforeRcvRpc */ |
| 58 | |
| 59 | #ifndef __AfterRcvRpc |
| 60 | #define __AfterRcvRpc(_NUM_, _NAME_) |
| 61 | #endif /* __AfterRcvRpc */ |
| 62 | |
| 63 | #ifndef __DeclareRcvSimple |
| 64 | #define __DeclareRcvSimple(_NUM_, _NAME_) |
| 65 | #endif /* __DeclareRcvSimple */ |
| 66 | |
| 67 | #ifndef __BeforeRcvSimple |
| 68 | #define __BeforeRcvSimple(_NUM_, _NAME_) |
| 69 | #endif /* __BeforeRcvSimple */ |
| 70 | |
| 71 | #ifndef __AfterRcvSimple |
| 72 | #define __AfterRcvSimple(_NUM_, _NAME_) |
| 73 | #endif /* __AfterRcvSimple */ |
| 74 | |
| 75 | #define novalue void |
| 76 | |
| 77 | #if __MigKernelSpecificCode |
| 78 | #define msgh_request_port msgh_remote_port |
| 79 | #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_REMOTE(bits) |
| 80 | #define msgh_reply_port msgh_local_port |
| 81 | #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_LOCAL(bits) |
| 82 | #else |
| 83 | #define msgh_request_port msgh_local_port |
| 84 | #define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) |
| 85 | #define msgh_reply_port msgh_remote_port |
| 86 | #define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) |
| 87 | #endif /* __MigKernelSpecificCode */ |
| 88 | |
| 89 | #define MIG_RETURN_ERROR(X, code) {\ |
| 90 | ((mig_reply_error_t *)X)->RetCode = code;\ |
| 91 | ((mig_reply_error_t *)X)->NDR = NDR_record;\ |
| 92 | return;\ |
| 93 | } |
| 94 | |
| 95 | /* Forward Declarations */ |
| 96 | |
| 97 | |
| 98 | mig_internal novalue _Xhost_info |
| 99 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 100 | |
| 101 | mig_internal novalue _Xhost_kernel_version |
| 102 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 103 | |
| 104 | mig_internal novalue _Xhost_page_size |
| 105 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 106 | |
| 107 | mig_internal novalue _Xmach_memory_object_memory_entry |
| 108 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 109 | |
| 110 | mig_internal novalue _Xhost_processor_info |
| 111 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 112 | |
| 113 | mig_internal novalue _Xhost_get_io_master |
| 114 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 115 | |
| 116 | mig_internal novalue _Xhost_get_clock_service |
| 117 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 118 | |
| 119 | mig_internal novalue _Xkmod_get_info |
| 120 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 121 | |
| 122 | mig_internal novalue _Xhost_virtual_physical_table_info |
| 123 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 124 | |
| 125 | mig_internal novalue _Xprocessor_set_default |
| 126 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 127 | |
| 128 | mig_internal novalue _Xprocessor_set_create |
| 129 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 130 | |
| 131 | mig_internal novalue _Xmach_memory_object_memory_entry_64 |
| 132 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 133 | |
| 134 | mig_internal novalue _Xhost_statistics_from_user |
| 135 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 136 | |
| 137 | mig_internal novalue _Xhost_request_notification |
| 138 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 139 | |
| 140 | mig_internal novalue _Xhost_lockgroup_info |
| 141 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 142 | |
| 143 | mig_internal novalue _Xhost_statistics64_from_user |
| 144 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 145 | |
| 146 | mig_internal novalue _Xmach_zone_info |
| 147 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 148 | |
| 149 | mig_internal novalue _Xmach_zone_force_gc |
| 150 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 151 | |
| 152 | mig_internal novalue _Xhost_create_mach_voucher |
| 153 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 154 | |
| 155 | mig_internal novalue _Xhost_register_mach_voucher_attr_manager |
| 156 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 157 | |
| 158 | mig_internal novalue _Xhost_register_well_known_mach_voucher_attr_manager |
| 159 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 160 | |
| 161 | mig_internal novalue _Xhost_set_atm_diagnostic_flag |
| 162 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 163 | |
| 164 | mig_internal novalue _Xmach_memory_info |
| 165 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 166 | |
| 167 | mig_internal novalue _Xhost_set_multiuser_config_flags |
| 168 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 169 | |
| 170 | mig_internal novalue _Xmach_zone_info_for_zone |
| 171 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 172 | |
| 173 | mig_internal novalue _Xmach_zone_info_for_largest_zone |
| 174 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 175 | |
| 176 | mig_internal novalue _Xmach_zone_get_zlog_zones |
| 177 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 178 | |
| 179 | mig_internal novalue _Xmach_zone_get_btlog_records |
| 180 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); |
| 181 | |
| 182 | |
| 183 | #if ( __MigTypeCheck ) |
| 184 | #if __MIG_check__Request__mach_host_subsystem__ |
| 185 | #if !defined(__MIG_check__Request__host_info_t__defined) |
| 186 | #define __MIG_check__Request__host_info_t__defined |
| 187 | |
| 188 | mig_internal kern_return_t __MIG_check__Request__host_info_t(__attribute__((__unused__)) __Request__host_info_t *In0P) |
| 189 | { |
| 190 | |
| 191 | typedef __Request__host_info_t __Request; |
| 192 | #if __MigTypeCheck |
| 193 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 194 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 195 | return MIG_BAD_ARGUMENTS; |
| 196 | #endif /* __MigTypeCheck */ |
| 197 | |
| 198 | return MACH_MSG_SUCCESS; |
| 199 | } |
| 200 | #endif /* !defined(__MIG_check__Request__host_info_t__defined) */ |
| 201 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 202 | #endif /* ( __MigTypeCheck ) */ |
| 203 | |
| 204 | |
| 205 | /* Routine host_info */ |
| 206 | mig_internal novalue _Xhost_info |
| 207 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 208 | { |
| 209 | |
| 210 | #ifdef __MigPackStructs |
| 211 | #pragma pack(4) |
| 212 | #endif |
| 213 | typedef struct { |
| 214 | mach_msg_header_t Head; |
| 215 | NDR_record_t NDR; |
| 216 | host_flavor_t flavor; |
| 217 | mach_msg_type_number_t host_info_outCnt; |
| 218 | mach_msg_trailer_t trailer; |
| 219 | } Request __attribute__((unused)); |
| 220 | #ifdef __MigPackStructs |
| 221 | #pragma pack() |
| 222 | #endif |
| 223 | typedef __Request__host_info_t __Request; |
| 224 | typedef __Reply__host_info_t Reply __attribute__((unused)); |
| 225 | |
| 226 | /* |
| 227 | * typedef struct { |
| 228 | * mach_msg_header_t Head; |
| 229 | * NDR_record_t NDR; |
| 230 | * kern_return_t RetCode; |
| 231 | * } mig_reply_error_t; |
| 232 | */ |
| 233 | |
| 234 | Request *In0P = (Request *) InHeadP; |
| 235 | Reply *OutP = (Reply *) OutHeadP; |
| 236 | #ifdef __MIG_check__Request__host_info_t__defined |
| 237 | kern_return_t check_result; |
| 238 | #endif /* __MIG_check__Request__host_info_t__defined */ |
| 239 | |
| 240 | #if __MigKernelSpecificCode |
| 241 | #else |
| 242 | #endif /* __MigKernelSpecificCode */ |
| 243 | __DeclareRcvRpc(200, "host_info" ) |
| 244 | __BeforeRcvRpc(200, "host_info" ) |
| 245 | |
| 246 | #if defined(__MIG_check__Request__host_info_t__defined) |
| 247 | check_result = __MIG_check__Request__host_info_t((__Request *)In0P); |
| 248 | if (check_result != MACH_MSG_SUCCESS) |
| 249 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 250 | #endif /* defined(__MIG_check__Request__host_info_t__defined) */ |
| 251 | |
| 252 | OutP->host_info_outCnt = 68; |
| 253 | if (In0P->host_info_outCnt < OutP->host_info_outCnt) |
| 254 | OutP->host_info_outCnt = In0P->host_info_outCnt; |
| 255 | |
| 256 | OutP->RetCode = host_info(convert_port_to_host(In0P->Head.msgh_request_port), In0P->flavor, OutP->host_info_out, &OutP->host_info_outCnt); |
| 257 | if (OutP->RetCode != KERN_SUCCESS) { |
| 258 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
| 259 | } |
| 260 | #if __MigKernelSpecificCode |
| 261 | #endif /* __MigKernelSpecificCode */ |
| 262 | |
| 263 | OutP->NDR = NDR_record; |
| 264 | |
| 265 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 272) + (((4 * OutP->host_info_outCnt))); |
| 266 | |
| 267 | __AfterRcvRpc(200, "host_info" ) |
| 268 | } |
| 269 | |
| 270 | #if ( __MigTypeCheck ) |
| 271 | #if __MIG_check__Request__mach_host_subsystem__ |
| 272 | #if !defined(__MIG_check__Request__host_kernel_version_t__defined) |
| 273 | #define __MIG_check__Request__host_kernel_version_t__defined |
| 274 | |
| 275 | mig_internal kern_return_t __MIG_check__Request__host_kernel_version_t(__attribute__((__unused__)) __Request__host_kernel_version_t *In0P) |
| 276 | { |
| 277 | |
| 278 | typedef __Request__host_kernel_version_t __Request; |
| 279 | #if __MigTypeCheck |
| 280 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 281 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 282 | return MIG_BAD_ARGUMENTS; |
| 283 | #endif /* __MigTypeCheck */ |
| 284 | |
| 285 | return MACH_MSG_SUCCESS; |
| 286 | } |
| 287 | #endif /* !defined(__MIG_check__Request__host_kernel_version_t__defined) */ |
| 288 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 289 | #endif /* ( __MigTypeCheck ) */ |
| 290 | |
| 291 | |
| 292 | /* Routine host_kernel_version */ |
| 293 | mig_internal novalue _Xhost_kernel_version |
| 294 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 295 | { |
| 296 | |
| 297 | #ifdef __MigPackStructs |
| 298 | #pragma pack(4) |
| 299 | #endif |
| 300 | typedef struct { |
| 301 | mach_msg_header_t Head; |
| 302 | mach_msg_trailer_t trailer; |
| 303 | } Request __attribute__((unused)); |
| 304 | #ifdef __MigPackStructs |
| 305 | #pragma pack() |
| 306 | #endif |
| 307 | typedef __Request__host_kernel_version_t __Request; |
| 308 | typedef __Reply__host_kernel_version_t Reply __attribute__((unused)); |
| 309 | |
| 310 | /* |
| 311 | * typedef struct { |
| 312 | * mach_msg_header_t Head; |
| 313 | * NDR_record_t NDR; |
| 314 | * kern_return_t RetCode; |
| 315 | * } mig_reply_error_t; |
| 316 | */ |
| 317 | |
| 318 | Request *In0P = (Request *) InHeadP; |
| 319 | Reply *OutP = (Reply *) OutHeadP; |
| 320 | #ifdef __MIG_check__Request__host_kernel_version_t__defined |
| 321 | kern_return_t check_result; |
| 322 | #endif /* __MIG_check__Request__host_kernel_version_t__defined */ |
| 323 | |
| 324 | #if __MigKernelSpecificCode |
| 325 | #else |
| 326 | #endif /* __MigKernelSpecificCode */ |
| 327 | __DeclareRcvRpc(201, "host_kernel_version" ) |
| 328 | __BeforeRcvRpc(201, "host_kernel_version" ) |
| 329 | |
| 330 | #if defined(__MIG_check__Request__host_kernel_version_t__defined) |
| 331 | check_result = __MIG_check__Request__host_kernel_version_t((__Request *)In0P); |
| 332 | if (check_result != MACH_MSG_SUCCESS) |
| 333 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 334 | #endif /* defined(__MIG_check__Request__host_kernel_version_t__defined) */ |
| 335 | |
| 336 | OutP->RetCode = host_kernel_version(convert_port_to_host(In0P->Head.msgh_request_port), OutP->kernel_version); |
| 337 | if (OutP->RetCode != KERN_SUCCESS) { |
| 338 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
| 339 | } |
| 340 | #if __MigKernelSpecificCode |
| 341 | #endif /* __MigKernelSpecificCode */ |
| 342 | |
| 343 | OutP->NDR = NDR_record; |
| 344 | |
| 345 | #ifdef __LP64__ |
| 346 | { |
| 347 | size_t strLength = strlen(OutP->kernel_version) + 1; |
| 348 | if (strLength > 0xffffffff) |
| 349 | MIG_RETURN_ERROR(OutP, MIG_BAD_ARGUMENTS); |
| 350 | OutP->kernel_versionCnt = (mach_msg_type_number_t) strLength; |
| 351 | } |
| 352 | #else |
| 353 | OutP->kernel_versionCnt = (mach_msg_type_number_t) strlen(OutP->kernel_version) + 1; |
| 354 | #endif /* __LP64__ */ |
| 355 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 512) + (_WALIGN_((OutP->kernel_versionCnt + 3) & ~3)); |
| 356 | |
| 357 | __AfterRcvRpc(201, "host_kernel_version" ) |
| 358 | } |
| 359 | |
| 360 | #if ( __MigTypeCheck ) |
| 361 | #if __MIG_check__Request__mach_host_subsystem__ |
| 362 | #if !defined(__MIG_check__Request__host_page_size_t__defined) |
| 363 | #define __MIG_check__Request__host_page_size_t__defined |
| 364 | |
| 365 | mig_internal kern_return_t __MIG_check__Request__host_page_size_t(__attribute__((__unused__)) __Request__host_page_size_t *In0P) |
| 366 | { |
| 367 | |
| 368 | typedef __Request__host_page_size_t __Request; |
| 369 | #if __MigTypeCheck |
| 370 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 371 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 372 | return MIG_BAD_ARGUMENTS; |
| 373 | #endif /* __MigTypeCheck */ |
| 374 | |
| 375 | return MACH_MSG_SUCCESS; |
| 376 | } |
| 377 | #endif /* !defined(__MIG_check__Request__host_page_size_t__defined) */ |
| 378 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 379 | #endif /* ( __MigTypeCheck ) */ |
| 380 | |
| 381 | |
| 382 | /* Routine host_page_size */ |
| 383 | mig_internal novalue _Xhost_page_size |
| 384 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 385 | { |
| 386 | |
| 387 | #ifdef __MigPackStructs |
| 388 | #pragma pack(4) |
| 389 | #endif |
| 390 | typedef struct { |
| 391 | mach_msg_header_t Head; |
| 392 | mach_msg_trailer_t trailer; |
| 393 | } Request __attribute__((unused)); |
| 394 | #ifdef __MigPackStructs |
| 395 | #pragma pack() |
| 396 | #endif |
| 397 | typedef __Request__host_page_size_t __Request; |
| 398 | typedef __Reply__host_page_size_t Reply __attribute__((unused)); |
| 399 | |
| 400 | /* |
| 401 | * typedef struct { |
| 402 | * mach_msg_header_t Head; |
| 403 | * NDR_record_t NDR; |
| 404 | * kern_return_t RetCode; |
| 405 | * } mig_reply_error_t; |
| 406 | */ |
| 407 | |
| 408 | Request *In0P = (Request *) InHeadP; |
| 409 | Reply *OutP = (Reply *) OutHeadP; |
| 410 | #ifdef __MIG_check__Request__host_page_size_t__defined |
| 411 | kern_return_t check_result; |
| 412 | #endif /* __MIG_check__Request__host_page_size_t__defined */ |
| 413 | |
| 414 | #if __MigKernelSpecificCode |
| 415 | #else |
| 416 | #endif /* __MigKernelSpecificCode */ |
| 417 | __DeclareRcvRpc(202, "host_page_size" ) |
| 418 | __BeforeRcvRpc(202, "host_page_size" ) |
| 419 | |
| 420 | #if defined(__MIG_check__Request__host_page_size_t__defined) |
| 421 | check_result = __MIG_check__Request__host_page_size_t((__Request *)In0P); |
| 422 | if (check_result != MACH_MSG_SUCCESS) |
| 423 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 424 | #endif /* defined(__MIG_check__Request__host_page_size_t__defined) */ |
| 425 | |
| 426 | OutP->RetCode = host_page_size(convert_port_to_host(In0P->Head.msgh_request_port), &OutP->out_page_size); |
| 427 | if (OutP->RetCode != KERN_SUCCESS) { |
| 428 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
| 429 | } |
| 430 | #if __MigKernelSpecificCode |
| 431 | #endif /* __MigKernelSpecificCode */ |
| 432 | |
| 433 | OutP->NDR = NDR_record; |
| 434 | |
| 435 | |
| 436 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 437 | __AfterRcvRpc(202, "host_page_size" ) |
| 438 | } |
| 439 | |
| 440 | #if ( __MigTypeCheck ) |
| 441 | #if __MIG_check__Request__mach_host_subsystem__ |
| 442 | #if !defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) |
| 443 | #define __MIG_check__Request__mach_memory_object_memory_entry_t__defined |
| 444 | |
| 445 | mig_internal kern_return_t __MIG_check__Request__mach_memory_object_memory_entry_t(__attribute__((__unused__)) __Request__mach_memory_object_memory_entry_t *In0P) |
| 446 | { |
| 447 | |
| 448 | typedef __Request__mach_memory_object_memory_entry_t __Request; |
| 449 | #if __MigTypeCheck |
| 450 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 451 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
| 452 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 453 | return MIG_BAD_ARGUMENTS; |
| 454 | #endif /* __MigTypeCheck */ |
| 455 | |
| 456 | #if __MigTypeCheck |
| 457 | if (In0P->pager.type != MACH_MSG_PORT_DESCRIPTOR || |
| 458 | In0P->pager.disposition != 17) |
| 459 | return MIG_TYPE_ERROR; |
| 460 | #endif /* __MigTypeCheck */ |
| 461 | |
| 462 | return MACH_MSG_SUCCESS; |
| 463 | } |
| 464 | #endif /* !defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) */ |
| 465 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 466 | #endif /* ( __MigTypeCheck ) */ |
| 467 | |
| 468 | |
| 469 | /* Routine mach_memory_object_memory_entry */ |
| 470 | mig_internal novalue _Xmach_memory_object_memory_entry |
| 471 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 472 | { |
| 473 | |
| 474 | #ifdef __MigPackStructs |
| 475 | #pragma pack(4) |
| 476 | #endif |
| 477 | typedef struct { |
| 478 | mach_msg_header_t Head; |
| 479 | /* start of the kernel processed data */ |
| 480 | mach_msg_body_t msgh_body; |
| 481 | mach_msg_port_descriptor_t ; |
| 482 | /* end of the kernel processed data */ |
| 483 | NDR_record_t NDR; |
| 484 | boolean_t internal; |
| 485 | vm_size_t size; |
| 486 | vm_prot_t permission; |
| 487 | mach_msg_trailer_t trailer; |
| 488 | } Request __attribute__((unused)); |
| 489 | #ifdef __MigPackStructs |
| 490 | #pragma pack() |
| 491 | #endif |
| 492 | typedef __Request__mach_memory_object_memory_entry_t __Request; |
| 493 | typedef __Reply__mach_memory_object_memory_entry_t Reply __attribute__((unused)); |
| 494 | |
| 495 | /* |
| 496 | * typedef struct { |
| 497 | * mach_msg_header_t Head; |
| 498 | * NDR_record_t NDR; |
| 499 | * kern_return_t RetCode; |
| 500 | * } mig_reply_error_t; |
| 501 | */ |
| 502 | |
| 503 | Request *In0P = (Request *) InHeadP; |
| 504 | Reply *OutP = (Reply *) OutHeadP; |
| 505 | #ifdef __MIG_check__Request__mach_memory_object_memory_entry_t__defined |
| 506 | kern_return_t check_result; |
| 507 | #endif /* __MIG_check__Request__mach_memory_object_memory_entry_t__defined */ |
| 508 | |
| 509 | #if __MigKernelSpecificCode |
| 510 | #if UseStaticTemplates |
| 511 | const static mach_msg_port_descriptor_t entry_handleTemplate = { |
| 512 | /* name = */ MACH_PORT_NULL, |
| 513 | /* pad1 = */ 0, |
| 514 | /* pad2 = */ 0, |
| 515 | /* disp = */ 17, |
| 516 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 517 | }; |
| 518 | #endif /* UseStaticTemplates */ |
| 519 | |
| 520 | #else |
| 521 | #if UseStaticTemplates |
| 522 | const static mach_msg_port_descriptor_t entry_handleTemplate = { |
| 523 | /* name = */ MACH_PORT_NULL, |
| 524 | /* pad1 = */ 0, |
| 525 | /* pad2 = */ 0, |
| 526 | /* disp = */ 17, |
| 527 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 528 | }; |
| 529 | #endif /* UseStaticTemplates */ |
| 530 | |
| 531 | #endif /* __MigKernelSpecificCode */ |
| 532 | kern_return_t RetCode; |
| 533 | __DeclareRcvRpc(203, "mach_memory_object_memory_entry" ) |
| 534 | __BeforeRcvRpc(203, "mach_memory_object_memory_entry" ) |
| 535 | |
| 536 | #if defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) |
| 537 | check_result = __MIG_check__Request__mach_memory_object_memory_entry_t((__Request *)In0P); |
| 538 | if (check_result != MACH_MSG_SUCCESS) |
| 539 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 540 | #endif /* defined(__MIG_check__Request__mach_memory_object_memory_entry_t__defined) */ |
| 541 | |
| 542 | #if UseStaticTemplates |
| 543 | OutP->entry_handle = entry_handleTemplate; |
| 544 | #else /* UseStaticTemplates */ |
| 545 | #if __MigKernelSpecificCode |
| 546 | OutP->entry_handle.disposition = 17; |
| 547 | #else |
| 548 | OutP->entry_handle.disposition = 17; |
| 549 | #endif /* __MigKernelSpecificCode */ |
| 550 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 551 | OutP->entry_handle.pad1 = 0; |
| 552 | #endif |
| 553 | OutP->entry_handle.pad2 = 0; |
| 554 | OutP->entry_handle.type = MACH_MSG_PORT_DESCRIPTOR; |
| 555 | #if defined(KERNEL) |
| 556 | OutP->entry_handle.pad_end = 0; |
| 557 | #endif |
| 558 | #endif /* UseStaticTemplates */ |
| 559 | |
| 560 | |
| 561 | RetCode = mach_memory_object_memory_entry(convert_port_to_host(In0P->Head.msgh_request_port), In0P->internal, In0P->size, In0P->permission, convert_port_to_memory_object(In0P->pager.name), &OutP->entry_handle.name); |
| 562 | if (RetCode != KERN_SUCCESS) { |
| 563 | MIG_RETURN_ERROR(OutP, RetCode); |
| 564 | } |
| 565 | #if __MigKernelSpecificCode |
| 566 | |
| 567 | if (IP_VALID((ipc_port_t)In0P->pager.name)) |
| 568 | ipc_port_release_send((ipc_port_t)In0P->pager.name); |
| 569 | #endif /* __MigKernelSpecificCode */ |
| 570 | |
| 571 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 572 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 573 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 574 | __AfterRcvRpc(203, "mach_memory_object_memory_entry" ) |
| 575 | } |
| 576 | |
| 577 | #if ( __MigTypeCheck ) |
| 578 | #if __MIG_check__Request__mach_host_subsystem__ |
| 579 | #if !defined(__MIG_check__Request__host_processor_info_t__defined) |
| 580 | #define __MIG_check__Request__host_processor_info_t__defined |
| 581 | |
| 582 | mig_internal kern_return_t __MIG_check__Request__host_processor_info_t(__attribute__((__unused__)) __Request__host_processor_info_t *In0P) |
| 583 | { |
| 584 | |
| 585 | typedef __Request__host_processor_info_t __Request; |
| 586 | #if __MigTypeCheck |
| 587 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 588 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 589 | return MIG_BAD_ARGUMENTS; |
| 590 | #endif /* __MigTypeCheck */ |
| 591 | |
| 592 | return MACH_MSG_SUCCESS; |
| 593 | } |
| 594 | #endif /* !defined(__MIG_check__Request__host_processor_info_t__defined) */ |
| 595 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 596 | #endif /* ( __MigTypeCheck ) */ |
| 597 | |
| 598 | |
| 599 | /* Routine host_processor_info */ |
| 600 | mig_internal novalue _Xhost_processor_info |
| 601 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 602 | { |
| 603 | |
| 604 | #ifdef __MigPackStructs |
| 605 | #pragma pack(4) |
| 606 | #endif |
| 607 | typedef struct { |
| 608 | mach_msg_header_t Head; |
| 609 | NDR_record_t NDR; |
| 610 | processor_flavor_t flavor; |
| 611 | mach_msg_trailer_t trailer; |
| 612 | } Request __attribute__((unused)); |
| 613 | #ifdef __MigPackStructs |
| 614 | #pragma pack() |
| 615 | #endif |
| 616 | typedef __Request__host_processor_info_t __Request; |
| 617 | typedef __Reply__host_processor_info_t Reply __attribute__((unused)); |
| 618 | |
| 619 | /* |
| 620 | * typedef struct { |
| 621 | * mach_msg_header_t Head; |
| 622 | * NDR_record_t NDR; |
| 623 | * kern_return_t RetCode; |
| 624 | * } mig_reply_error_t; |
| 625 | */ |
| 626 | |
| 627 | Request *In0P = (Request *) InHeadP; |
| 628 | Reply *OutP = (Reply *) OutHeadP; |
| 629 | #ifdef __MIG_check__Request__host_processor_info_t__defined |
| 630 | kern_return_t check_result; |
| 631 | #endif /* __MIG_check__Request__host_processor_info_t__defined */ |
| 632 | |
| 633 | #if __MigKernelSpecificCode |
| 634 | #if UseStaticTemplates |
| 635 | const static mach_msg_ool_descriptor_t out_processor_infoTemplate = { |
| 636 | /* addr = */ (void *)0, |
| 637 | /* size = */ 0, |
| 638 | /* deal = */ FALSE, |
| 639 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 640 | /* pad2 = */ 0, |
| 641 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 642 | }; |
| 643 | #endif /* UseStaticTemplates */ |
| 644 | |
| 645 | #else |
| 646 | #if UseStaticTemplates |
| 647 | const static mach_msg_ool_descriptor_t out_processor_infoTemplate = { |
| 648 | /* addr = */ (void *)0, |
| 649 | /* size = */ 0, |
| 650 | /* deal = */ FALSE, |
| 651 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 652 | /* pad2 = */ 0, |
| 653 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 654 | }; |
| 655 | #endif /* UseStaticTemplates */ |
| 656 | |
| 657 | #endif /* __MigKernelSpecificCode */ |
| 658 | kern_return_t RetCode; |
| 659 | __DeclareRcvRpc(204, "host_processor_info" ) |
| 660 | __BeforeRcvRpc(204, "host_processor_info" ) |
| 661 | |
| 662 | #if defined(__MIG_check__Request__host_processor_info_t__defined) |
| 663 | check_result = __MIG_check__Request__host_processor_info_t((__Request *)In0P); |
| 664 | if (check_result != MACH_MSG_SUCCESS) |
| 665 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 666 | #endif /* defined(__MIG_check__Request__host_processor_info_t__defined) */ |
| 667 | |
| 668 | #if UseStaticTemplates |
| 669 | OutP->out_processor_info = out_processor_infoTemplate; |
| 670 | #else /* UseStaticTemplates */ |
| 671 | OutP->out_processor_info.deallocate = FALSE; |
| 672 | OutP->out_processor_info.copy = MACH_MSG_VIRTUAL_COPY; |
| 673 | OutP->out_processor_info.pad1 = 0; |
| 674 | OutP->out_processor_info.type = MACH_MSG_OOL_DESCRIPTOR; |
| 675 | #if defined(KERNEL) && !defined(__LP64__) |
| 676 | OutP->out_processor_info.pad_end = 0; |
| 677 | #endif |
| 678 | #endif /* UseStaticTemplates */ |
| 679 | |
| 680 | |
| 681 | RetCode = host_processor_info(convert_port_to_host(In0P->Head.msgh_request_port), In0P->flavor, &OutP->out_processor_count, (processor_info_array_t *)&(OutP->out_processor_info.address), &OutP->out_processor_infoCnt); |
| 682 | if (RetCode != KERN_SUCCESS) { |
| 683 | MIG_RETURN_ERROR(OutP, RetCode); |
| 684 | } |
| 685 | #if __MigKernelSpecificCode |
| 686 | #endif /* __MigKernelSpecificCode */ |
| 687 | OutP->out_processor_info.size = OutP->out_processor_infoCnt * 4; |
| 688 | |
| 689 | |
| 690 | OutP->NDR = NDR_record; |
| 691 | |
| 692 | |
| 693 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 694 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 695 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 696 | __AfterRcvRpc(204, "host_processor_info" ) |
| 697 | } |
| 698 | |
| 699 | #if ( __MigTypeCheck ) |
| 700 | #if __MIG_check__Request__mach_host_subsystem__ |
| 701 | #if !defined(__MIG_check__Request__host_get_io_master_t__defined) |
| 702 | #define __MIG_check__Request__host_get_io_master_t__defined |
| 703 | |
| 704 | mig_internal kern_return_t __MIG_check__Request__host_get_io_master_t(__attribute__((__unused__)) __Request__host_get_io_master_t *In0P) |
| 705 | { |
| 706 | |
| 707 | typedef __Request__host_get_io_master_t __Request; |
| 708 | #if __MigTypeCheck |
| 709 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 710 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 711 | return MIG_BAD_ARGUMENTS; |
| 712 | #endif /* __MigTypeCheck */ |
| 713 | |
| 714 | return MACH_MSG_SUCCESS; |
| 715 | } |
| 716 | #endif /* !defined(__MIG_check__Request__host_get_io_master_t__defined) */ |
| 717 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 718 | #endif /* ( __MigTypeCheck ) */ |
| 719 | |
| 720 | |
| 721 | /* Routine host_get_io_master */ |
| 722 | mig_internal novalue _Xhost_get_io_master |
| 723 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 724 | { |
| 725 | |
| 726 | #ifdef __MigPackStructs |
| 727 | #pragma pack(4) |
| 728 | #endif |
| 729 | typedef struct { |
| 730 | mach_msg_header_t Head; |
| 731 | mach_msg_trailer_t trailer; |
| 732 | } Request __attribute__((unused)); |
| 733 | #ifdef __MigPackStructs |
| 734 | #pragma pack() |
| 735 | #endif |
| 736 | typedef __Request__host_get_io_master_t __Request; |
| 737 | typedef __Reply__host_get_io_master_t Reply __attribute__((unused)); |
| 738 | |
| 739 | /* |
| 740 | * typedef struct { |
| 741 | * mach_msg_header_t Head; |
| 742 | * NDR_record_t NDR; |
| 743 | * kern_return_t RetCode; |
| 744 | * } mig_reply_error_t; |
| 745 | */ |
| 746 | |
| 747 | Request *In0P = (Request *) InHeadP; |
| 748 | Reply *OutP = (Reply *) OutHeadP; |
| 749 | #ifdef __MIG_check__Request__host_get_io_master_t__defined |
| 750 | kern_return_t check_result; |
| 751 | #endif /* __MIG_check__Request__host_get_io_master_t__defined */ |
| 752 | |
| 753 | #if __MigKernelSpecificCode |
| 754 | #if UseStaticTemplates |
| 755 | const static mach_msg_port_descriptor_t io_masterTemplate = { |
| 756 | /* name = */ MACH_PORT_NULL, |
| 757 | /* pad1 = */ 0, |
| 758 | /* pad2 = */ 0, |
| 759 | /* disp = */ 17, |
| 760 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 761 | }; |
| 762 | #endif /* UseStaticTemplates */ |
| 763 | |
| 764 | #else |
| 765 | #if UseStaticTemplates |
| 766 | const static mach_msg_port_descriptor_t io_masterTemplate = { |
| 767 | /* name = */ MACH_PORT_NULL, |
| 768 | /* pad1 = */ 0, |
| 769 | /* pad2 = */ 0, |
| 770 | /* disp = */ 19, |
| 771 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 772 | }; |
| 773 | #endif /* UseStaticTemplates */ |
| 774 | |
| 775 | #endif /* __MigKernelSpecificCode */ |
| 776 | kern_return_t RetCode; |
| 777 | __DeclareRcvRpc(205, "host_get_io_master" ) |
| 778 | __BeforeRcvRpc(205, "host_get_io_master" ) |
| 779 | |
| 780 | #if defined(__MIG_check__Request__host_get_io_master_t__defined) |
| 781 | check_result = __MIG_check__Request__host_get_io_master_t((__Request *)In0P); |
| 782 | if (check_result != MACH_MSG_SUCCESS) |
| 783 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 784 | #endif /* defined(__MIG_check__Request__host_get_io_master_t__defined) */ |
| 785 | |
| 786 | #if UseStaticTemplates |
| 787 | OutP->io_master = io_masterTemplate; |
| 788 | #else /* UseStaticTemplates */ |
| 789 | #if __MigKernelSpecificCode |
| 790 | OutP->io_master.disposition = 17; |
| 791 | #else |
| 792 | OutP->io_master.disposition = 19; |
| 793 | #endif /* __MigKernelSpecificCode */ |
| 794 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 795 | OutP->io_master.pad1 = 0; |
| 796 | #endif |
| 797 | OutP->io_master.pad2 = 0; |
| 798 | OutP->io_master.type = MACH_MSG_PORT_DESCRIPTOR; |
| 799 | #if defined(KERNEL) |
| 800 | OutP->io_master.pad_end = 0; |
| 801 | #endif |
| 802 | #endif /* UseStaticTemplates */ |
| 803 | |
| 804 | |
| 805 | RetCode = host_get_io_master(convert_port_to_host(In0P->Head.msgh_request_port), &OutP->io_master.name); |
| 806 | if (RetCode != KERN_SUCCESS) { |
| 807 | MIG_RETURN_ERROR(OutP, RetCode); |
| 808 | } |
| 809 | #if __MigKernelSpecificCode |
| 810 | #endif /* __MigKernelSpecificCode */ |
| 811 | |
| 812 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 813 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 814 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 815 | __AfterRcvRpc(205, "host_get_io_master" ) |
| 816 | } |
| 817 | |
| 818 | #if ( __MigTypeCheck ) |
| 819 | #if __MIG_check__Request__mach_host_subsystem__ |
| 820 | #if !defined(__MIG_check__Request__host_get_clock_service_t__defined) |
| 821 | #define __MIG_check__Request__host_get_clock_service_t__defined |
| 822 | |
| 823 | mig_internal kern_return_t __MIG_check__Request__host_get_clock_service_t(__attribute__((__unused__)) __Request__host_get_clock_service_t *In0P) |
| 824 | { |
| 825 | |
| 826 | typedef __Request__host_get_clock_service_t __Request; |
| 827 | #if __MigTypeCheck |
| 828 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 829 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 830 | return MIG_BAD_ARGUMENTS; |
| 831 | #endif /* __MigTypeCheck */ |
| 832 | |
| 833 | return MACH_MSG_SUCCESS; |
| 834 | } |
| 835 | #endif /* !defined(__MIG_check__Request__host_get_clock_service_t__defined) */ |
| 836 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 837 | #endif /* ( __MigTypeCheck ) */ |
| 838 | |
| 839 | |
| 840 | /* Routine host_get_clock_service */ |
| 841 | mig_internal novalue _Xhost_get_clock_service |
| 842 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 843 | { |
| 844 | |
| 845 | #ifdef __MigPackStructs |
| 846 | #pragma pack(4) |
| 847 | #endif |
| 848 | typedef struct { |
| 849 | mach_msg_header_t Head; |
| 850 | NDR_record_t NDR; |
| 851 | clock_id_t clock_id; |
| 852 | mach_msg_trailer_t trailer; |
| 853 | } Request __attribute__((unused)); |
| 854 | #ifdef __MigPackStructs |
| 855 | #pragma pack() |
| 856 | #endif |
| 857 | typedef __Request__host_get_clock_service_t __Request; |
| 858 | typedef __Reply__host_get_clock_service_t Reply __attribute__((unused)); |
| 859 | |
| 860 | /* |
| 861 | * typedef struct { |
| 862 | * mach_msg_header_t Head; |
| 863 | * NDR_record_t NDR; |
| 864 | * kern_return_t RetCode; |
| 865 | * } mig_reply_error_t; |
| 866 | */ |
| 867 | |
| 868 | Request *In0P = (Request *) InHeadP; |
| 869 | Reply *OutP = (Reply *) OutHeadP; |
| 870 | #ifdef __MIG_check__Request__host_get_clock_service_t__defined |
| 871 | kern_return_t check_result; |
| 872 | #endif /* __MIG_check__Request__host_get_clock_service_t__defined */ |
| 873 | |
| 874 | #if __MigKernelSpecificCode |
| 875 | #if UseStaticTemplates |
| 876 | const static mach_msg_port_descriptor_t clock_servTemplate = { |
| 877 | /* name = */ MACH_PORT_NULL, |
| 878 | /* pad1 = */ 0, |
| 879 | /* pad2 = */ 0, |
| 880 | /* disp = */ 17, |
| 881 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 882 | }; |
| 883 | #endif /* UseStaticTemplates */ |
| 884 | |
| 885 | #else |
| 886 | #if UseStaticTemplates |
| 887 | const static mach_msg_port_descriptor_t clock_servTemplate = { |
| 888 | /* name = */ MACH_PORT_NULL, |
| 889 | /* pad1 = */ 0, |
| 890 | /* pad2 = */ 0, |
| 891 | /* disp = */ 19, |
| 892 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 893 | }; |
| 894 | #endif /* UseStaticTemplates */ |
| 895 | |
| 896 | #endif /* __MigKernelSpecificCode */ |
| 897 | kern_return_t RetCode; |
| 898 | clock_serv_t clock_serv; |
| 899 | |
| 900 | __DeclareRcvRpc(206, "host_get_clock_service" ) |
| 901 | __BeforeRcvRpc(206, "host_get_clock_service" ) |
| 902 | |
| 903 | #if defined(__MIG_check__Request__host_get_clock_service_t__defined) |
| 904 | check_result = __MIG_check__Request__host_get_clock_service_t((__Request *)In0P); |
| 905 | if (check_result != MACH_MSG_SUCCESS) |
| 906 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 907 | #endif /* defined(__MIG_check__Request__host_get_clock_service_t__defined) */ |
| 908 | |
| 909 | #if UseStaticTemplates |
| 910 | OutP->clock_serv = clock_servTemplate; |
| 911 | #else /* UseStaticTemplates */ |
| 912 | #if __MigKernelSpecificCode |
| 913 | OutP->clock_serv.disposition = 17; |
| 914 | #else |
| 915 | OutP->clock_serv.disposition = 19; |
| 916 | #endif /* __MigKernelSpecificCode */ |
| 917 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 918 | OutP->clock_serv.pad1 = 0; |
| 919 | #endif |
| 920 | OutP->clock_serv.pad2 = 0; |
| 921 | OutP->clock_serv.type = MACH_MSG_PORT_DESCRIPTOR; |
| 922 | #if defined(KERNEL) |
| 923 | OutP->clock_serv.pad_end = 0; |
| 924 | #endif |
| 925 | #endif /* UseStaticTemplates */ |
| 926 | |
| 927 | |
| 928 | RetCode = host_get_clock_service(convert_port_to_host(In0P->Head.msgh_request_port), In0P->clock_id, &clock_serv); |
| 929 | if (RetCode != KERN_SUCCESS) { |
| 930 | MIG_RETURN_ERROR(OutP, RetCode); |
| 931 | } |
| 932 | #if __MigKernelSpecificCode |
| 933 | #endif /* __MigKernelSpecificCode */ |
| 934 | OutP->clock_serv.name = (mach_port_t)convert_clock_to_port(clock_serv); |
| 935 | |
| 936 | |
| 937 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 938 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 939 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 940 | __AfterRcvRpc(206, "host_get_clock_service" ) |
| 941 | } |
| 942 | |
| 943 | #if ( __MigTypeCheck ) |
| 944 | #if __MIG_check__Request__mach_host_subsystem__ |
| 945 | #if !defined(__MIG_check__Request__kmod_get_info_t__defined) |
| 946 | #define __MIG_check__Request__kmod_get_info_t__defined |
| 947 | |
| 948 | mig_internal kern_return_t __MIG_check__Request__kmod_get_info_t(__attribute__((__unused__)) __Request__kmod_get_info_t *In0P) |
| 949 | { |
| 950 | |
| 951 | typedef __Request__kmod_get_info_t __Request; |
| 952 | #if __MigTypeCheck |
| 953 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 954 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 955 | return MIG_BAD_ARGUMENTS; |
| 956 | #endif /* __MigTypeCheck */ |
| 957 | |
| 958 | return MACH_MSG_SUCCESS; |
| 959 | } |
| 960 | #endif /* !defined(__MIG_check__Request__kmod_get_info_t__defined) */ |
| 961 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 962 | #endif /* ( __MigTypeCheck ) */ |
| 963 | |
| 964 | |
| 965 | /* Routine kmod_get_info */ |
| 966 | mig_internal novalue _Xkmod_get_info |
| 967 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 968 | { |
| 969 | |
| 970 | #ifdef __MigPackStructs |
| 971 | #pragma pack(4) |
| 972 | #endif |
| 973 | typedef struct { |
| 974 | mach_msg_header_t Head; |
| 975 | mach_msg_trailer_t trailer; |
| 976 | } Request __attribute__((unused)); |
| 977 | #ifdef __MigPackStructs |
| 978 | #pragma pack() |
| 979 | #endif |
| 980 | typedef __Request__kmod_get_info_t __Request; |
| 981 | typedef __Reply__kmod_get_info_t Reply __attribute__((unused)); |
| 982 | |
| 983 | /* |
| 984 | * typedef struct { |
| 985 | * mach_msg_header_t Head; |
| 986 | * NDR_record_t NDR; |
| 987 | * kern_return_t RetCode; |
| 988 | * } mig_reply_error_t; |
| 989 | */ |
| 990 | |
| 991 | Request *In0P = (Request *) InHeadP; |
| 992 | Reply *OutP = (Reply *) OutHeadP; |
| 993 | #ifdef __MIG_check__Request__kmod_get_info_t__defined |
| 994 | kern_return_t check_result; |
| 995 | #endif /* __MIG_check__Request__kmod_get_info_t__defined */ |
| 996 | |
| 997 | #if __MigKernelSpecificCode |
| 998 | #if UseStaticTemplates |
| 999 | const static mach_msg_ool_descriptor_t modulesTemplate = { |
| 1000 | /* addr = */ (void *)0, |
| 1001 | /* size = */ 0, |
| 1002 | /* deal = */ FALSE, |
| 1003 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 1004 | /* pad2 = */ 0, |
| 1005 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 1006 | }; |
| 1007 | #endif /* UseStaticTemplates */ |
| 1008 | |
| 1009 | #else |
| 1010 | #if UseStaticTemplates |
| 1011 | const static mach_msg_ool_descriptor_t modulesTemplate = { |
| 1012 | /* addr = */ (void *)0, |
| 1013 | /* size = */ 0, |
| 1014 | /* deal = */ FALSE, |
| 1015 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 1016 | /* pad2 = */ 0, |
| 1017 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 1018 | }; |
| 1019 | #endif /* UseStaticTemplates */ |
| 1020 | |
| 1021 | #endif /* __MigKernelSpecificCode */ |
| 1022 | kern_return_t RetCode; |
| 1023 | __DeclareRcvRpc(207, "kmod_get_info" ) |
| 1024 | __BeforeRcvRpc(207, "kmod_get_info" ) |
| 1025 | |
| 1026 | #if defined(__MIG_check__Request__kmod_get_info_t__defined) |
| 1027 | check_result = __MIG_check__Request__kmod_get_info_t((__Request *)In0P); |
| 1028 | if (check_result != MACH_MSG_SUCCESS) |
| 1029 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 1030 | #endif /* defined(__MIG_check__Request__kmod_get_info_t__defined) */ |
| 1031 | |
| 1032 | #if UseStaticTemplates |
| 1033 | OutP->modules = modulesTemplate; |
| 1034 | #else /* UseStaticTemplates */ |
| 1035 | OutP->modules.deallocate = FALSE; |
| 1036 | OutP->modules.copy = MACH_MSG_VIRTUAL_COPY; |
| 1037 | OutP->modules.pad1 = 0; |
| 1038 | OutP->modules.type = MACH_MSG_OOL_DESCRIPTOR; |
| 1039 | #if defined(KERNEL) && !defined(__LP64__) |
| 1040 | OutP->modules.pad_end = 0; |
| 1041 | #endif |
| 1042 | #endif /* UseStaticTemplates */ |
| 1043 | |
| 1044 | |
| 1045 | RetCode = kmod_get_info(convert_port_to_host(In0P->Head.msgh_request_port), (kmod_args_t *)&(OutP->modules.address), &OutP->modulesCnt); |
| 1046 | if (RetCode != KERN_SUCCESS) { |
| 1047 | MIG_RETURN_ERROR(OutP, RetCode); |
| 1048 | } |
| 1049 | #if __MigKernelSpecificCode |
| 1050 | #endif /* __MigKernelSpecificCode */ |
| 1051 | OutP->modules.size = OutP->modulesCnt; |
| 1052 | |
| 1053 | |
| 1054 | OutP->NDR = NDR_record; |
| 1055 | |
| 1056 | |
| 1057 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 1058 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 1059 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 1060 | __AfterRcvRpc(207, "kmod_get_info" ) |
| 1061 | } |
| 1062 | |
| 1063 | #if ( __MigTypeCheck ) |
| 1064 | #if __MIG_check__Request__mach_host_subsystem__ |
| 1065 | #if !defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) |
| 1066 | #define __MIG_check__Request__host_virtual_physical_table_info_t__defined |
| 1067 | |
| 1068 | mig_internal kern_return_t __MIG_check__Request__host_virtual_physical_table_info_t(__attribute__((__unused__)) __Request__host_virtual_physical_table_info_t *In0P) |
| 1069 | { |
| 1070 | |
| 1071 | typedef __Request__host_virtual_physical_table_info_t __Request; |
| 1072 | #if __MigTypeCheck |
| 1073 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 1074 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 1075 | return MIG_BAD_ARGUMENTS; |
| 1076 | #endif /* __MigTypeCheck */ |
| 1077 | |
| 1078 | return MACH_MSG_SUCCESS; |
| 1079 | } |
| 1080 | #endif /* !defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) */ |
| 1081 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 1082 | #endif /* ( __MigTypeCheck ) */ |
| 1083 | |
| 1084 | |
| 1085 | /* Routine host_virtual_physical_table_info */ |
| 1086 | mig_internal novalue _Xhost_virtual_physical_table_info |
| 1087 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 1088 | { |
| 1089 | |
| 1090 | #ifdef __MigPackStructs |
| 1091 | #pragma pack(4) |
| 1092 | #endif |
| 1093 | typedef struct { |
| 1094 | mach_msg_header_t Head; |
| 1095 | mach_msg_trailer_t trailer; |
| 1096 | } Request __attribute__((unused)); |
| 1097 | #ifdef __MigPackStructs |
| 1098 | #pragma pack() |
| 1099 | #endif |
| 1100 | typedef __Request__host_virtual_physical_table_info_t __Request; |
| 1101 | typedef __Reply__host_virtual_physical_table_info_t Reply __attribute__((unused)); |
| 1102 | |
| 1103 | /* |
| 1104 | * typedef struct { |
| 1105 | * mach_msg_header_t Head; |
| 1106 | * NDR_record_t NDR; |
| 1107 | * kern_return_t RetCode; |
| 1108 | * } mig_reply_error_t; |
| 1109 | */ |
| 1110 | |
| 1111 | Request *In0P = (Request *) InHeadP; |
| 1112 | Reply *OutP = (Reply *) OutHeadP; |
| 1113 | #ifdef __MIG_check__Request__host_virtual_physical_table_info_t__defined |
| 1114 | kern_return_t check_result; |
| 1115 | #endif /* __MIG_check__Request__host_virtual_physical_table_info_t__defined */ |
| 1116 | |
| 1117 | #if __MigKernelSpecificCode |
| 1118 | #if UseStaticTemplates |
| 1119 | const static mach_msg_ool_descriptor_t infoTemplate = { |
| 1120 | /* addr = */ (void *)0, |
| 1121 | /* size = */ 0, |
| 1122 | /* deal = */ TRUE, |
| 1123 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 1124 | /* pad2 = */ 0, |
| 1125 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 1126 | }; |
| 1127 | #endif /* UseStaticTemplates */ |
| 1128 | |
| 1129 | #else |
| 1130 | #if UseStaticTemplates |
| 1131 | const static mach_msg_ool_descriptor_t infoTemplate = { |
| 1132 | /* addr = */ (void *)0, |
| 1133 | /* size = */ 0, |
| 1134 | /* deal = */ TRUE, |
| 1135 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 1136 | /* pad2 = */ 0, |
| 1137 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 1138 | }; |
| 1139 | #endif /* UseStaticTemplates */ |
| 1140 | |
| 1141 | #endif /* __MigKernelSpecificCode */ |
| 1142 | kern_return_t RetCode; |
| 1143 | __DeclareRcvRpc(209, "host_virtual_physical_table_info" ) |
| 1144 | __BeforeRcvRpc(209, "host_virtual_physical_table_info" ) |
| 1145 | |
| 1146 | #if defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) |
| 1147 | check_result = __MIG_check__Request__host_virtual_physical_table_info_t((__Request *)In0P); |
| 1148 | if (check_result != MACH_MSG_SUCCESS) |
| 1149 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 1150 | #endif /* defined(__MIG_check__Request__host_virtual_physical_table_info_t__defined) */ |
| 1151 | |
| 1152 | #if UseStaticTemplates |
| 1153 | OutP->info = infoTemplate; |
| 1154 | #else /* UseStaticTemplates */ |
| 1155 | OutP->info.deallocate = TRUE; |
| 1156 | OutP->info.copy = MACH_MSG_VIRTUAL_COPY; |
| 1157 | OutP->info.pad1 = 0; |
| 1158 | OutP->info.type = MACH_MSG_OOL_DESCRIPTOR; |
| 1159 | #if defined(KERNEL) && !defined(__LP64__) |
| 1160 | OutP->info.pad_end = 0; |
| 1161 | #endif |
| 1162 | #endif /* UseStaticTemplates */ |
| 1163 | |
| 1164 | |
| 1165 | OutP->infoCnt = 0; |
| 1166 | |
| 1167 | RetCode = host_virtual_physical_table_info(convert_port_to_host(In0P->Head.msgh_request_port), (hash_info_bucket_array_t *)&(OutP->info.address), &OutP->infoCnt); |
| 1168 | if (RetCode != KERN_SUCCESS) { |
| 1169 | MIG_RETURN_ERROR(OutP, RetCode); |
| 1170 | } |
| 1171 | #if __MigKernelSpecificCode |
| 1172 | #endif /* __MigKernelSpecificCode */ |
| 1173 | OutP->info.size = OutP->infoCnt * 4; |
| 1174 | |
| 1175 | |
| 1176 | OutP->NDR = NDR_record; |
| 1177 | |
| 1178 | |
| 1179 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 1180 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 1181 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 1182 | __AfterRcvRpc(209, "host_virtual_physical_table_info" ) |
| 1183 | } |
| 1184 | |
| 1185 | #if ( __MigTypeCheck ) |
| 1186 | #if __MIG_check__Request__mach_host_subsystem__ |
| 1187 | #if !defined(__MIG_check__Request__processor_set_default_t__defined) |
| 1188 | #define __MIG_check__Request__processor_set_default_t__defined |
| 1189 | |
| 1190 | mig_internal kern_return_t __MIG_check__Request__processor_set_default_t(__attribute__((__unused__)) __Request__processor_set_default_t *In0P) |
| 1191 | { |
| 1192 | |
| 1193 | typedef __Request__processor_set_default_t __Request; |
| 1194 | #if __MigTypeCheck |
| 1195 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 1196 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 1197 | return MIG_BAD_ARGUMENTS; |
| 1198 | #endif /* __MigTypeCheck */ |
| 1199 | |
| 1200 | return MACH_MSG_SUCCESS; |
| 1201 | } |
| 1202 | #endif /* !defined(__MIG_check__Request__processor_set_default_t__defined) */ |
| 1203 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 1204 | #endif /* ( __MigTypeCheck ) */ |
| 1205 | |
| 1206 | |
| 1207 | /* Routine processor_set_default */ |
| 1208 | mig_internal novalue _Xprocessor_set_default |
| 1209 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 1210 | { |
| 1211 | |
| 1212 | #ifdef __MigPackStructs |
| 1213 | #pragma pack(4) |
| 1214 | #endif |
| 1215 | typedef struct { |
| 1216 | mach_msg_header_t Head; |
| 1217 | mach_msg_trailer_t trailer; |
| 1218 | } Request __attribute__((unused)); |
| 1219 | #ifdef __MigPackStructs |
| 1220 | #pragma pack() |
| 1221 | #endif |
| 1222 | typedef __Request__processor_set_default_t __Request; |
| 1223 | typedef __Reply__processor_set_default_t Reply __attribute__((unused)); |
| 1224 | |
| 1225 | /* |
| 1226 | * typedef struct { |
| 1227 | * mach_msg_header_t Head; |
| 1228 | * NDR_record_t NDR; |
| 1229 | * kern_return_t RetCode; |
| 1230 | * } mig_reply_error_t; |
| 1231 | */ |
| 1232 | |
| 1233 | Request *In0P = (Request *) InHeadP; |
| 1234 | Reply *OutP = (Reply *) OutHeadP; |
| 1235 | #ifdef __MIG_check__Request__processor_set_default_t__defined |
| 1236 | kern_return_t check_result; |
| 1237 | #endif /* __MIG_check__Request__processor_set_default_t__defined */ |
| 1238 | |
| 1239 | #if __MigKernelSpecificCode |
| 1240 | #if UseStaticTemplates |
| 1241 | const static mach_msg_port_descriptor_t default_setTemplate = { |
| 1242 | /* name = */ MACH_PORT_NULL, |
| 1243 | /* pad1 = */ 0, |
| 1244 | /* pad2 = */ 0, |
| 1245 | /* disp = */ 17, |
| 1246 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 1247 | }; |
| 1248 | #endif /* UseStaticTemplates */ |
| 1249 | |
| 1250 | #else |
| 1251 | #if UseStaticTemplates |
| 1252 | const static mach_msg_port_descriptor_t default_setTemplate = { |
| 1253 | /* name = */ MACH_PORT_NULL, |
| 1254 | /* pad1 = */ 0, |
| 1255 | /* pad2 = */ 0, |
| 1256 | /* disp = */ 19, |
| 1257 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 1258 | }; |
| 1259 | #endif /* UseStaticTemplates */ |
| 1260 | |
| 1261 | #endif /* __MigKernelSpecificCode */ |
| 1262 | kern_return_t RetCode; |
| 1263 | processor_set_name_t default_set; |
| 1264 | |
| 1265 | __DeclareRcvRpc(213, "processor_set_default" ) |
| 1266 | __BeforeRcvRpc(213, "processor_set_default" ) |
| 1267 | |
| 1268 | #if defined(__MIG_check__Request__processor_set_default_t__defined) |
| 1269 | check_result = __MIG_check__Request__processor_set_default_t((__Request *)In0P); |
| 1270 | if (check_result != MACH_MSG_SUCCESS) |
| 1271 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 1272 | #endif /* defined(__MIG_check__Request__processor_set_default_t__defined) */ |
| 1273 | |
| 1274 | #if UseStaticTemplates |
| 1275 | OutP->default_set = default_setTemplate; |
| 1276 | #else /* UseStaticTemplates */ |
| 1277 | #if __MigKernelSpecificCode |
| 1278 | OutP->default_set.disposition = 17; |
| 1279 | #else |
| 1280 | OutP->default_set.disposition = 19; |
| 1281 | #endif /* __MigKernelSpecificCode */ |
| 1282 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 1283 | OutP->default_set.pad1 = 0; |
| 1284 | #endif |
| 1285 | OutP->default_set.pad2 = 0; |
| 1286 | OutP->default_set.type = MACH_MSG_PORT_DESCRIPTOR; |
| 1287 | #if defined(KERNEL) |
| 1288 | OutP->default_set.pad_end = 0; |
| 1289 | #endif |
| 1290 | #endif /* UseStaticTemplates */ |
| 1291 | |
| 1292 | |
| 1293 | RetCode = processor_set_default(convert_port_to_host(In0P->Head.msgh_request_port), &default_set); |
| 1294 | if (RetCode != KERN_SUCCESS) { |
| 1295 | MIG_RETURN_ERROR(OutP, RetCode); |
| 1296 | } |
| 1297 | #if __MigKernelSpecificCode |
| 1298 | #endif /* __MigKernelSpecificCode */ |
| 1299 | OutP->default_set.name = (mach_port_t)convert_pset_name_to_port(default_set); |
| 1300 | |
| 1301 | |
| 1302 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 1303 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 1304 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 1305 | __AfterRcvRpc(213, "processor_set_default" ) |
| 1306 | } |
| 1307 | |
| 1308 | #if ( __MigTypeCheck ) |
| 1309 | #if __MIG_check__Request__mach_host_subsystem__ |
| 1310 | #if !defined(__MIG_check__Request__processor_set_create_t__defined) |
| 1311 | #define __MIG_check__Request__processor_set_create_t__defined |
| 1312 | |
| 1313 | mig_internal kern_return_t __MIG_check__Request__processor_set_create_t(__attribute__((__unused__)) __Request__processor_set_create_t *In0P) |
| 1314 | { |
| 1315 | |
| 1316 | typedef __Request__processor_set_create_t __Request; |
| 1317 | #if __MigTypeCheck |
| 1318 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 1319 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 1320 | return MIG_BAD_ARGUMENTS; |
| 1321 | #endif /* __MigTypeCheck */ |
| 1322 | |
| 1323 | return MACH_MSG_SUCCESS; |
| 1324 | } |
| 1325 | #endif /* !defined(__MIG_check__Request__processor_set_create_t__defined) */ |
| 1326 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 1327 | #endif /* ( __MigTypeCheck ) */ |
| 1328 | |
| 1329 | |
| 1330 | /* Routine processor_set_create */ |
| 1331 | mig_internal novalue _Xprocessor_set_create |
| 1332 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 1333 | { |
| 1334 | |
| 1335 | #ifdef __MigPackStructs |
| 1336 | #pragma pack(4) |
| 1337 | #endif |
| 1338 | typedef struct { |
| 1339 | mach_msg_header_t Head; |
| 1340 | mach_msg_trailer_t trailer; |
| 1341 | } Request __attribute__((unused)); |
| 1342 | #ifdef __MigPackStructs |
| 1343 | #pragma pack() |
| 1344 | #endif |
| 1345 | typedef __Request__processor_set_create_t __Request; |
| 1346 | typedef __Reply__processor_set_create_t Reply __attribute__((unused)); |
| 1347 | |
| 1348 | /* |
| 1349 | * typedef struct { |
| 1350 | * mach_msg_header_t Head; |
| 1351 | * NDR_record_t NDR; |
| 1352 | * kern_return_t RetCode; |
| 1353 | * } mig_reply_error_t; |
| 1354 | */ |
| 1355 | |
| 1356 | Request *In0P = (Request *) InHeadP; |
| 1357 | Reply *OutP = (Reply *) OutHeadP; |
| 1358 | #ifdef __MIG_check__Request__processor_set_create_t__defined |
| 1359 | kern_return_t check_result; |
| 1360 | #endif /* __MIG_check__Request__processor_set_create_t__defined */ |
| 1361 | |
| 1362 | #if __MigKernelSpecificCode |
| 1363 | #if UseStaticTemplates |
| 1364 | const static mach_msg_port_descriptor_t new_setTemplate = { |
| 1365 | /* name = */ MACH_PORT_NULL, |
| 1366 | /* pad1 = */ 0, |
| 1367 | /* pad2 = */ 0, |
| 1368 | /* disp = */ 17, |
| 1369 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 1370 | }; |
| 1371 | #endif /* UseStaticTemplates */ |
| 1372 | |
| 1373 | #if UseStaticTemplates |
| 1374 | const static mach_msg_port_descriptor_t new_nameTemplate = { |
| 1375 | /* name = */ MACH_PORT_NULL, |
| 1376 | /* pad1 = */ 0, |
| 1377 | /* pad2 = */ 0, |
| 1378 | /* disp = */ 17, |
| 1379 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 1380 | }; |
| 1381 | #endif /* UseStaticTemplates */ |
| 1382 | |
| 1383 | #else |
| 1384 | #if UseStaticTemplates |
| 1385 | const static mach_msg_port_descriptor_t new_setTemplate = { |
| 1386 | /* name = */ MACH_PORT_NULL, |
| 1387 | /* pad1 = */ 0, |
| 1388 | /* pad2 = */ 0, |
| 1389 | /* disp = */ 19, |
| 1390 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 1391 | }; |
| 1392 | #endif /* UseStaticTemplates */ |
| 1393 | |
| 1394 | #if UseStaticTemplates |
| 1395 | const static mach_msg_port_descriptor_t new_nameTemplate = { |
| 1396 | /* name = */ MACH_PORT_NULL, |
| 1397 | /* pad1 = */ 0, |
| 1398 | /* pad2 = */ 0, |
| 1399 | /* disp = */ 19, |
| 1400 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 1401 | }; |
| 1402 | #endif /* UseStaticTemplates */ |
| 1403 | |
| 1404 | #endif /* __MigKernelSpecificCode */ |
| 1405 | kern_return_t RetCode; |
| 1406 | processor_set_t new_set; |
| 1407 | processor_set_name_t new_name; |
| 1408 | |
| 1409 | __DeclareRcvRpc(214, "processor_set_create" ) |
| 1410 | __BeforeRcvRpc(214, "processor_set_create" ) |
| 1411 | |
| 1412 | #if defined(__MIG_check__Request__processor_set_create_t__defined) |
| 1413 | check_result = __MIG_check__Request__processor_set_create_t((__Request *)In0P); |
| 1414 | if (check_result != MACH_MSG_SUCCESS) |
| 1415 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 1416 | #endif /* defined(__MIG_check__Request__processor_set_create_t__defined) */ |
| 1417 | |
| 1418 | #if UseStaticTemplates |
| 1419 | OutP->new_set = new_setTemplate; |
| 1420 | #else /* UseStaticTemplates */ |
| 1421 | #if __MigKernelSpecificCode |
| 1422 | OutP->new_set.disposition = 17; |
| 1423 | #else |
| 1424 | OutP->new_set.disposition = 19; |
| 1425 | #endif /* __MigKernelSpecificCode */ |
| 1426 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 1427 | OutP->new_set.pad1 = 0; |
| 1428 | #endif |
| 1429 | OutP->new_set.pad2 = 0; |
| 1430 | OutP->new_set.type = MACH_MSG_PORT_DESCRIPTOR; |
| 1431 | #if defined(KERNEL) |
| 1432 | OutP->new_set.pad_end = 0; |
| 1433 | #endif |
| 1434 | #endif /* UseStaticTemplates */ |
| 1435 | |
| 1436 | |
| 1437 | #if UseStaticTemplates |
| 1438 | OutP->new_name = new_nameTemplate; |
| 1439 | #else /* UseStaticTemplates */ |
| 1440 | #if __MigKernelSpecificCode |
| 1441 | OutP->new_name.disposition = 17; |
| 1442 | #else |
| 1443 | OutP->new_name.disposition = 19; |
| 1444 | #endif /* __MigKernelSpecificCode */ |
| 1445 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 1446 | OutP->new_name.pad1 = 0; |
| 1447 | #endif |
| 1448 | OutP->new_name.pad2 = 0; |
| 1449 | OutP->new_name.type = MACH_MSG_PORT_DESCRIPTOR; |
| 1450 | #if defined(KERNEL) |
| 1451 | OutP->new_name.pad_end = 0; |
| 1452 | #endif |
| 1453 | #endif /* UseStaticTemplates */ |
| 1454 | |
| 1455 | |
| 1456 | RetCode = processor_set_create(convert_port_to_host(In0P->Head.msgh_request_port), &new_set, &new_name); |
| 1457 | if (RetCode != KERN_SUCCESS) { |
| 1458 | MIG_RETURN_ERROR(OutP, RetCode); |
| 1459 | } |
| 1460 | #if __MigKernelSpecificCode |
| 1461 | #endif /* __MigKernelSpecificCode */ |
| 1462 | OutP->new_set.name = (mach_port_t)convert_pset_to_port(new_set); |
| 1463 | |
| 1464 | OutP->new_name.name = (mach_port_t)convert_pset_name_to_port(new_name); |
| 1465 | |
| 1466 | |
| 1467 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 1468 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 1469 | OutP->msgh_body.msgh_descriptor_count = 2; |
| 1470 | __AfterRcvRpc(214, "processor_set_create" ) |
| 1471 | } |
| 1472 | |
| 1473 | #if ( __MigTypeCheck ) |
| 1474 | #if __MIG_check__Request__mach_host_subsystem__ |
| 1475 | #if !defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) |
| 1476 | #define __MIG_check__Request__mach_memory_object_memory_entry_64_t__defined |
| 1477 | |
| 1478 | mig_internal kern_return_t __MIG_check__Request__mach_memory_object_memory_entry_64_t(__attribute__((__unused__)) __Request__mach_memory_object_memory_entry_64_t *In0P) |
| 1479 | { |
| 1480 | |
| 1481 | typedef __Request__mach_memory_object_memory_entry_64_t __Request; |
| 1482 | #if __MigTypeCheck |
| 1483 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 1484 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
| 1485 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 1486 | return MIG_BAD_ARGUMENTS; |
| 1487 | #endif /* __MigTypeCheck */ |
| 1488 | |
| 1489 | #if __MigTypeCheck |
| 1490 | if (In0P->pager.type != MACH_MSG_PORT_DESCRIPTOR || |
| 1491 | In0P->pager.disposition != 17) |
| 1492 | return MIG_TYPE_ERROR; |
| 1493 | #endif /* __MigTypeCheck */ |
| 1494 | |
| 1495 | return MACH_MSG_SUCCESS; |
| 1496 | } |
| 1497 | #endif /* !defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) */ |
| 1498 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 1499 | #endif /* ( __MigTypeCheck ) */ |
| 1500 | |
| 1501 | |
| 1502 | /* Routine mach_memory_object_memory_entry_64 */ |
| 1503 | mig_internal novalue _Xmach_memory_object_memory_entry_64 |
| 1504 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 1505 | { |
| 1506 | |
| 1507 | #ifdef __MigPackStructs |
| 1508 | #pragma pack(4) |
| 1509 | #endif |
| 1510 | typedef struct { |
| 1511 | mach_msg_header_t Head; |
| 1512 | /* start of the kernel processed data */ |
| 1513 | mach_msg_body_t msgh_body; |
| 1514 | mach_msg_port_descriptor_t ; |
| 1515 | /* end of the kernel processed data */ |
| 1516 | NDR_record_t NDR; |
| 1517 | boolean_t internal; |
| 1518 | memory_object_size_t size; |
| 1519 | vm_prot_t permission; |
| 1520 | mach_msg_trailer_t trailer; |
| 1521 | } Request __attribute__((unused)); |
| 1522 | #ifdef __MigPackStructs |
| 1523 | #pragma pack() |
| 1524 | #endif |
| 1525 | typedef __Request__mach_memory_object_memory_entry_64_t __Request; |
| 1526 | typedef __Reply__mach_memory_object_memory_entry_64_t Reply __attribute__((unused)); |
| 1527 | |
| 1528 | /* |
| 1529 | * typedef struct { |
| 1530 | * mach_msg_header_t Head; |
| 1531 | * NDR_record_t NDR; |
| 1532 | * kern_return_t RetCode; |
| 1533 | * } mig_reply_error_t; |
| 1534 | */ |
| 1535 | |
| 1536 | Request *In0P = (Request *) InHeadP; |
| 1537 | Reply *OutP = (Reply *) OutHeadP; |
| 1538 | #ifdef __MIG_check__Request__mach_memory_object_memory_entry_64_t__defined |
| 1539 | kern_return_t check_result; |
| 1540 | #endif /* __MIG_check__Request__mach_memory_object_memory_entry_64_t__defined */ |
| 1541 | |
| 1542 | #if __MigKernelSpecificCode |
| 1543 | #if UseStaticTemplates |
| 1544 | const static mach_msg_port_descriptor_t entry_handleTemplate = { |
| 1545 | /* name = */ MACH_PORT_NULL, |
| 1546 | /* pad1 = */ 0, |
| 1547 | /* pad2 = */ 0, |
| 1548 | /* disp = */ 17, |
| 1549 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 1550 | }; |
| 1551 | #endif /* UseStaticTemplates */ |
| 1552 | |
| 1553 | #else |
| 1554 | #if UseStaticTemplates |
| 1555 | const static mach_msg_port_descriptor_t entry_handleTemplate = { |
| 1556 | /* name = */ MACH_PORT_NULL, |
| 1557 | /* pad1 = */ 0, |
| 1558 | /* pad2 = */ 0, |
| 1559 | /* disp = */ 17, |
| 1560 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 1561 | }; |
| 1562 | #endif /* UseStaticTemplates */ |
| 1563 | |
| 1564 | #endif /* __MigKernelSpecificCode */ |
| 1565 | kern_return_t RetCode; |
| 1566 | __DeclareRcvRpc(215, "mach_memory_object_memory_entry_64" ) |
| 1567 | __BeforeRcvRpc(215, "mach_memory_object_memory_entry_64" ) |
| 1568 | |
| 1569 | #if defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) |
| 1570 | check_result = __MIG_check__Request__mach_memory_object_memory_entry_64_t((__Request *)In0P); |
| 1571 | if (check_result != MACH_MSG_SUCCESS) |
| 1572 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 1573 | #endif /* defined(__MIG_check__Request__mach_memory_object_memory_entry_64_t__defined) */ |
| 1574 | |
| 1575 | #if UseStaticTemplates |
| 1576 | OutP->entry_handle = entry_handleTemplate; |
| 1577 | #else /* UseStaticTemplates */ |
| 1578 | #if __MigKernelSpecificCode |
| 1579 | OutP->entry_handle.disposition = 17; |
| 1580 | #else |
| 1581 | OutP->entry_handle.disposition = 17; |
| 1582 | #endif /* __MigKernelSpecificCode */ |
| 1583 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 1584 | OutP->entry_handle.pad1 = 0; |
| 1585 | #endif |
| 1586 | OutP->entry_handle.pad2 = 0; |
| 1587 | OutP->entry_handle.type = MACH_MSG_PORT_DESCRIPTOR; |
| 1588 | #if defined(KERNEL) |
| 1589 | OutP->entry_handle.pad_end = 0; |
| 1590 | #endif |
| 1591 | #endif /* UseStaticTemplates */ |
| 1592 | |
| 1593 | |
| 1594 | RetCode = mach_memory_object_memory_entry_64(convert_port_to_host(In0P->Head.msgh_request_port), In0P->internal, In0P->size, In0P->permission, convert_port_to_memory_object(In0P->pager.name), &OutP->entry_handle.name); |
| 1595 | if (RetCode != KERN_SUCCESS) { |
| 1596 | MIG_RETURN_ERROR(OutP, RetCode); |
| 1597 | } |
| 1598 | #if __MigKernelSpecificCode |
| 1599 | |
| 1600 | if (IP_VALID((ipc_port_t)In0P->pager.name)) |
| 1601 | ipc_port_release_send((ipc_port_t)In0P->pager.name); |
| 1602 | #endif /* __MigKernelSpecificCode */ |
| 1603 | |
| 1604 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 1605 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 1606 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 1607 | __AfterRcvRpc(215, "mach_memory_object_memory_entry_64" ) |
| 1608 | } |
| 1609 | |
| 1610 | #if ( __MigTypeCheck ) |
| 1611 | #if __MIG_check__Request__mach_host_subsystem__ |
| 1612 | #if !defined(__MIG_check__Request__host_statistics_from_user_t__defined) |
| 1613 | #define __MIG_check__Request__host_statistics_from_user_t__defined |
| 1614 | |
| 1615 | mig_internal kern_return_t __MIG_check__Request__host_statistics_from_user_t(__attribute__((__unused__)) __Request__host_statistics_from_user_t *In0P) |
| 1616 | { |
| 1617 | |
| 1618 | typedef __Request__host_statistics_from_user_t __Request; |
| 1619 | #if __MigTypeCheck |
| 1620 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 1621 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 1622 | return MIG_BAD_ARGUMENTS; |
| 1623 | #endif /* __MigTypeCheck */ |
| 1624 | |
| 1625 | return MACH_MSG_SUCCESS; |
| 1626 | } |
| 1627 | #endif /* !defined(__MIG_check__Request__host_statistics_from_user_t__defined) */ |
| 1628 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 1629 | #endif /* ( __MigTypeCheck ) */ |
| 1630 | |
| 1631 | |
| 1632 | /* Routine host_statistics_from_user */ |
| 1633 | mig_internal novalue _Xhost_statistics_from_user |
| 1634 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 1635 | { |
| 1636 | |
| 1637 | #ifdef __MigPackStructs |
| 1638 | #pragma pack(4) |
| 1639 | #endif |
| 1640 | typedef struct { |
| 1641 | mach_msg_header_t Head; |
| 1642 | NDR_record_t NDR; |
| 1643 | host_flavor_t flavor; |
| 1644 | mach_msg_type_number_t host_info_outCnt; |
| 1645 | mach_msg_trailer_t trailer; |
| 1646 | } Request __attribute__((unused)); |
| 1647 | #ifdef __MigPackStructs |
| 1648 | #pragma pack() |
| 1649 | #endif |
| 1650 | typedef __Request__host_statistics_from_user_t __Request; |
| 1651 | typedef __Reply__host_statistics_from_user_t Reply __attribute__((unused)); |
| 1652 | |
| 1653 | /* |
| 1654 | * typedef struct { |
| 1655 | * mach_msg_header_t Head; |
| 1656 | * NDR_record_t NDR; |
| 1657 | * kern_return_t RetCode; |
| 1658 | * } mig_reply_error_t; |
| 1659 | */ |
| 1660 | |
| 1661 | Request *In0P = (Request *) InHeadP; |
| 1662 | Reply *OutP = (Reply *) OutHeadP; |
| 1663 | #ifdef __MIG_check__Request__host_statistics_from_user_t__defined |
| 1664 | kern_return_t check_result; |
| 1665 | #endif /* __MIG_check__Request__host_statistics_from_user_t__defined */ |
| 1666 | |
| 1667 | #if __MigKernelSpecificCode |
| 1668 | #else |
| 1669 | #endif /* __MigKernelSpecificCode */ |
| 1670 | __DeclareRcvRpc(216, "host_statistics_from_user" ) |
| 1671 | __BeforeRcvRpc(216, "host_statistics_from_user" ) |
| 1672 | |
| 1673 | #if defined(__MIG_check__Request__host_statistics_from_user_t__defined) |
| 1674 | check_result = __MIG_check__Request__host_statistics_from_user_t((__Request *)In0P); |
| 1675 | if (check_result != MACH_MSG_SUCCESS) |
| 1676 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 1677 | #endif /* defined(__MIG_check__Request__host_statistics_from_user_t__defined) */ |
| 1678 | |
| 1679 | OutP->host_info_outCnt = 68; |
| 1680 | if (In0P->host_info_outCnt < OutP->host_info_outCnt) |
| 1681 | OutP->host_info_outCnt = In0P->host_info_outCnt; |
| 1682 | |
| 1683 | OutP->RetCode = host_statistics_from_user(convert_port_to_host(In0P->Head.msgh_request_port), In0P->flavor, OutP->host_info_out, &OutP->host_info_outCnt); |
| 1684 | if (OutP->RetCode != KERN_SUCCESS) { |
| 1685 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
| 1686 | } |
| 1687 | #if __MigKernelSpecificCode |
| 1688 | #endif /* __MigKernelSpecificCode */ |
| 1689 | |
| 1690 | OutP->NDR = NDR_record; |
| 1691 | |
| 1692 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 272) + (((4 * OutP->host_info_outCnt))); |
| 1693 | |
| 1694 | __AfterRcvRpc(216, "host_statistics_from_user" ) |
| 1695 | } |
| 1696 | |
| 1697 | #if ( __MigTypeCheck ) |
| 1698 | #if __MIG_check__Request__mach_host_subsystem__ |
| 1699 | #if !defined(__MIG_check__Request__host_request_notification_t__defined) |
| 1700 | #define __MIG_check__Request__host_request_notification_t__defined |
| 1701 | |
| 1702 | mig_internal kern_return_t __MIG_check__Request__host_request_notification_t(__attribute__((__unused__)) __Request__host_request_notification_t *In0P) |
| 1703 | { |
| 1704 | |
| 1705 | typedef __Request__host_request_notification_t __Request; |
| 1706 | #if __MigTypeCheck |
| 1707 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 1708 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
| 1709 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 1710 | return MIG_BAD_ARGUMENTS; |
| 1711 | #endif /* __MigTypeCheck */ |
| 1712 | |
| 1713 | #if __MigTypeCheck |
| 1714 | if (In0P->notify_port.type != MACH_MSG_PORT_DESCRIPTOR || |
| 1715 | In0P->notify_port.disposition != 18) |
| 1716 | return MIG_TYPE_ERROR; |
| 1717 | #endif /* __MigTypeCheck */ |
| 1718 | |
| 1719 | return MACH_MSG_SUCCESS; |
| 1720 | } |
| 1721 | #endif /* !defined(__MIG_check__Request__host_request_notification_t__defined) */ |
| 1722 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 1723 | #endif /* ( __MigTypeCheck ) */ |
| 1724 | |
| 1725 | |
| 1726 | /* Routine host_request_notification */ |
| 1727 | mig_internal novalue _Xhost_request_notification |
| 1728 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 1729 | { |
| 1730 | |
| 1731 | #ifdef __MigPackStructs |
| 1732 | #pragma pack(4) |
| 1733 | #endif |
| 1734 | typedef struct { |
| 1735 | mach_msg_header_t Head; |
| 1736 | /* start of the kernel processed data */ |
| 1737 | mach_msg_body_t msgh_body; |
| 1738 | mach_msg_port_descriptor_t notify_port; |
| 1739 | /* end of the kernel processed data */ |
| 1740 | NDR_record_t NDR; |
| 1741 | host_flavor_t notify_type; |
| 1742 | mach_msg_trailer_t trailer; |
| 1743 | } Request __attribute__((unused)); |
| 1744 | #ifdef __MigPackStructs |
| 1745 | #pragma pack() |
| 1746 | #endif |
| 1747 | typedef __Request__host_request_notification_t __Request; |
| 1748 | typedef __Reply__host_request_notification_t Reply __attribute__((unused)); |
| 1749 | |
| 1750 | /* |
| 1751 | * typedef struct { |
| 1752 | * mach_msg_header_t Head; |
| 1753 | * NDR_record_t NDR; |
| 1754 | * kern_return_t RetCode; |
| 1755 | * } mig_reply_error_t; |
| 1756 | */ |
| 1757 | |
| 1758 | Request *In0P = (Request *) InHeadP; |
| 1759 | Reply *OutP = (Reply *) OutHeadP; |
| 1760 | #ifdef __MIG_check__Request__host_request_notification_t__defined |
| 1761 | kern_return_t check_result; |
| 1762 | #endif /* __MIG_check__Request__host_request_notification_t__defined */ |
| 1763 | |
| 1764 | #if __MigKernelSpecificCode |
| 1765 | #else |
| 1766 | #endif /* __MigKernelSpecificCode */ |
| 1767 | __DeclareRcvRpc(217, "host_request_notification" ) |
| 1768 | __BeforeRcvRpc(217, "host_request_notification" ) |
| 1769 | |
| 1770 | #if defined(__MIG_check__Request__host_request_notification_t__defined) |
| 1771 | check_result = __MIG_check__Request__host_request_notification_t((__Request *)In0P); |
| 1772 | if (check_result != MACH_MSG_SUCCESS) |
| 1773 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 1774 | #endif /* defined(__MIG_check__Request__host_request_notification_t__defined) */ |
| 1775 | |
| 1776 | OutP->RetCode = host_request_notification(convert_port_to_host(In0P->Head.msgh_request_port), In0P->notify_type, In0P->notify_port.name); |
| 1777 | #if __MigKernelSpecificCode |
| 1778 | #endif /* __MigKernelSpecificCode */ |
| 1779 | |
| 1780 | OutP->NDR = NDR_record; |
| 1781 | |
| 1782 | |
| 1783 | __AfterRcvRpc(217, "host_request_notification" ) |
| 1784 | } |
| 1785 | |
| 1786 | #if ( __MigTypeCheck ) |
| 1787 | #if __MIG_check__Request__mach_host_subsystem__ |
| 1788 | #if !defined(__MIG_check__Request__host_lockgroup_info_t__defined) |
| 1789 | #define __MIG_check__Request__host_lockgroup_info_t__defined |
| 1790 | |
| 1791 | mig_internal kern_return_t __MIG_check__Request__host_lockgroup_info_t(__attribute__((__unused__)) __Request__host_lockgroup_info_t *In0P) |
| 1792 | { |
| 1793 | |
| 1794 | typedef __Request__host_lockgroup_info_t __Request; |
| 1795 | #if __MigTypeCheck |
| 1796 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 1797 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 1798 | return MIG_BAD_ARGUMENTS; |
| 1799 | #endif /* __MigTypeCheck */ |
| 1800 | |
| 1801 | return MACH_MSG_SUCCESS; |
| 1802 | } |
| 1803 | #endif /* !defined(__MIG_check__Request__host_lockgroup_info_t__defined) */ |
| 1804 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 1805 | #endif /* ( __MigTypeCheck ) */ |
| 1806 | |
| 1807 | |
| 1808 | /* Routine host_lockgroup_info */ |
| 1809 | mig_internal novalue _Xhost_lockgroup_info |
| 1810 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 1811 | { |
| 1812 | |
| 1813 | #ifdef __MigPackStructs |
| 1814 | #pragma pack(4) |
| 1815 | #endif |
| 1816 | typedef struct { |
| 1817 | mach_msg_header_t Head; |
| 1818 | mach_msg_trailer_t trailer; |
| 1819 | } Request __attribute__((unused)); |
| 1820 | #ifdef __MigPackStructs |
| 1821 | #pragma pack() |
| 1822 | #endif |
| 1823 | typedef __Request__host_lockgroup_info_t __Request; |
| 1824 | typedef __Reply__host_lockgroup_info_t Reply __attribute__((unused)); |
| 1825 | |
| 1826 | /* |
| 1827 | * typedef struct { |
| 1828 | * mach_msg_header_t Head; |
| 1829 | * NDR_record_t NDR; |
| 1830 | * kern_return_t RetCode; |
| 1831 | * } mig_reply_error_t; |
| 1832 | */ |
| 1833 | |
| 1834 | Request *In0P = (Request *) InHeadP; |
| 1835 | Reply *OutP = (Reply *) OutHeadP; |
| 1836 | #ifdef __MIG_check__Request__host_lockgroup_info_t__defined |
| 1837 | kern_return_t check_result; |
| 1838 | #endif /* __MIG_check__Request__host_lockgroup_info_t__defined */ |
| 1839 | |
| 1840 | #if __MigKernelSpecificCode |
| 1841 | #if UseStaticTemplates |
| 1842 | const static mach_msg_ool_descriptor_t lockgroup_infoTemplate = { |
| 1843 | /* addr = */ (void *)0, |
| 1844 | /* size = */ 0, |
| 1845 | /* deal = */ TRUE, |
| 1846 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 1847 | /* pad2 = */ 0, |
| 1848 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 1849 | }; |
| 1850 | #endif /* UseStaticTemplates */ |
| 1851 | |
| 1852 | #else |
| 1853 | #if UseStaticTemplates |
| 1854 | const static mach_msg_ool_descriptor_t lockgroup_infoTemplate = { |
| 1855 | /* addr = */ (void *)0, |
| 1856 | /* size = */ 0, |
| 1857 | /* deal = */ TRUE, |
| 1858 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 1859 | /* pad2 = */ 0, |
| 1860 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 1861 | }; |
| 1862 | #endif /* UseStaticTemplates */ |
| 1863 | |
| 1864 | #endif /* __MigKernelSpecificCode */ |
| 1865 | kern_return_t RetCode; |
| 1866 | __DeclareRcvRpc(218, "host_lockgroup_info" ) |
| 1867 | __BeforeRcvRpc(218, "host_lockgroup_info" ) |
| 1868 | |
| 1869 | #if defined(__MIG_check__Request__host_lockgroup_info_t__defined) |
| 1870 | check_result = __MIG_check__Request__host_lockgroup_info_t((__Request *)In0P); |
| 1871 | if (check_result != MACH_MSG_SUCCESS) |
| 1872 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 1873 | #endif /* defined(__MIG_check__Request__host_lockgroup_info_t__defined) */ |
| 1874 | |
| 1875 | #if UseStaticTemplates |
| 1876 | OutP->lockgroup_info = lockgroup_infoTemplate; |
| 1877 | #else /* UseStaticTemplates */ |
| 1878 | OutP->lockgroup_info.deallocate = TRUE; |
| 1879 | OutP->lockgroup_info.copy = MACH_MSG_VIRTUAL_COPY; |
| 1880 | OutP->lockgroup_info.pad1 = 0; |
| 1881 | OutP->lockgroup_info.type = MACH_MSG_OOL_DESCRIPTOR; |
| 1882 | #if defined(KERNEL) && !defined(__LP64__) |
| 1883 | OutP->lockgroup_info.pad_end = 0; |
| 1884 | #endif |
| 1885 | #endif /* UseStaticTemplates */ |
| 1886 | |
| 1887 | |
| 1888 | OutP->lockgroup_infoCnt = 0; |
| 1889 | |
| 1890 | RetCode = host_lockgroup_info(convert_port_to_host(In0P->Head.msgh_request_port), (lockgroup_info_array_t *)&(OutP->lockgroup_info.address), &OutP->lockgroup_infoCnt); |
| 1891 | if (RetCode != KERN_SUCCESS) { |
| 1892 | MIG_RETURN_ERROR(OutP, RetCode); |
| 1893 | } |
| 1894 | #if __MigKernelSpecificCode |
| 1895 | #endif /* __MigKernelSpecificCode */ |
| 1896 | OutP->lockgroup_info.size = OutP->lockgroup_infoCnt * 264; |
| 1897 | |
| 1898 | |
| 1899 | OutP->NDR = NDR_record; |
| 1900 | |
| 1901 | |
| 1902 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 1903 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 1904 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 1905 | __AfterRcvRpc(218, "host_lockgroup_info" ) |
| 1906 | } |
| 1907 | |
| 1908 | #if ( __MigTypeCheck ) |
| 1909 | #if __MIG_check__Request__mach_host_subsystem__ |
| 1910 | #if !defined(__MIG_check__Request__host_statistics64_from_user_t__defined) |
| 1911 | #define __MIG_check__Request__host_statistics64_from_user_t__defined |
| 1912 | |
| 1913 | mig_internal kern_return_t __MIG_check__Request__host_statistics64_from_user_t(__attribute__((__unused__)) __Request__host_statistics64_from_user_t *In0P) |
| 1914 | { |
| 1915 | |
| 1916 | typedef __Request__host_statistics64_from_user_t __Request; |
| 1917 | #if __MigTypeCheck |
| 1918 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 1919 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 1920 | return MIG_BAD_ARGUMENTS; |
| 1921 | #endif /* __MigTypeCheck */ |
| 1922 | |
| 1923 | return MACH_MSG_SUCCESS; |
| 1924 | } |
| 1925 | #endif /* !defined(__MIG_check__Request__host_statistics64_from_user_t__defined) */ |
| 1926 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 1927 | #endif /* ( __MigTypeCheck ) */ |
| 1928 | |
| 1929 | |
| 1930 | /* Routine host_statistics64_from_user */ |
| 1931 | mig_internal novalue _Xhost_statistics64_from_user |
| 1932 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 1933 | { |
| 1934 | |
| 1935 | #ifdef __MigPackStructs |
| 1936 | #pragma pack(4) |
| 1937 | #endif |
| 1938 | typedef struct { |
| 1939 | mach_msg_header_t Head; |
| 1940 | NDR_record_t NDR; |
| 1941 | host_flavor_t flavor; |
| 1942 | mach_msg_type_number_t host_info64_outCnt; |
| 1943 | mach_msg_trailer_t trailer; |
| 1944 | } Request __attribute__((unused)); |
| 1945 | #ifdef __MigPackStructs |
| 1946 | #pragma pack() |
| 1947 | #endif |
| 1948 | typedef __Request__host_statistics64_from_user_t __Request; |
| 1949 | typedef __Reply__host_statistics64_from_user_t Reply __attribute__((unused)); |
| 1950 | |
| 1951 | /* |
| 1952 | * typedef struct { |
| 1953 | * mach_msg_header_t Head; |
| 1954 | * NDR_record_t NDR; |
| 1955 | * kern_return_t RetCode; |
| 1956 | * } mig_reply_error_t; |
| 1957 | */ |
| 1958 | |
| 1959 | Request *In0P = (Request *) InHeadP; |
| 1960 | Reply *OutP = (Reply *) OutHeadP; |
| 1961 | #ifdef __MIG_check__Request__host_statistics64_from_user_t__defined |
| 1962 | kern_return_t check_result; |
| 1963 | #endif /* __MIG_check__Request__host_statistics64_from_user_t__defined */ |
| 1964 | |
| 1965 | #if __MigKernelSpecificCode |
| 1966 | #else |
| 1967 | #endif /* __MigKernelSpecificCode */ |
| 1968 | __DeclareRcvRpc(219, "host_statistics64_from_user" ) |
| 1969 | __BeforeRcvRpc(219, "host_statistics64_from_user" ) |
| 1970 | |
| 1971 | #if defined(__MIG_check__Request__host_statistics64_from_user_t__defined) |
| 1972 | check_result = __MIG_check__Request__host_statistics64_from_user_t((__Request *)In0P); |
| 1973 | if (check_result != MACH_MSG_SUCCESS) |
| 1974 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 1975 | #endif /* defined(__MIG_check__Request__host_statistics64_from_user_t__defined) */ |
| 1976 | |
| 1977 | OutP->host_info64_outCnt = 256; |
| 1978 | if (In0P->host_info64_outCnt < OutP->host_info64_outCnt) |
| 1979 | OutP->host_info64_outCnt = In0P->host_info64_outCnt; |
| 1980 | |
| 1981 | OutP->RetCode = host_statistics64_from_user(convert_port_to_host(In0P->Head.msgh_request_port), In0P->flavor, OutP->host_info64_out, &OutP->host_info64_outCnt); |
| 1982 | if (OutP->RetCode != KERN_SUCCESS) { |
| 1983 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
| 1984 | } |
| 1985 | #if __MigKernelSpecificCode |
| 1986 | #endif /* __MigKernelSpecificCode */ |
| 1987 | |
| 1988 | OutP->NDR = NDR_record; |
| 1989 | |
| 1990 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 1024) + (((4 * OutP->host_info64_outCnt))); |
| 1991 | |
| 1992 | __AfterRcvRpc(219, "host_statistics64_from_user" ) |
| 1993 | } |
| 1994 | |
| 1995 | #if ( __MigTypeCheck ) |
| 1996 | #if __MIG_check__Request__mach_host_subsystem__ |
| 1997 | #if !defined(__MIG_check__Request__mach_zone_info_t__defined) |
| 1998 | #define __MIG_check__Request__mach_zone_info_t__defined |
| 1999 | |
| 2000 | mig_internal kern_return_t __MIG_check__Request__mach_zone_info_t(__attribute__((__unused__)) __Request__mach_zone_info_t *In0P) |
| 2001 | { |
| 2002 | |
| 2003 | typedef __Request__mach_zone_info_t __Request; |
| 2004 | #if __MigTypeCheck |
| 2005 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 2006 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 2007 | return MIG_BAD_ARGUMENTS; |
| 2008 | #endif /* __MigTypeCheck */ |
| 2009 | |
| 2010 | return MACH_MSG_SUCCESS; |
| 2011 | } |
| 2012 | #endif /* !defined(__MIG_check__Request__mach_zone_info_t__defined) */ |
| 2013 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 2014 | #endif /* ( __MigTypeCheck ) */ |
| 2015 | |
| 2016 | |
| 2017 | /* Routine mach_zone_info */ |
| 2018 | mig_internal novalue _Xmach_zone_info |
| 2019 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 2020 | { |
| 2021 | |
| 2022 | #ifdef __MigPackStructs |
| 2023 | #pragma pack(4) |
| 2024 | #endif |
| 2025 | typedef struct { |
| 2026 | mach_msg_header_t Head; |
| 2027 | mach_msg_trailer_t trailer; |
| 2028 | } Request __attribute__((unused)); |
| 2029 | #ifdef __MigPackStructs |
| 2030 | #pragma pack() |
| 2031 | #endif |
| 2032 | typedef __Request__mach_zone_info_t __Request; |
| 2033 | typedef __Reply__mach_zone_info_t Reply __attribute__((unused)); |
| 2034 | |
| 2035 | /* |
| 2036 | * typedef struct { |
| 2037 | * mach_msg_header_t Head; |
| 2038 | * NDR_record_t NDR; |
| 2039 | * kern_return_t RetCode; |
| 2040 | * } mig_reply_error_t; |
| 2041 | */ |
| 2042 | |
| 2043 | Request *In0P = (Request *) InHeadP; |
| 2044 | Reply *OutP = (Reply *) OutHeadP; |
| 2045 | #ifdef __MIG_check__Request__mach_zone_info_t__defined |
| 2046 | kern_return_t check_result; |
| 2047 | #endif /* __MIG_check__Request__mach_zone_info_t__defined */ |
| 2048 | |
| 2049 | #if __MigKernelSpecificCode |
| 2050 | #if UseStaticTemplates |
| 2051 | const static mach_msg_ool_descriptor_t namesTemplate = { |
| 2052 | /* addr = */ (void *)0, |
| 2053 | /* size = */ 0, |
| 2054 | /* deal = */ TRUE, |
| 2055 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2056 | /* pad2 = */ 0, |
| 2057 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2058 | }; |
| 2059 | #endif /* UseStaticTemplates */ |
| 2060 | |
| 2061 | #if UseStaticTemplates |
| 2062 | const static mach_msg_ool_descriptor_t infoTemplate = { |
| 2063 | /* addr = */ (void *)0, |
| 2064 | /* size = */ 0, |
| 2065 | /* deal = */ TRUE, |
| 2066 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2067 | /* pad2 = */ 0, |
| 2068 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2069 | }; |
| 2070 | #endif /* UseStaticTemplates */ |
| 2071 | |
| 2072 | #else |
| 2073 | #if UseStaticTemplates |
| 2074 | const static mach_msg_ool_descriptor_t namesTemplate = { |
| 2075 | /* addr = */ (void *)0, |
| 2076 | /* size = */ 0, |
| 2077 | /* deal = */ TRUE, |
| 2078 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2079 | /* pad2 = */ 0, |
| 2080 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2081 | }; |
| 2082 | #endif /* UseStaticTemplates */ |
| 2083 | |
| 2084 | #if UseStaticTemplates |
| 2085 | const static mach_msg_ool_descriptor_t infoTemplate = { |
| 2086 | /* addr = */ (void *)0, |
| 2087 | /* size = */ 0, |
| 2088 | /* deal = */ TRUE, |
| 2089 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2090 | /* pad2 = */ 0, |
| 2091 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2092 | }; |
| 2093 | #endif /* UseStaticTemplates */ |
| 2094 | |
| 2095 | #endif /* __MigKernelSpecificCode */ |
| 2096 | kern_return_t RetCode; |
| 2097 | __DeclareRcvRpc(220, "mach_zone_info" ) |
| 2098 | __BeforeRcvRpc(220, "mach_zone_info" ) |
| 2099 | |
| 2100 | #if defined(__MIG_check__Request__mach_zone_info_t__defined) |
| 2101 | check_result = __MIG_check__Request__mach_zone_info_t((__Request *)In0P); |
| 2102 | if (check_result != MACH_MSG_SUCCESS) |
| 2103 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 2104 | #endif /* defined(__MIG_check__Request__mach_zone_info_t__defined) */ |
| 2105 | |
| 2106 | #if UseStaticTemplates |
| 2107 | OutP->names = namesTemplate; |
| 2108 | #else /* UseStaticTemplates */ |
| 2109 | OutP->names.deallocate = TRUE; |
| 2110 | OutP->names.copy = MACH_MSG_VIRTUAL_COPY; |
| 2111 | OutP->names.pad1 = 0; |
| 2112 | OutP->names.type = MACH_MSG_OOL_DESCRIPTOR; |
| 2113 | #if defined(KERNEL) && !defined(__LP64__) |
| 2114 | OutP->names.pad_end = 0; |
| 2115 | #endif |
| 2116 | #endif /* UseStaticTemplates */ |
| 2117 | |
| 2118 | |
| 2119 | #if UseStaticTemplates |
| 2120 | OutP->info = infoTemplate; |
| 2121 | #else /* UseStaticTemplates */ |
| 2122 | OutP->info.deallocate = TRUE; |
| 2123 | OutP->info.copy = MACH_MSG_VIRTUAL_COPY; |
| 2124 | OutP->info.pad1 = 0; |
| 2125 | OutP->info.type = MACH_MSG_OOL_DESCRIPTOR; |
| 2126 | #if defined(KERNEL) && !defined(__LP64__) |
| 2127 | OutP->info.pad_end = 0; |
| 2128 | #endif |
| 2129 | #endif /* UseStaticTemplates */ |
| 2130 | |
| 2131 | |
| 2132 | OutP->namesCnt = 0; |
| 2133 | |
| 2134 | OutP->infoCnt = 0; |
| 2135 | |
| 2136 | RetCode = mach_zone_info(convert_port_to_host_priv(In0P->Head.msgh_request_port), (mach_zone_name_array_t *)&(OutP->names.address), &OutP->namesCnt, (mach_zone_info_array_t *)&(OutP->info.address), &OutP->infoCnt); |
| 2137 | if (RetCode != KERN_SUCCESS) { |
| 2138 | MIG_RETURN_ERROR(OutP, RetCode); |
| 2139 | } |
| 2140 | #if __MigKernelSpecificCode |
| 2141 | #endif /* __MigKernelSpecificCode */ |
| 2142 | OutP->names.size = OutP->namesCnt * 80; |
| 2143 | |
| 2144 | OutP->info.size = OutP->infoCnt * 64; |
| 2145 | |
| 2146 | |
| 2147 | OutP->NDR = NDR_record; |
| 2148 | |
| 2149 | |
| 2150 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 2151 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 2152 | OutP->msgh_body.msgh_descriptor_count = 2; |
| 2153 | __AfterRcvRpc(220, "mach_zone_info" ) |
| 2154 | } |
| 2155 | |
| 2156 | #if ( __MigTypeCheck ) |
| 2157 | #if __MIG_check__Request__mach_host_subsystem__ |
| 2158 | #if !defined(__MIG_check__Request__mach_zone_force_gc_t__defined) |
| 2159 | #define __MIG_check__Request__mach_zone_force_gc_t__defined |
| 2160 | |
| 2161 | mig_internal kern_return_t __MIG_check__Request__mach_zone_force_gc_t(__attribute__((__unused__)) __Request__mach_zone_force_gc_t *In0P) |
| 2162 | { |
| 2163 | |
| 2164 | typedef __Request__mach_zone_force_gc_t __Request; |
| 2165 | #if __MigTypeCheck |
| 2166 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 2167 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 2168 | return MIG_BAD_ARGUMENTS; |
| 2169 | #endif /* __MigTypeCheck */ |
| 2170 | |
| 2171 | return MACH_MSG_SUCCESS; |
| 2172 | } |
| 2173 | #endif /* !defined(__MIG_check__Request__mach_zone_force_gc_t__defined) */ |
| 2174 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 2175 | #endif /* ( __MigTypeCheck ) */ |
| 2176 | |
| 2177 | |
| 2178 | /* Routine mach_zone_force_gc */ |
| 2179 | mig_internal novalue _Xmach_zone_force_gc |
| 2180 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 2181 | { |
| 2182 | |
| 2183 | #ifdef __MigPackStructs |
| 2184 | #pragma pack(4) |
| 2185 | #endif |
| 2186 | typedef struct { |
| 2187 | mach_msg_header_t Head; |
| 2188 | mach_msg_trailer_t trailer; |
| 2189 | } Request __attribute__((unused)); |
| 2190 | #ifdef __MigPackStructs |
| 2191 | #pragma pack() |
| 2192 | #endif |
| 2193 | typedef __Request__mach_zone_force_gc_t __Request; |
| 2194 | typedef __Reply__mach_zone_force_gc_t Reply __attribute__((unused)); |
| 2195 | |
| 2196 | /* |
| 2197 | * typedef struct { |
| 2198 | * mach_msg_header_t Head; |
| 2199 | * NDR_record_t NDR; |
| 2200 | * kern_return_t RetCode; |
| 2201 | * } mig_reply_error_t; |
| 2202 | */ |
| 2203 | |
| 2204 | Request *In0P = (Request *) InHeadP; |
| 2205 | Reply *OutP = (Reply *) OutHeadP; |
| 2206 | #ifdef __MIG_check__Request__mach_zone_force_gc_t__defined |
| 2207 | kern_return_t check_result; |
| 2208 | #endif /* __MIG_check__Request__mach_zone_force_gc_t__defined */ |
| 2209 | |
| 2210 | #if __MigKernelSpecificCode |
| 2211 | #else |
| 2212 | #endif /* __MigKernelSpecificCode */ |
| 2213 | __DeclareRcvRpc(221, "mach_zone_force_gc" ) |
| 2214 | __BeforeRcvRpc(221, "mach_zone_force_gc" ) |
| 2215 | |
| 2216 | #if defined(__MIG_check__Request__mach_zone_force_gc_t__defined) |
| 2217 | check_result = __MIG_check__Request__mach_zone_force_gc_t((__Request *)In0P); |
| 2218 | if (check_result != MACH_MSG_SUCCESS) |
| 2219 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 2220 | #endif /* defined(__MIG_check__Request__mach_zone_force_gc_t__defined) */ |
| 2221 | |
| 2222 | OutP->RetCode = mach_zone_force_gc(convert_port_to_host(In0P->Head.msgh_request_port)); |
| 2223 | #if __MigKernelSpecificCode |
| 2224 | #endif /* __MigKernelSpecificCode */ |
| 2225 | |
| 2226 | OutP->NDR = NDR_record; |
| 2227 | |
| 2228 | |
| 2229 | __AfterRcvRpc(221, "mach_zone_force_gc" ) |
| 2230 | } |
| 2231 | |
| 2232 | #if ( __MigTypeCheck ) |
| 2233 | #if __MIG_check__Request__mach_host_subsystem__ |
| 2234 | #if !defined(__MIG_check__Request__host_create_mach_voucher_t__defined) |
| 2235 | #define __MIG_check__Request__host_create_mach_voucher_t__defined |
| 2236 | |
| 2237 | mig_internal kern_return_t __MIG_check__Request__host_create_mach_voucher_t(__attribute__((__unused__)) __Request__host_create_mach_voucher_t *In0P) |
| 2238 | { |
| 2239 | |
| 2240 | typedef __Request__host_create_mach_voucher_t __Request; |
| 2241 | #if __MigTypeCheck |
| 2242 | unsigned int msgh_size; |
| 2243 | #endif /* __MigTypeCheck */ |
| 2244 | |
| 2245 | #if __MigTypeCheck |
| 2246 | msgh_size = In0P->Head.msgh_size; |
| 2247 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 2248 | (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 5120)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) |
| 2249 | return MIG_BAD_ARGUMENTS; |
| 2250 | #endif /* __MigTypeCheck */ |
| 2251 | |
| 2252 | #if defined(__NDR_convert__int_rep__Request__host_create_mach_voucher_t__recipesCnt__defined) |
| 2253 | if (In0P->NDR.int_rep != NDR_record.int_rep) |
| 2254 | __NDR_convert__int_rep__Request__host_create_mach_voucher_t__recipesCnt(&In0P->recipesCnt, In0P->NDR.int_rep); |
| 2255 | #endif /* __NDR_convert__int_rep__Request__host_create_mach_voucher_t__recipesCnt__defined */ |
| 2256 | #if __MigTypeCheck |
| 2257 | if ( In0P->recipesCnt > 5120 ) |
| 2258 | return MIG_BAD_ARGUMENTS; |
| 2259 | if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 5120)) < In0P->recipesCnt) || |
| 2260 | (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 5120) + _WALIGN_(In0P->recipesCnt))) |
| 2261 | return MIG_BAD_ARGUMENTS; |
| 2262 | #endif /* __MigTypeCheck */ |
| 2263 | |
| 2264 | return MACH_MSG_SUCCESS; |
| 2265 | } |
| 2266 | #endif /* !defined(__MIG_check__Request__host_create_mach_voucher_t__defined) */ |
| 2267 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 2268 | #endif /* ( __MigTypeCheck ) */ |
| 2269 | |
| 2270 | |
| 2271 | /* Routine host_create_mach_voucher */ |
| 2272 | mig_internal novalue _Xhost_create_mach_voucher |
| 2273 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 2274 | { |
| 2275 | |
| 2276 | #ifdef __MigPackStructs |
| 2277 | #pragma pack(4) |
| 2278 | #endif |
| 2279 | typedef struct { |
| 2280 | mach_msg_header_t Head; |
| 2281 | NDR_record_t NDR; |
| 2282 | mach_msg_type_number_t recipesCnt; |
| 2283 | uint8_t recipes[5120]; |
| 2284 | mach_msg_trailer_t trailer; |
| 2285 | } Request __attribute__((unused)); |
| 2286 | #ifdef __MigPackStructs |
| 2287 | #pragma pack() |
| 2288 | #endif |
| 2289 | typedef __Request__host_create_mach_voucher_t __Request; |
| 2290 | typedef __Reply__host_create_mach_voucher_t Reply __attribute__((unused)); |
| 2291 | |
| 2292 | /* |
| 2293 | * typedef struct { |
| 2294 | * mach_msg_header_t Head; |
| 2295 | * NDR_record_t NDR; |
| 2296 | * kern_return_t RetCode; |
| 2297 | * } mig_reply_error_t; |
| 2298 | */ |
| 2299 | |
| 2300 | Request *In0P = (Request *) InHeadP; |
| 2301 | Reply *OutP = (Reply *) OutHeadP; |
| 2302 | #ifdef __MIG_check__Request__host_create_mach_voucher_t__defined |
| 2303 | kern_return_t check_result; |
| 2304 | #endif /* __MIG_check__Request__host_create_mach_voucher_t__defined */ |
| 2305 | |
| 2306 | #if __MigKernelSpecificCode |
| 2307 | #if UseStaticTemplates |
| 2308 | const static mach_msg_port_descriptor_t voucherTemplate = { |
| 2309 | /* name = */ MACH_PORT_NULL, |
| 2310 | /* pad1 = */ 0, |
| 2311 | /* pad2 = */ 0, |
| 2312 | /* disp = */ 17, |
| 2313 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 2314 | }; |
| 2315 | #endif /* UseStaticTemplates */ |
| 2316 | |
| 2317 | #else |
| 2318 | #if UseStaticTemplates |
| 2319 | const static mach_msg_port_descriptor_t voucherTemplate = { |
| 2320 | /* name = */ MACH_PORT_NULL, |
| 2321 | /* pad1 = */ 0, |
| 2322 | /* pad2 = */ 0, |
| 2323 | /* disp = */ 19, |
| 2324 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 2325 | }; |
| 2326 | #endif /* UseStaticTemplates */ |
| 2327 | |
| 2328 | #endif /* __MigKernelSpecificCode */ |
| 2329 | kern_return_t RetCode; |
| 2330 | ipc_voucher_t voucher; |
| 2331 | |
| 2332 | __DeclareRcvRpc(222, "host_create_mach_voucher" ) |
| 2333 | __BeforeRcvRpc(222, "host_create_mach_voucher" ) |
| 2334 | |
| 2335 | #if defined(__MIG_check__Request__host_create_mach_voucher_t__defined) |
| 2336 | check_result = __MIG_check__Request__host_create_mach_voucher_t((__Request *)In0P); |
| 2337 | if (check_result != MACH_MSG_SUCCESS) |
| 2338 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 2339 | #endif /* defined(__MIG_check__Request__host_create_mach_voucher_t__defined) */ |
| 2340 | |
| 2341 | #if UseStaticTemplates |
| 2342 | OutP->voucher = voucherTemplate; |
| 2343 | #else /* UseStaticTemplates */ |
| 2344 | #if __MigKernelSpecificCode |
| 2345 | OutP->voucher.disposition = 17; |
| 2346 | #else |
| 2347 | OutP->voucher.disposition = 19; |
| 2348 | #endif /* __MigKernelSpecificCode */ |
| 2349 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 2350 | OutP->voucher.pad1 = 0; |
| 2351 | #endif |
| 2352 | OutP->voucher.pad2 = 0; |
| 2353 | OutP->voucher.type = MACH_MSG_PORT_DESCRIPTOR; |
| 2354 | #if defined(KERNEL) |
| 2355 | OutP->voucher.pad_end = 0; |
| 2356 | #endif |
| 2357 | #endif /* UseStaticTemplates */ |
| 2358 | |
| 2359 | |
| 2360 | RetCode = host_create_mach_voucher(convert_port_to_host(In0P->Head.msgh_request_port), In0P->recipes, In0P->recipesCnt, &voucher); |
| 2361 | if (RetCode != KERN_SUCCESS) { |
| 2362 | MIG_RETURN_ERROR(OutP, RetCode); |
| 2363 | } |
| 2364 | #if __MigKernelSpecificCode |
| 2365 | #endif /* __MigKernelSpecificCode */ |
| 2366 | OutP->voucher.name = (mach_port_t)convert_voucher_to_port(voucher); |
| 2367 | |
| 2368 | |
| 2369 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 2370 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 2371 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 2372 | __AfterRcvRpc(222, "host_create_mach_voucher" ) |
| 2373 | } |
| 2374 | |
| 2375 | #if ( __MigTypeCheck ) |
| 2376 | #if __MIG_check__Request__mach_host_subsystem__ |
| 2377 | #if !defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) |
| 2378 | #define __MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined |
| 2379 | |
| 2380 | mig_internal kern_return_t __MIG_check__Request__host_register_mach_voucher_attr_manager_t(__attribute__((__unused__)) __Request__host_register_mach_voucher_attr_manager_t *In0P) |
| 2381 | { |
| 2382 | |
| 2383 | typedef __Request__host_register_mach_voucher_attr_manager_t __Request; |
| 2384 | #if __MigTypeCheck |
| 2385 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 2386 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
| 2387 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 2388 | return MIG_BAD_ARGUMENTS; |
| 2389 | #endif /* __MigTypeCheck */ |
| 2390 | |
| 2391 | #if __MigTypeCheck |
| 2392 | if (In0P->attr_manager.type != MACH_MSG_PORT_DESCRIPTOR || |
| 2393 | In0P->attr_manager.disposition != 17) |
| 2394 | return MIG_TYPE_ERROR; |
| 2395 | #endif /* __MigTypeCheck */ |
| 2396 | |
| 2397 | return MACH_MSG_SUCCESS; |
| 2398 | } |
| 2399 | #endif /* !defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) */ |
| 2400 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 2401 | #endif /* ( __MigTypeCheck ) */ |
| 2402 | |
| 2403 | |
| 2404 | /* Routine host_register_mach_voucher_attr_manager */ |
| 2405 | mig_internal novalue _Xhost_register_mach_voucher_attr_manager |
| 2406 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 2407 | { |
| 2408 | |
| 2409 | #ifdef __MigPackStructs |
| 2410 | #pragma pack(4) |
| 2411 | #endif |
| 2412 | typedef struct { |
| 2413 | mach_msg_header_t Head; |
| 2414 | /* start of the kernel processed data */ |
| 2415 | mach_msg_body_t msgh_body; |
| 2416 | mach_msg_port_descriptor_t attr_manager; |
| 2417 | /* end of the kernel processed data */ |
| 2418 | NDR_record_t NDR; |
| 2419 | mach_voucher_attr_value_handle_t default_value; |
| 2420 | mach_msg_trailer_t trailer; |
| 2421 | } Request __attribute__((unused)); |
| 2422 | #ifdef __MigPackStructs |
| 2423 | #pragma pack() |
| 2424 | #endif |
| 2425 | typedef __Request__host_register_mach_voucher_attr_manager_t __Request; |
| 2426 | typedef __Reply__host_register_mach_voucher_attr_manager_t Reply __attribute__((unused)); |
| 2427 | |
| 2428 | /* |
| 2429 | * typedef struct { |
| 2430 | * mach_msg_header_t Head; |
| 2431 | * NDR_record_t NDR; |
| 2432 | * kern_return_t RetCode; |
| 2433 | * } mig_reply_error_t; |
| 2434 | */ |
| 2435 | |
| 2436 | Request *In0P = (Request *) InHeadP; |
| 2437 | Reply *OutP = (Reply *) OutHeadP; |
| 2438 | #ifdef __MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined |
| 2439 | kern_return_t check_result; |
| 2440 | #endif /* __MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined */ |
| 2441 | |
| 2442 | #if __MigKernelSpecificCode |
| 2443 | #if UseStaticTemplates |
| 2444 | const static mach_msg_port_descriptor_t new_attr_controlTemplate = { |
| 2445 | /* name = */ MACH_PORT_NULL, |
| 2446 | /* pad1 = */ 0, |
| 2447 | /* pad2 = */ 0, |
| 2448 | /* disp = */ 17, |
| 2449 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 2450 | }; |
| 2451 | #endif /* UseStaticTemplates */ |
| 2452 | |
| 2453 | #else |
| 2454 | #if UseStaticTemplates |
| 2455 | const static mach_msg_port_descriptor_t new_attr_controlTemplate = { |
| 2456 | /* name = */ MACH_PORT_NULL, |
| 2457 | /* pad1 = */ 0, |
| 2458 | /* pad2 = */ 0, |
| 2459 | /* disp = */ 19, |
| 2460 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 2461 | }; |
| 2462 | #endif /* UseStaticTemplates */ |
| 2463 | |
| 2464 | #endif /* __MigKernelSpecificCode */ |
| 2465 | kern_return_t RetCode; |
| 2466 | ipc_voucher_attr_control_t new_attr_control; |
| 2467 | |
| 2468 | __DeclareRcvRpc(223, "host_register_mach_voucher_attr_manager" ) |
| 2469 | __BeforeRcvRpc(223, "host_register_mach_voucher_attr_manager" ) |
| 2470 | |
| 2471 | #if defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) |
| 2472 | check_result = __MIG_check__Request__host_register_mach_voucher_attr_manager_t((__Request *)In0P); |
| 2473 | if (check_result != MACH_MSG_SUCCESS) |
| 2474 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 2475 | #endif /* defined(__MIG_check__Request__host_register_mach_voucher_attr_manager_t__defined) */ |
| 2476 | |
| 2477 | #if UseStaticTemplates |
| 2478 | OutP->new_attr_control = new_attr_controlTemplate; |
| 2479 | #else /* UseStaticTemplates */ |
| 2480 | #if __MigKernelSpecificCode |
| 2481 | OutP->new_attr_control.disposition = 17; |
| 2482 | #else |
| 2483 | OutP->new_attr_control.disposition = 19; |
| 2484 | #endif /* __MigKernelSpecificCode */ |
| 2485 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 2486 | OutP->new_attr_control.pad1 = 0; |
| 2487 | #endif |
| 2488 | OutP->new_attr_control.pad2 = 0; |
| 2489 | OutP->new_attr_control.type = MACH_MSG_PORT_DESCRIPTOR; |
| 2490 | #if defined(KERNEL) |
| 2491 | OutP->new_attr_control.pad_end = 0; |
| 2492 | #endif |
| 2493 | #endif /* UseStaticTemplates */ |
| 2494 | |
| 2495 | |
| 2496 | RetCode = host_register_mach_voucher_attr_manager(convert_port_to_host(In0P->Head.msgh_request_port), In0P->attr_manager.name, In0P->default_value, &OutP->new_key, &new_attr_control); |
| 2497 | if (RetCode != KERN_SUCCESS) { |
| 2498 | MIG_RETURN_ERROR(OutP, RetCode); |
| 2499 | } |
| 2500 | #if __MigKernelSpecificCode |
| 2501 | #endif /* __MigKernelSpecificCode */ |
| 2502 | OutP->new_attr_control.name = (mach_port_t)convert_voucher_attr_control_to_port(new_attr_control); |
| 2503 | |
| 2504 | |
| 2505 | OutP->NDR = NDR_record; |
| 2506 | |
| 2507 | |
| 2508 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 2509 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 2510 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 2511 | __AfterRcvRpc(223, "host_register_mach_voucher_attr_manager" ) |
| 2512 | } |
| 2513 | |
| 2514 | #if ( __MigTypeCheck ) |
| 2515 | #if __MIG_check__Request__mach_host_subsystem__ |
| 2516 | #if !defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) |
| 2517 | #define __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined |
| 2518 | |
| 2519 | mig_internal kern_return_t __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t(__attribute__((__unused__)) __Request__host_register_well_known_mach_voucher_attr_manager_t *In0P) |
| 2520 | { |
| 2521 | |
| 2522 | typedef __Request__host_register_well_known_mach_voucher_attr_manager_t __Request; |
| 2523 | #if __MigTypeCheck |
| 2524 | if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 2525 | (In0P->msgh_body.msgh_descriptor_count != 1) || |
| 2526 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 2527 | return MIG_BAD_ARGUMENTS; |
| 2528 | #endif /* __MigTypeCheck */ |
| 2529 | |
| 2530 | #if __MigTypeCheck |
| 2531 | if (In0P->attr_manager.type != MACH_MSG_PORT_DESCRIPTOR || |
| 2532 | In0P->attr_manager.disposition != 17) |
| 2533 | return MIG_TYPE_ERROR; |
| 2534 | #endif /* __MigTypeCheck */ |
| 2535 | |
| 2536 | return MACH_MSG_SUCCESS; |
| 2537 | } |
| 2538 | #endif /* !defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) */ |
| 2539 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 2540 | #endif /* ( __MigTypeCheck ) */ |
| 2541 | |
| 2542 | |
| 2543 | /* Routine host_register_well_known_mach_voucher_attr_manager */ |
| 2544 | mig_internal novalue _Xhost_register_well_known_mach_voucher_attr_manager |
| 2545 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 2546 | { |
| 2547 | |
| 2548 | #ifdef __MigPackStructs |
| 2549 | #pragma pack(4) |
| 2550 | #endif |
| 2551 | typedef struct { |
| 2552 | mach_msg_header_t Head; |
| 2553 | /* start of the kernel processed data */ |
| 2554 | mach_msg_body_t msgh_body; |
| 2555 | mach_msg_port_descriptor_t attr_manager; |
| 2556 | /* end of the kernel processed data */ |
| 2557 | NDR_record_t NDR; |
| 2558 | mach_voucher_attr_value_handle_t default_value; |
| 2559 | mach_voucher_attr_key_t key; |
| 2560 | mach_msg_trailer_t trailer; |
| 2561 | } Request __attribute__((unused)); |
| 2562 | #ifdef __MigPackStructs |
| 2563 | #pragma pack() |
| 2564 | #endif |
| 2565 | typedef __Request__host_register_well_known_mach_voucher_attr_manager_t __Request; |
| 2566 | typedef __Reply__host_register_well_known_mach_voucher_attr_manager_t Reply __attribute__((unused)); |
| 2567 | |
| 2568 | /* |
| 2569 | * typedef struct { |
| 2570 | * mach_msg_header_t Head; |
| 2571 | * NDR_record_t NDR; |
| 2572 | * kern_return_t RetCode; |
| 2573 | * } mig_reply_error_t; |
| 2574 | */ |
| 2575 | |
| 2576 | Request *In0P = (Request *) InHeadP; |
| 2577 | Reply *OutP = (Reply *) OutHeadP; |
| 2578 | #ifdef __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined |
| 2579 | kern_return_t check_result; |
| 2580 | #endif /* __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined */ |
| 2581 | |
| 2582 | #if __MigKernelSpecificCode |
| 2583 | #if UseStaticTemplates |
| 2584 | const static mach_msg_port_descriptor_t new_attr_controlTemplate = { |
| 2585 | /* name = */ MACH_PORT_NULL, |
| 2586 | /* pad1 = */ 0, |
| 2587 | /* pad2 = */ 0, |
| 2588 | /* disp = */ 17, |
| 2589 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 2590 | }; |
| 2591 | #endif /* UseStaticTemplates */ |
| 2592 | |
| 2593 | #else |
| 2594 | #if UseStaticTemplates |
| 2595 | const static mach_msg_port_descriptor_t new_attr_controlTemplate = { |
| 2596 | /* name = */ MACH_PORT_NULL, |
| 2597 | /* pad1 = */ 0, |
| 2598 | /* pad2 = */ 0, |
| 2599 | /* disp = */ 19, |
| 2600 | /* type = */ MACH_MSG_PORT_DESCRIPTOR, |
| 2601 | }; |
| 2602 | #endif /* UseStaticTemplates */ |
| 2603 | |
| 2604 | #endif /* __MigKernelSpecificCode */ |
| 2605 | kern_return_t RetCode; |
| 2606 | ipc_voucher_attr_control_t new_attr_control; |
| 2607 | |
| 2608 | __DeclareRcvRpc(224, "host_register_well_known_mach_voucher_attr_manager" ) |
| 2609 | __BeforeRcvRpc(224, "host_register_well_known_mach_voucher_attr_manager" ) |
| 2610 | |
| 2611 | #if defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) |
| 2612 | check_result = __MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t((__Request *)In0P); |
| 2613 | if (check_result != MACH_MSG_SUCCESS) |
| 2614 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 2615 | #endif /* defined(__MIG_check__Request__host_register_well_known_mach_voucher_attr_manager_t__defined) */ |
| 2616 | |
| 2617 | #if UseStaticTemplates |
| 2618 | OutP->new_attr_control = new_attr_controlTemplate; |
| 2619 | #else /* UseStaticTemplates */ |
| 2620 | #if __MigKernelSpecificCode |
| 2621 | OutP->new_attr_control.disposition = 17; |
| 2622 | #else |
| 2623 | OutP->new_attr_control.disposition = 19; |
| 2624 | #endif /* __MigKernelSpecificCode */ |
| 2625 | #if !(defined(KERNEL) && defined(__LP64__)) |
| 2626 | OutP->new_attr_control.pad1 = 0; |
| 2627 | #endif |
| 2628 | OutP->new_attr_control.pad2 = 0; |
| 2629 | OutP->new_attr_control.type = MACH_MSG_PORT_DESCRIPTOR; |
| 2630 | #if defined(KERNEL) |
| 2631 | OutP->new_attr_control.pad_end = 0; |
| 2632 | #endif |
| 2633 | #endif /* UseStaticTemplates */ |
| 2634 | |
| 2635 | |
| 2636 | RetCode = host_register_well_known_mach_voucher_attr_manager(convert_port_to_host(In0P->Head.msgh_request_port), In0P->attr_manager.name, In0P->default_value, In0P->key, &new_attr_control); |
| 2637 | if (RetCode != KERN_SUCCESS) { |
| 2638 | MIG_RETURN_ERROR(OutP, RetCode); |
| 2639 | } |
| 2640 | #if __MigKernelSpecificCode |
| 2641 | #endif /* __MigKernelSpecificCode */ |
| 2642 | OutP->new_attr_control.name = (mach_port_t)convert_voucher_attr_control_to_port(new_attr_control); |
| 2643 | |
| 2644 | |
| 2645 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 2646 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 2647 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 2648 | __AfterRcvRpc(224, "host_register_well_known_mach_voucher_attr_manager" ) |
| 2649 | } |
| 2650 | |
| 2651 | #if ( __MigTypeCheck ) |
| 2652 | #if __MIG_check__Request__mach_host_subsystem__ |
| 2653 | #if !defined(__MIG_check__Request__host_set_atm_diagnostic_flag_t__defined) |
| 2654 | #define __MIG_check__Request__host_set_atm_diagnostic_flag_t__defined |
| 2655 | |
| 2656 | mig_internal kern_return_t __MIG_check__Request__host_set_atm_diagnostic_flag_t(__attribute__((__unused__)) __Request__host_set_atm_diagnostic_flag_t *In0P) |
| 2657 | { |
| 2658 | |
| 2659 | typedef __Request__host_set_atm_diagnostic_flag_t __Request; |
| 2660 | #if __MigTypeCheck |
| 2661 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 2662 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 2663 | return MIG_BAD_ARGUMENTS; |
| 2664 | #endif /* __MigTypeCheck */ |
| 2665 | |
| 2666 | return MACH_MSG_SUCCESS; |
| 2667 | } |
| 2668 | #endif /* !defined(__MIG_check__Request__host_set_atm_diagnostic_flag_t__defined) */ |
| 2669 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 2670 | #endif /* ( __MigTypeCheck ) */ |
| 2671 | |
| 2672 | |
| 2673 | /* Routine host_set_atm_diagnostic_flag */ |
| 2674 | mig_internal novalue _Xhost_set_atm_diagnostic_flag |
| 2675 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 2676 | { |
| 2677 | |
| 2678 | #ifdef __MigPackStructs |
| 2679 | #pragma pack(4) |
| 2680 | #endif |
| 2681 | typedef struct { |
| 2682 | mach_msg_header_t Head; |
| 2683 | NDR_record_t NDR; |
| 2684 | uint32_t diagnostic_flag; |
| 2685 | mach_msg_trailer_t trailer; |
| 2686 | } Request __attribute__((unused)); |
| 2687 | #ifdef __MigPackStructs |
| 2688 | #pragma pack() |
| 2689 | #endif |
| 2690 | typedef __Request__host_set_atm_diagnostic_flag_t __Request; |
| 2691 | typedef __Reply__host_set_atm_diagnostic_flag_t Reply __attribute__((unused)); |
| 2692 | |
| 2693 | /* |
| 2694 | * typedef struct { |
| 2695 | * mach_msg_header_t Head; |
| 2696 | * NDR_record_t NDR; |
| 2697 | * kern_return_t RetCode; |
| 2698 | * } mig_reply_error_t; |
| 2699 | */ |
| 2700 | |
| 2701 | Request *In0P = (Request *) InHeadP; |
| 2702 | Reply *OutP = (Reply *) OutHeadP; |
| 2703 | #ifdef __MIG_check__Request__host_set_atm_diagnostic_flag_t__defined |
| 2704 | kern_return_t check_result; |
| 2705 | #endif /* __MIG_check__Request__host_set_atm_diagnostic_flag_t__defined */ |
| 2706 | |
| 2707 | #if __MigKernelSpecificCode |
| 2708 | #else |
| 2709 | #endif /* __MigKernelSpecificCode */ |
| 2710 | __DeclareRcvRpc(225, "host_set_atm_diagnostic_flag" ) |
| 2711 | __BeforeRcvRpc(225, "host_set_atm_diagnostic_flag" ) |
| 2712 | |
| 2713 | #if defined(__MIG_check__Request__host_set_atm_diagnostic_flag_t__defined) |
| 2714 | check_result = __MIG_check__Request__host_set_atm_diagnostic_flag_t((__Request *)In0P); |
| 2715 | if (check_result != MACH_MSG_SUCCESS) |
| 2716 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 2717 | #endif /* defined(__MIG_check__Request__host_set_atm_diagnostic_flag_t__defined) */ |
| 2718 | |
| 2719 | OutP->RetCode = host_set_atm_diagnostic_flag(convert_port_to_host_priv(In0P->Head.msgh_request_port), In0P->diagnostic_flag); |
| 2720 | #if __MigKernelSpecificCode |
| 2721 | #endif /* __MigKernelSpecificCode */ |
| 2722 | |
| 2723 | OutP->NDR = NDR_record; |
| 2724 | |
| 2725 | |
| 2726 | __AfterRcvRpc(225, "host_set_atm_diagnostic_flag" ) |
| 2727 | } |
| 2728 | |
| 2729 | #if ( __MigTypeCheck ) |
| 2730 | #if __MIG_check__Request__mach_host_subsystem__ |
| 2731 | #if !defined(__MIG_check__Request__mach_memory_info_t__defined) |
| 2732 | #define __MIG_check__Request__mach_memory_info_t__defined |
| 2733 | |
| 2734 | mig_internal kern_return_t __MIG_check__Request__mach_memory_info_t(__attribute__((__unused__)) __Request__mach_memory_info_t *In0P) |
| 2735 | { |
| 2736 | |
| 2737 | typedef __Request__mach_memory_info_t __Request; |
| 2738 | #if __MigTypeCheck |
| 2739 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 2740 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 2741 | return MIG_BAD_ARGUMENTS; |
| 2742 | #endif /* __MigTypeCheck */ |
| 2743 | |
| 2744 | return MACH_MSG_SUCCESS; |
| 2745 | } |
| 2746 | #endif /* !defined(__MIG_check__Request__mach_memory_info_t__defined) */ |
| 2747 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 2748 | #endif /* ( __MigTypeCheck ) */ |
| 2749 | |
| 2750 | |
| 2751 | /* Routine mach_memory_info */ |
| 2752 | mig_internal novalue _Xmach_memory_info |
| 2753 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 2754 | { |
| 2755 | |
| 2756 | #ifdef __MigPackStructs |
| 2757 | #pragma pack(4) |
| 2758 | #endif |
| 2759 | typedef struct { |
| 2760 | mach_msg_header_t Head; |
| 2761 | mach_msg_trailer_t trailer; |
| 2762 | } Request __attribute__((unused)); |
| 2763 | #ifdef __MigPackStructs |
| 2764 | #pragma pack() |
| 2765 | #endif |
| 2766 | typedef __Request__mach_memory_info_t __Request; |
| 2767 | typedef __Reply__mach_memory_info_t Reply __attribute__((unused)); |
| 2768 | |
| 2769 | /* |
| 2770 | * typedef struct { |
| 2771 | * mach_msg_header_t Head; |
| 2772 | * NDR_record_t NDR; |
| 2773 | * kern_return_t RetCode; |
| 2774 | * } mig_reply_error_t; |
| 2775 | */ |
| 2776 | |
| 2777 | Request *In0P = (Request *) InHeadP; |
| 2778 | Reply *OutP = (Reply *) OutHeadP; |
| 2779 | #ifdef __MIG_check__Request__mach_memory_info_t__defined |
| 2780 | kern_return_t check_result; |
| 2781 | #endif /* __MIG_check__Request__mach_memory_info_t__defined */ |
| 2782 | |
| 2783 | #if __MigKernelSpecificCode |
| 2784 | #if UseStaticTemplates |
| 2785 | const static mach_msg_ool_descriptor_t namesTemplate = { |
| 2786 | /* addr = */ (void *)0, |
| 2787 | /* size = */ 0, |
| 2788 | /* deal = */ TRUE, |
| 2789 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2790 | /* pad2 = */ 0, |
| 2791 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2792 | }; |
| 2793 | #endif /* UseStaticTemplates */ |
| 2794 | |
| 2795 | #if UseStaticTemplates |
| 2796 | const static mach_msg_ool_descriptor_t infoTemplate = { |
| 2797 | /* addr = */ (void *)0, |
| 2798 | /* size = */ 0, |
| 2799 | /* deal = */ TRUE, |
| 2800 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2801 | /* pad2 = */ 0, |
| 2802 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2803 | }; |
| 2804 | #endif /* UseStaticTemplates */ |
| 2805 | |
| 2806 | #if UseStaticTemplates |
| 2807 | const static mach_msg_ool_descriptor_t memory_infoTemplate = { |
| 2808 | /* addr = */ (void *)0, |
| 2809 | /* size = */ 0, |
| 2810 | /* deal = */ TRUE, |
| 2811 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2812 | /* pad2 = */ 0, |
| 2813 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2814 | }; |
| 2815 | #endif /* UseStaticTemplates */ |
| 2816 | |
| 2817 | #else |
| 2818 | #if UseStaticTemplates |
| 2819 | const static mach_msg_ool_descriptor_t namesTemplate = { |
| 2820 | /* addr = */ (void *)0, |
| 2821 | /* size = */ 0, |
| 2822 | /* deal = */ TRUE, |
| 2823 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2824 | /* pad2 = */ 0, |
| 2825 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2826 | }; |
| 2827 | #endif /* UseStaticTemplates */ |
| 2828 | |
| 2829 | #if UseStaticTemplates |
| 2830 | const static mach_msg_ool_descriptor_t infoTemplate = { |
| 2831 | /* addr = */ (void *)0, |
| 2832 | /* size = */ 0, |
| 2833 | /* deal = */ TRUE, |
| 2834 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2835 | /* pad2 = */ 0, |
| 2836 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2837 | }; |
| 2838 | #endif /* UseStaticTemplates */ |
| 2839 | |
| 2840 | #if UseStaticTemplates |
| 2841 | const static mach_msg_ool_descriptor_t memory_infoTemplate = { |
| 2842 | /* addr = */ (void *)0, |
| 2843 | /* size = */ 0, |
| 2844 | /* deal = */ TRUE, |
| 2845 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 2846 | /* pad2 = */ 0, |
| 2847 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 2848 | }; |
| 2849 | #endif /* UseStaticTemplates */ |
| 2850 | |
| 2851 | #endif /* __MigKernelSpecificCode */ |
| 2852 | kern_return_t RetCode; |
| 2853 | __DeclareRcvRpc(227, "mach_memory_info" ) |
| 2854 | __BeforeRcvRpc(227, "mach_memory_info" ) |
| 2855 | |
| 2856 | #if defined(__MIG_check__Request__mach_memory_info_t__defined) |
| 2857 | check_result = __MIG_check__Request__mach_memory_info_t((__Request *)In0P); |
| 2858 | if (check_result != MACH_MSG_SUCCESS) |
| 2859 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 2860 | #endif /* defined(__MIG_check__Request__mach_memory_info_t__defined) */ |
| 2861 | |
| 2862 | #if UseStaticTemplates |
| 2863 | OutP->names = namesTemplate; |
| 2864 | #else /* UseStaticTemplates */ |
| 2865 | OutP->names.deallocate = TRUE; |
| 2866 | OutP->names.copy = MACH_MSG_VIRTUAL_COPY; |
| 2867 | OutP->names.pad1 = 0; |
| 2868 | OutP->names.type = MACH_MSG_OOL_DESCRIPTOR; |
| 2869 | #if defined(KERNEL) && !defined(__LP64__) |
| 2870 | OutP->names.pad_end = 0; |
| 2871 | #endif |
| 2872 | #endif /* UseStaticTemplates */ |
| 2873 | |
| 2874 | |
| 2875 | #if UseStaticTemplates |
| 2876 | OutP->info = infoTemplate; |
| 2877 | #else /* UseStaticTemplates */ |
| 2878 | OutP->info.deallocate = TRUE; |
| 2879 | OutP->info.copy = MACH_MSG_VIRTUAL_COPY; |
| 2880 | OutP->info.pad1 = 0; |
| 2881 | OutP->info.type = MACH_MSG_OOL_DESCRIPTOR; |
| 2882 | #if defined(KERNEL) && !defined(__LP64__) |
| 2883 | OutP->info.pad_end = 0; |
| 2884 | #endif |
| 2885 | #endif /* UseStaticTemplates */ |
| 2886 | |
| 2887 | |
| 2888 | #if UseStaticTemplates |
| 2889 | OutP->memory_info = memory_infoTemplate; |
| 2890 | #else /* UseStaticTemplates */ |
| 2891 | OutP->memory_info.deallocate = TRUE; |
| 2892 | OutP->memory_info.copy = MACH_MSG_VIRTUAL_COPY; |
| 2893 | OutP->memory_info.pad1 = 0; |
| 2894 | OutP->memory_info.type = MACH_MSG_OOL_DESCRIPTOR; |
| 2895 | #if defined(KERNEL) && !defined(__LP64__) |
| 2896 | OutP->memory_info.pad_end = 0; |
| 2897 | #endif |
| 2898 | #endif /* UseStaticTemplates */ |
| 2899 | |
| 2900 | |
| 2901 | OutP->namesCnt = 0; |
| 2902 | |
| 2903 | OutP->infoCnt = 0; |
| 2904 | |
| 2905 | OutP->memory_infoCnt = 0; |
| 2906 | |
| 2907 | RetCode = mach_memory_info(convert_port_to_host_priv(In0P->Head.msgh_request_port), (mach_zone_name_array_t *)&(OutP->names.address), &OutP->namesCnt, (mach_zone_info_array_t *)&(OutP->info.address), &OutP->infoCnt, (mach_memory_info_array_t *)&(OutP->memory_info.address), &OutP->memory_infoCnt); |
| 2908 | if (RetCode != KERN_SUCCESS) { |
| 2909 | MIG_RETURN_ERROR(OutP, RetCode); |
| 2910 | } |
| 2911 | #if __MigKernelSpecificCode |
| 2912 | #endif /* __MigKernelSpecificCode */ |
| 2913 | OutP->names.size = OutP->namesCnt * 80; |
| 2914 | |
| 2915 | OutP->info.size = OutP->infoCnt * 64; |
| 2916 | |
| 2917 | OutP->memory_info.size = OutP->memory_infoCnt * 176; |
| 2918 | |
| 2919 | |
| 2920 | OutP->NDR = NDR_record; |
| 2921 | |
| 2922 | |
| 2923 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 2924 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 2925 | OutP->msgh_body.msgh_descriptor_count = 3; |
| 2926 | __AfterRcvRpc(227, "mach_memory_info" ) |
| 2927 | } |
| 2928 | |
| 2929 | #if ( __MigTypeCheck ) |
| 2930 | #if __MIG_check__Request__mach_host_subsystem__ |
| 2931 | #if !defined(__MIG_check__Request__host_set_multiuser_config_flags_t__defined) |
| 2932 | #define __MIG_check__Request__host_set_multiuser_config_flags_t__defined |
| 2933 | |
| 2934 | mig_internal kern_return_t __MIG_check__Request__host_set_multiuser_config_flags_t(__attribute__((__unused__)) __Request__host_set_multiuser_config_flags_t *In0P) |
| 2935 | { |
| 2936 | |
| 2937 | typedef __Request__host_set_multiuser_config_flags_t __Request; |
| 2938 | #if __MigTypeCheck |
| 2939 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 2940 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 2941 | return MIG_BAD_ARGUMENTS; |
| 2942 | #endif /* __MigTypeCheck */ |
| 2943 | |
| 2944 | return MACH_MSG_SUCCESS; |
| 2945 | } |
| 2946 | #endif /* !defined(__MIG_check__Request__host_set_multiuser_config_flags_t__defined) */ |
| 2947 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 2948 | #endif /* ( __MigTypeCheck ) */ |
| 2949 | |
| 2950 | |
| 2951 | /* Routine host_set_multiuser_config_flags */ |
| 2952 | mig_internal novalue _Xhost_set_multiuser_config_flags |
| 2953 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 2954 | { |
| 2955 | |
| 2956 | #ifdef __MigPackStructs |
| 2957 | #pragma pack(4) |
| 2958 | #endif |
| 2959 | typedef struct { |
| 2960 | mach_msg_header_t Head; |
| 2961 | NDR_record_t NDR; |
| 2962 | uint32_t multiuser_flags; |
| 2963 | mach_msg_trailer_t trailer; |
| 2964 | } Request __attribute__((unused)); |
| 2965 | #ifdef __MigPackStructs |
| 2966 | #pragma pack() |
| 2967 | #endif |
| 2968 | typedef __Request__host_set_multiuser_config_flags_t __Request; |
| 2969 | typedef __Reply__host_set_multiuser_config_flags_t Reply __attribute__((unused)); |
| 2970 | |
| 2971 | /* |
| 2972 | * typedef struct { |
| 2973 | * mach_msg_header_t Head; |
| 2974 | * NDR_record_t NDR; |
| 2975 | * kern_return_t RetCode; |
| 2976 | * } mig_reply_error_t; |
| 2977 | */ |
| 2978 | |
| 2979 | Request *In0P = (Request *) InHeadP; |
| 2980 | Reply *OutP = (Reply *) OutHeadP; |
| 2981 | #ifdef __MIG_check__Request__host_set_multiuser_config_flags_t__defined |
| 2982 | kern_return_t check_result; |
| 2983 | #endif /* __MIG_check__Request__host_set_multiuser_config_flags_t__defined */ |
| 2984 | |
| 2985 | #if __MigKernelSpecificCode |
| 2986 | #else |
| 2987 | #endif /* __MigKernelSpecificCode */ |
| 2988 | __DeclareRcvRpc(228, "host_set_multiuser_config_flags" ) |
| 2989 | __BeforeRcvRpc(228, "host_set_multiuser_config_flags" ) |
| 2990 | |
| 2991 | #if defined(__MIG_check__Request__host_set_multiuser_config_flags_t__defined) |
| 2992 | check_result = __MIG_check__Request__host_set_multiuser_config_flags_t((__Request *)In0P); |
| 2993 | if (check_result != MACH_MSG_SUCCESS) |
| 2994 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 2995 | #endif /* defined(__MIG_check__Request__host_set_multiuser_config_flags_t__defined) */ |
| 2996 | |
| 2997 | OutP->RetCode = host_set_multiuser_config_flags(convert_port_to_host_priv(In0P->Head.msgh_request_port), In0P->multiuser_flags); |
| 2998 | #if __MigKernelSpecificCode |
| 2999 | #endif /* __MigKernelSpecificCode */ |
| 3000 | |
| 3001 | OutP->NDR = NDR_record; |
| 3002 | |
| 3003 | |
| 3004 | __AfterRcvRpc(228, "host_set_multiuser_config_flags" ) |
| 3005 | } |
| 3006 | |
| 3007 | #if ( __MigTypeCheck ) |
| 3008 | #if __MIG_check__Request__mach_host_subsystem__ |
| 3009 | #if !defined(__MIG_check__Request__mach_zone_info_for_zone_t__defined) |
| 3010 | #define __MIG_check__Request__mach_zone_info_for_zone_t__defined |
| 3011 | |
| 3012 | mig_internal kern_return_t __MIG_check__Request__mach_zone_info_for_zone_t(__attribute__((__unused__)) __Request__mach_zone_info_for_zone_t *In0P) |
| 3013 | { |
| 3014 | |
| 3015 | typedef __Request__mach_zone_info_for_zone_t __Request; |
| 3016 | #if __MigTypeCheck |
| 3017 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 3018 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 3019 | return MIG_BAD_ARGUMENTS; |
| 3020 | #endif /* __MigTypeCheck */ |
| 3021 | |
| 3022 | return MACH_MSG_SUCCESS; |
| 3023 | } |
| 3024 | #endif /* !defined(__MIG_check__Request__mach_zone_info_for_zone_t__defined) */ |
| 3025 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 3026 | #endif /* ( __MigTypeCheck ) */ |
| 3027 | |
| 3028 | |
| 3029 | /* Routine mach_zone_info_for_zone */ |
| 3030 | mig_internal novalue _Xmach_zone_info_for_zone |
| 3031 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 3032 | { |
| 3033 | |
| 3034 | #ifdef __MigPackStructs |
| 3035 | #pragma pack(4) |
| 3036 | #endif |
| 3037 | typedef struct { |
| 3038 | mach_msg_header_t Head; |
| 3039 | NDR_record_t NDR; |
| 3040 | mach_zone_name_t name; |
| 3041 | mach_msg_trailer_t trailer; |
| 3042 | } Request __attribute__((unused)); |
| 3043 | #ifdef __MigPackStructs |
| 3044 | #pragma pack() |
| 3045 | #endif |
| 3046 | typedef __Request__mach_zone_info_for_zone_t __Request; |
| 3047 | typedef __Reply__mach_zone_info_for_zone_t Reply __attribute__((unused)); |
| 3048 | |
| 3049 | /* |
| 3050 | * typedef struct { |
| 3051 | * mach_msg_header_t Head; |
| 3052 | * NDR_record_t NDR; |
| 3053 | * kern_return_t RetCode; |
| 3054 | * } mig_reply_error_t; |
| 3055 | */ |
| 3056 | |
| 3057 | Request *In0P = (Request *) InHeadP; |
| 3058 | Reply *OutP = (Reply *) OutHeadP; |
| 3059 | #ifdef __MIG_check__Request__mach_zone_info_for_zone_t__defined |
| 3060 | kern_return_t check_result; |
| 3061 | #endif /* __MIG_check__Request__mach_zone_info_for_zone_t__defined */ |
| 3062 | |
| 3063 | #if __MigKernelSpecificCode |
| 3064 | #else |
| 3065 | #endif /* __MigKernelSpecificCode */ |
| 3066 | __DeclareRcvRpc(231, "mach_zone_info_for_zone" ) |
| 3067 | __BeforeRcvRpc(231, "mach_zone_info_for_zone" ) |
| 3068 | |
| 3069 | #if defined(__MIG_check__Request__mach_zone_info_for_zone_t__defined) |
| 3070 | check_result = __MIG_check__Request__mach_zone_info_for_zone_t((__Request *)In0P); |
| 3071 | if (check_result != MACH_MSG_SUCCESS) |
| 3072 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 3073 | #endif /* defined(__MIG_check__Request__mach_zone_info_for_zone_t__defined) */ |
| 3074 | |
| 3075 | OutP->RetCode = mach_zone_info_for_zone(convert_port_to_host_priv(In0P->Head.msgh_request_port), In0P->name, &OutP->info); |
| 3076 | if (OutP->RetCode != KERN_SUCCESS) { |
| 3077 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
| 3078 | } |
| 3079 | #if __MigKernelSpecificCode |
| 3080 | #endif /* __MigKernelSpecificCode */ |
| 3081 | |
| 3082 | OutP->NDR = NDR_record; |
| 3083 | |
| 3084 | |
| 3085 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 3086 | __AfterRcvRpc(231, "mach_zone_info_for_zone" ) |
| 3087 | } |
| 3088 | |
| 3089 | #if ( __MigTypeCheck ) |
| 3090 | #if __MIG_check__Request__mach_host_subsystem__ |
| 3091 | #if !defined(__MIG_check__Request__mach_zone_info_for_largest_zone_t__defined) |
| 3092 | #define __MIG_check__Request__mach_zone_info_for_largest_zone_t__defined |
| 3093 | |
| 3094 | mig_internal kern_return_t __MIG_check__Request__mach_zone_info_for_largest_zone_t(__attribute__((__unused__)) __Request__mach_zone_info_for_largest_zone_t *In0P) |
| 3095 | { |
| 3096 | |
| 3097 | typedef __Request__mach_zone_info_for_largest_zone_t __Request; |
| 3098 | #if __MigTypeCheck |
| 3099 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 3100 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 3101 | return MIG_BAD_ARGUMENTS; |
| 3102 | #endif /* __MigTypeCheck */ |
| 3103 | |
| 3104 | return MACH_MSG_SUCCESS; |
| 3105 | } |
| 3106 | #endif /* !defined(__MIG_check__Request__mach_zone_info_for_largest_zone_t__defined) */ |
| 3107 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 3108 | #endif /* ( __MigTypeCheck ) */ |
| 3109 | |
| 3110 | |
| 3111 | /* Routine mach_zone_info_for_largest_zone */ |
| 3112 | mig_internal novalue _Xmach_zone_info_for_largest_zone |
| 3113 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 3114 | { |
| 3115 | |
| 3116 | #ifdef __MigPackStructs |
| 3117 | #pragma pack(4) |
| 3118 | #endif |
| 3119 | typedef struct { |
| 3120 | mach_msg_header_t Head; |
| 3121 | mach_msg_trailer_t trailer; |
| 3122 | } Request __attribute__((unused)); |
| 3123 | #ifdef __MigPackStructs |
| 3124 | #pragma pack() |
| 3125 | #endif |
| 3126 | typedef __Request__mach_zone_info_for_largest_zone_t __Request; |
| 3127 | typedef __Reply__mach_zone_info_for_largest_zone_t Reply __attribute__((unused)); |
| 3128 | |
| 3129 | /* |
| 3130 | * typedef struct { |
| 3131 | * mach_msg_header_t Head; |
| 3132 | * NDR_record_t NDR; |
| 3133 | * kern_return_t RetCode; |
| 3134 | * } mig_reply_error_t; |
| 3135 | */ |
| 3136 | |
| 3137 | Request *In0P = (Request *) InHeadP; |
| 3138 | Reply *OutP = (Reply *) OutHeadP; |
| 3139 | #ifdef __MIG_check__Request__mach_zone_info_for_largest_zone_t__defined |
| 3140 | kern_return_t check_result; |
| 3141 | #endif /* __MIG_check__Request__mach_zone_info_for_largest_zone_t__defined */ |
| 3142 | |
| 3143 | #if __MigKernelSpecificCode |
| 3144 | #else |
| 3145 | #endif /* __MigKernelSpecificCode */ |
| 3146 | __DeclareRcvRpc(232, "mach_zone_info_for_largest_zone" ) |
| 3147 | __BeforeRcvRpc(232, "mach_zone_info_for_largest_zone" ) |
| 3148 | |
| 3149 | #if defined(__MIG_check__Request__mach_zone_info_for_largest_zone_t__defined) |
| 3150 | check_result = __MIG_check__Request__mach_zone_info_for_largest_zone_t((__Request *)In0P); |
| 3151 | if (check_result != MACH_MSG_SUCCESS) |
| 3152 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 3153 | #endif /* defined(__MIG_check__Request__mach_zone_info_for_largest_zone_t__defined) */ |
| 3154 | |
| 3155 | OutP->RetCode = mach_zone_info_for_largest_zone(convert_port_to_host_priv(In0P->Head.msgh_request_port), &OutP->name, &OutP->info); |
| 3156 | if (OutP->RetCode != KERN_SUCCESS) { |
| 3157 | MIG_RETURN_ERROR(OutP, OutP->RetCode); |
| 3158 | } |
| 3159 | #if __MigKernelSpecificCode |
| 3160 | #endif /* __MigKernelSpecificCode */ |
| 3161 | |
| 3162 | OutP->NDR = NDR_record; |
| 3163 | |
| 3164 | |
| 3165 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 3166 | __AfterRcvRpc(232, "mach_zone_info_for_largest_zone" ) |
| 3167 | } |
| 3168 | |
| 3169 | #if ( __MigTypeCheck ) |
| 3170 | #if __MIG_check__Request__mach_host_subsystem__ |
| 3171 | #if !defined(__MIG_check__Request__mach_zone_get_zlog_zones_t__defined) |
| 3172 | #define __MIG_check__Request__mach_zone_get_zlog_zones_t__defined |
| 3173 | |
| 3174 | mig_internal kern_return_t __MIG_check__Request__mach_zone_get_zlog_zones_t(__attribute__((__unused__)) __Request__mach_zone_get_zlog_zones_t *In0P) |
| 3175 | { |
| 3176 | |
| 3177 | typedef __Request__mach_zone_get_zlog_zones_t __Request; |
| 3178 | #if __MigTypeCheck |
| 3179 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 3180 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 3181 | return MIG_BAD_ARGUMENTS; |
| 3182 | #endif /* __MigTypeCheck */ |
| 3183 | |
| 3184 | return MACH_MSG_SUCCESS; |
| 3185 | } |
| 3186 | #endif /* !defined(__MIG_check__Request__mach_zone_get_zlog_zones_t__defined) */ |
| 3187 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 3188 | #endif /* ( __MigTypeCheck ) */ |
| 3189 | |
| 3190 | |
| 3191 | /* Routine mach_zone_get_zlog_zones */ |
| 3192 | mig_internal novalue _Xmach_zone_get_zlog_zones |
| 3193 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 3194 | { |
| 3195 | |
| 3196 | #ifdef __MigPackStructs |
| 3197 | #pragma pack(4) |
| 3198 | #endif |
| 3199 | typedef struct { |
| 3200 | mach_msg_header_t Head; |
| 3201 | mach_msg_trailer_t trailer; |
| 3202 | } Request __attribute__((unused)); |
| 3203 | #ifdef __MigPackStructs |
| 3204 | #pragma pack() |
| 3205 | #endif |
| 3206 | typedef __Request__mach_zone_get_zlog_zones_t __Request; |
| 3207 | typedef __Reply__mach_zone_get_zlog_zones_t Reply __attribute__((unused)); |
| 3208 | |
| 3209 | /* |
| 3210 | * typedef struct { |
| 3211 | * mach_msg_header_t Head; |
| 3212 | * NDR_record_t NDR; |
| 3213 | * kern_return_t RetCode; |
| 3214 | * } mig_reply_error_t; |
| 3215 | */ |
| 3216 | |
| 3217 | Request *In0P = (Request *) InHeadP; |
| 3218 | Reply *OutP = (Reply *) OutHeadP; |
| 3219 | #ifdef __MIG_check__Request__mach_zone_get_zlog_zones_t__defined |
| 3220 | kern_return_t check_result; |
| 3221 | #endif /* __MIG_check__Request__mach_zone_get_zlog_zones_t__defined */ |
| 3222 | |
| 3223 | #if __MigKernelSpecificCode |
| 3224 | #if UseStaticTemplates |
| 3225 | const static mach_msg_ool_descriptor_t namesTemplate = { |
| 3226 | /* addr = */ (void *)0, |
| 3227 | /* size = */ 0, |
| 3228 | /* deal = */ TRUE, |
| 3229 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 3230 | /* pad2 = */ 0, |
| 3231 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 3232 | }; |
| 3233 | #endif /* UseStaticTemplates */ |
| 3234 | |
| 3235 | #else |
| 3236 | #if UseStaticTemplates |
| 3237 | const static mach_msg_ool_descriptor_t namesTemplate = { |
| 3238 | /* addr = */ (void *)0, |
| 3239 | /* size = */ 0, |
| 3240 | /* deal = */ TRUE, |
| 3241 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 3242 | /* pad2 = */ 0, |
| 3243 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 3244 | }; |
| 3245 | #endif /* UseStaticTemplates */ |
| 3246 | |
| 3247 | #endif /* __MigKernelSpecificCode */ |
| 3248 | kern_return_t RetCode; |
| 3249 | __DeclareRcvRpc(233, "mach_zone_get_zlog_zones" ) |
| 3250 | __BeforeRcvRpc(233, "mach_zone_get_zlog_zones" ) |
| 3251 | |
| 3252 | #if defined(__MIG_check__Request__mach_zone_get_zlog_zones_t__defined) |
| 3253 | check_result = __MIG_check__Request__mach_zone_get_zlog_zones_t((__Request *)In0P); |
| 3254 | if (check_result != MACH_MSG_SUCCESS) |
| 3255 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 3256 | #endif /* defined(__MIG_check__Request__mach_zone_get_zlog_zones_t__defined) */ |
| 3257 | |
| 3258 | #if UseStaticTemplates |
| 3259 | OutP->names = namesTemplate; |
| 3260 | #else /* UseStaticTemplates */ |
| 3261 | OutP->names.deallocate = TRUE; |
| 3262 | OutP->names.copy = MACH_MSG_VIRTUAL_COPY; |
| 3263 | OutP->names.pad1 = 0; |
| 3264 | OutP->names.type = MACH_MSG_OOL_DESCRIPTOR; |
| 3265 | #if defined(KERNEL) && !defined(__LP64__) |
| 3266 | OutP->names.pad_end = 0; |
| 3267 | #endif |
| 3268 | #endif /* UseStaticTemplates */ |
| 3269 | |
| 3270 | |
| 3271 | OutP->namesCnt = 0; |
| 3272 | |
| 3273 | RetCode = mach_zone_get_zlog_zones(convert_port_to_host_priv(In0P->Head.msgh_request_port), (mach_zone_name_array_t *)&(OutP->names.address), &OutP->namesCnt); |
| 3274 | if (RetCode != KERN_SUCCESS) { |
| 3275 | MIG_RETURN_ERROR(OutP, RetCode); |
| 3276 | } |
| 3277 | #if __MigKernelSpecificCode |
| 3278 | #endif /* __MigKernelSpecificCode */ |
| 3279 | OutP->names.size = OutP->namesCnt * 80; |
| 3280 | |
| 3281 | |
| 3282 | OutP->NDR = NDR_record; |
| 3283 | |
| 3284 | |
| 3285 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 3286 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 3287 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 3288 | __AfterRcvRpc(233, "mach_zone_get_zlog_zones" ) |
| 3289 | } |
| 3290 | |
| 3291 | #if ( __MigTypeCheck ) |
| 3292 | #if __MIG_check__Request__mach_host_subsystem__ |
| 3293 | #if !defined(__MIG_check__Request__mach_zone_get_btlog_records_t__defined) |
| 3294 | #define __MIG_check__Request__mach_zone_get_btlog_records_t__defined |
| 3295 | |
| 3296 | mig_internal kern_return_t __MIG_check__Request__mach_zone_get_btlog_records_t(__attribute__((__unused__)) __Request__mach_zone_get_btlog_records_t *In0P) |
| 3297 | { |
| 3298 | |
| 3299 | typedef __Request__mach_zone_get_btlog_records_t __Request; |
| 3300 | #if __MigTypeCheck |
| 3301 | if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || |
| 3302 | (In0P->Head.msgh_size != (mach_msg_size_t)sizeof(__Request))) |
| 3303 | return MIG_BAD_ARGUMENTS; |
| 3304 | #endif /* __MigTypeCheck */ |
| 3305 | |
| 3306 | return MACH_MSG_SUCCESS; |
| 3307 | } |
| 3308 | #endif /* !defined(__MIG_check__Request__mach_zone_get_btlog_records_t__defined) */ |
| 3309 | #endif /* __MIG_check__Request__mach_host_subsystem__ */ |
| 3310 | #endif /* ( __MigTypeCheck ) */ |
| 3311 | |
| 3312 | |
| 3313 | /* Routine mach_zone_get_btlog_records */ |
| 3314 | mig_internal novalue _Xmach_zone_get_btlog_records |
| 3315 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 3316 | { |
| 3317 | |
| 3318 | #ifdef __MigPackStructs |
| 3319 | #pragma pack(4) |
| 3320 | #endif |
| 3321 | typedef struct { |
| 3322 | mach_msg_header_t Head; |
| 3323 | NDR_record_t NDR; |
| 3324 | mach_zone_name_t name; |
| 3325 | mach_msg_trailer_t trailer; |
| 3326 | } Request __attribute__((unused)); |
| 3327 | #ifdef __MigPackStructs |
| 3328 | #pragma pack() |
| 3329 | #endif |
| 3330 | typedef __Request__mach_zone_get_btlog_records_t __Request; |
| 3331 | typedef __Reply__mach_zone_get_btlog_records_t Reply __attribute__((unused)); |
| 3332 | |
| 3333 | /* |
| 3334 | * typedef struct { |
| 3335 | * mach_msg_header_t Head; |
| 3336 | * NDR_record_t NDR; |
| 3337 | * kern_return_t RetCode; |
| 3338 | * } mig_reply_error_t; |
| 3339 | */ |
| 3340 | |
| 3341 | Request *In0P = (Request *) InHeadP; |
| 3342 | Reply *OutP = (Reply *) OutHeadP; |
| 3343 | #ifdef __MIG_check__Request__mach_zone_get_btlog_records_t__defined |
| 3344 | kern_return_t check_result; |
| 3345 | #endif /* __MIG_check__Request__mach_zone_get_btlog_records_t__defined */ |
| 3346 | |
| 3347 | #if __MigKernelSpecificCode |
| 3348 | #if UseStaticTemplates |
| 3349 | const static mach_msg_ool_descriptor_t recsTemplate = { |
| 3350 | /* addr = */ (void *)0, |
| 3351 | /* size = */ 0, |
| 3352 | /* deal = */ TRUE, |
| 3353 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 3354 | /* pad2 = */ 0, |
| 3355 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 3356 | }; |
| 3357 | #endif /* UseStaticTemplates */ |
| 3358 | |
| 3359 | #else |
| 3360 | #if UseStaticTemplates |
| 3361 | const static mach_msg_ool_descriptor_t recsTemplate = { |
| 3362 | /* addr = */ (void *)0, |
| 3363 | /* size = */ 0, |
| 3364 | /* deal = */ TRUE, |
| 3365 | /* copy = */ MACH_MSG_VIRTUAL_COPY, |
| 3366 | /* pad2 = */ 0, |
| 3367 | /* type = */ MACH_MSG_OOL_DESCRIPTOR, |
| 3368 | }; |
| 3369 | #endif /* UseStaticTemplates */ |
| 3370 | |
| 3371 | #endif /* __MigKernelSpecificCode */ |
| 3372 | kern_return_t RetCode; |
| 3373 | __DeclareRcvRpc(234, "mach_zone_get_btlog_records" ) |
| 3374 | __BeforeRcvRpc(234, "mach_zone_get_btlog_records" ) |
| 3375 | |
| 3376 | #if defined(__MIG_check__Request__mach_zone_get_btlog_records_t__defined) |
| 3377 | check_result = __MIG_check__Request__mach_zone_get_btlog_records_t((__Request *)In0P); |
| 3378 | if (check_result != MACH_MSG_SUCCESS) |
| 3379 | { MIG_RETURN_ERROR(OutP, check_result); } |
| 3380 | #endif /* defined(__MIG_check__Request__mach_zone_get_btlog_records_t__defined) */ |
| 3381 | |
| 3382 | #if UseStaticTemplates |
| 3383 | OutP->recs = recsTemplate; |
| 3384 | #else /* UseStaticTemplates */ |
| 3385 | OutP->recs.deallocate = TRUE; |
| 3386 | OutP->recs.copy = MACH_MSG_VIRTUAL_COPY; |
| 3387 | OutP->recs.pad1 = 0; |
| 3388 | OutP->recs.type = MACH_MSG_OOL_DESCRIPTOR; |
| 3389 | #if defined(KERNEL) && !defined(__LP64__) |
| 3390 | OutP->recs.pad_end = 0; |
| 3391 | #endif |
| 3392 | #endif /* UseStaticTemplates */ |
| 3393 | |
| 3394 | |
| 3395 | OutP->recsCnt = 0; |
| 3396 | |
| 3397 | RetCode = mach_zone_get_btlog_records(convert_port_to_host_priv(In0P->Head.msgh_request_port), In0P->name, (zone_btrecord_array_t *)&(OutP->recs.address), &OutP->recsCnt); |
| 3398 | if (RetCode != KERN_SUCCESS) { |
| 3399 | MIG_RETURN_ERROR(OutP, RetCode); |
| 3400 | } |
| 3401 | #if __MigKernelSpecificCode |
| 3402 | #endif /* __MigKernelSpecificCode */ |
| 3403 | OutP->recs.size = OutP->recsCnt * 128; |
| 3404 | |
| 3405 | |
| 3406 | OutP->NDR = NDR_record; |
| 3407 | |
| 3408 | |
| 3409 | OutP->Head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; |
| 3410 | OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply)); |
| 3411 | OutP->msgh_body.msgh_descriptor_count = 1; |
| 3412 | __AfterRcvRpc(234, "mach_zone_get_btlog_records" ) |
| 3413 | } |
| 3414 | |
| 3415 | |
| 3416 | |
| 3417 | /* Description of this subsystem, for use in direct RPC */ |
| 3418 | const struct mach_host_subsystem mach_host_subsystem = { |
| 3419 | mach_host_server_routine, |
| 3420 | 200, |
| 3421 | 235, |
| 3422 | (mach_msg_size_t)sizeof(union __ReplyUnion__mach_host_subsystem), |
| 3423 | (vm_address_t)0, |
| 3424 | { |
| 3425 | { (mig_impl_routine_t) 0, |
| 3426 | (mig_stub_routine_t) _Xhost_info, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_info_t)}, |
| 3427 | { (mig_impl_routine_t) 0, |
| 3428 | (mig_stub_routine_t) _Xhost_kernel_version, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_kernel_version_t)}, |
| 3429 | { (mig_impl_routine_t) 0, |
| 3430 | (mig_stub_routine_t) _Xhost_page_size, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_page_size_t)}, |
| 3431 | { (mig_impl_routine_t) 0, |
| 3432 | (mig_stub_routine_t) _Xmach_memory_object_memory_entry, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_memory_object_memory_entry_t)}, |
| 3433 | { (mig_impl_routine_t) 0, |
| 3434 | (mig_stub_routine_t) _Xhost_processor_info, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_processor_info_t)}, |
| 3435 | { (mig_impl_routine_t) 0, |
| 3436 | (mig_stub_routine_t) _Xhost_get_io_master, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_get_io_master_t)}, |
| 3437 | { (mig_impl_routine_t) 0, |
| 3438 | (mig_stub_routine_t) _Xhost_get_clock_service, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_get_clock_service_t)}, |
| 3439 | { (mig_impl_routine_t) 0, |
| 3440 | (mig_stub_routine_t) _Xkmod_get_info, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__kmod_get_info_t)}, |
| 3441 | {0, 0, 0, 0, 0, 0}, |
| 3442 | { (mig_impl_routine_t) 0, |
| 3443 | (mig_stub_routine_t) _Xhost_virtual_physical_table_info, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_virtual_physical_table_info_t)}, |
| 3444 | {0, 0, 0, 0, 0, 0}, |
| 3445 | {0, 0, 0, 0, 0, 0}, |
| 3446 | {0, 0, 0, 0, 0, 0}, |
| 3447 | { (mig_impl_routine_t) 0, |
| 3448 | (mig_stub_routine_t) _Xprocessor_set_default, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__processor_set_default_t)}, |
| 3449 | { (mig_impl_routine_t) 0, |
| 3450 | (mig_stub_routine_t) _Xprocessor_set_create, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__processor_set_create_t)}, |
| 3451 | { (mig_impl_routine_t) 0, |
| 3452 | (mig_stub_routine_t) _Xmach_memory_object_memory_entry_64, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_memory_object_memory_entry_64_t)}, |
| 3453 | { (mig_impl_routine_t) 0, |
| 3454 | (mig_stub_routine_t) _Xhost_statistics_from_user, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_statistics_from_user_t)}, |
| 3455 | { (mig_impl_routine_t) 0, |
| 3456 | (mig_stub_routine_t) _Xhost_request_notification, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_request_notification_t)}, |
| 3457 | { (mig_impl_routine_t) 0, |
| 3458 | (mig_stub_routine_t) _Xhost_lockgroup_info, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_lockgroup_info_t)}, |
| 3459 | { (mig_impl_routine_t) 0, |
| 3460 | (mig_stub_routine_t) _Xhost_statistics64_from_user, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_statistics64_from_user_t)}, |
| 3461 | { (mig_impl_routine_t) 0, |
| 3462 | (mig_stub_routine_t) _Xmach_zone_info, 5, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_zone_info_t)}, |
| 3463 | { (mig_impl_routine_t) 0, |
| 3464 | (mig_stub_routine_t) _Xmach_zone_force_gc, 1, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_zone_force_gc_t)}, |
| 3465 | { (mig_impl_routine_t) 0, |
| 3466 | (mig_stub_routine_t) _Xhost_create_mach_voucher, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_create_mach_voucher_t)}, |
| 3467 | { (mig_impl_routine_t) 0, |
| 3468 | (mig_stub_routine_t) _Xhost_register_mach_voucher_attr_manager, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_register_mach_voucher_attr_manager_t)}, |
| 3469 | { (mig_impl_routine_t) 0, |
| 3470 | (mig_stub_routine_t) _Xhost_register_well_known_mach_voucher_attr_manager, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_register_well_known_mach_voucher_attr_manager_t)}, |
| 3471 | { (mig_impl_routine_t) 0, |
| 3472 | (mig_stub_routine_t) _Xhost_set_atm_diagnostic_flag, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_set_atm_diagnostic_flag_t)}, |
| 3473 | {0, 0, 0, 0, 0, 0}, |
| 3474 | { (mig_impl_routine_t) 0, |
| 3475 | (mig_stub_routine_t) _Xmach_memory_info, 7, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_memory_info_t)}, |
| 3476 | { (mig_impl_routine_t) 0, |
| 3477 | (mig_stub_routine_t) _Xhost_set_multiuser_config_flags, 2, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__host_set_multiuser_config_flags_t)}, |
| 3478 | {0, 0, 0, 0, 0, 0}, |
| 3479 | {0, 0, 0, 0, 0, 0}, |
| 3480 | { (mig_impl_routine_t) 0, |
| 3481 | (mig_stub_routine_t) _Xmach_zone_info_for_zone, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_zone_info_for_zone_t)}, |
| 3482 | { (mig_impl_routine_t) 0, |
| 3483 | (mig_stub_routine_t) _Xmach_zone_info_for_largest_zone, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_zone_info_for_largest_zone_t)}, |
| 3484 | { (mig_impl_routine_t) 0, |
| 3485 | (mig_stub_routine_t) _Xmach_zone_get_zlog_zones, 3, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_zone_get_zlog_zones_t)}, |
| 3486 | { (mig_impl_routine_t) 0, |
| 3487 | (mig_stub_routine_t) _Xmach_zone_get_btlog_records, 4, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_zone_get_btlog_records_t)}, |
| 3488 | } |
| 3489 | }; |
| 3490 | |
| 3491 | mig_external boolean_t mach_host_server |
| 3492 | (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) |
| 3493 | { |
| 3494 | /* |
| 3495 | * typedef struct { |
| 3496 | * mach_msg_header_t Head; |
| 3497 | * NDR_record_t NDR; |
| 3498 | * kern_return_t RetCode; |
| 3499 | * } mig_reply_error_t; |
| 3500 | */ |
| 3501 | |
| 3502 | register mig_routine_t routine; |
| 3503 | |
| 3504 | OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); |
| 3505 | OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; |
| 3506 | /* Minimal size: routine() will update it if different */ |
| 3507 | OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); |
| 3508 | OutHeadP->msgh_local_port = MACH_PORT_NULL; |
| 3509 | OutHeadP->msgh_id = InHeadP->msgh_id + 100; |
| 3510 | OutHeadP->msgh_reserved = 0; |
| 3511 | |
| 3512 | if ((InHeadP->msgh_id > 234) || (InHeadP->msgh_id < 200) || |
| 3513 | ((routine = mach_host_subsystem.routine[InHeadP->msgh_id - 200].stub_routine) == 0)) { |
| 3514 | ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; |
| 3515 | ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; |
| 3516 | return FALSE; |
| 3517 | } |
| 3518 | (*routine) (InHeadP, OutHeadP); |
| 3519 | return TRUE; |
| 3520 | } |
| 3521 | |
| 3522 | mig_external mig_routine_t mach_host_server_routine |
| 3523 | (mach_msg_header_t *InHeadP) |
| 3524 | { |
| 3525 | register int msgh_id; |
| 3526 | |
| 3527 | msgh_id = InHeadP->msgh_id - 200; |
| 3528 | |
| 3529 | if ((msgh_id > 34) || (msgh_id < 0)) |
| 3530 | return 0; |
| 3531 | |
| 3532 | return mach_host_subsystem.routine[msgh_id].stub_routine; |
| 3533 | } |
| 3534 | |