2 * Copyright (c) 1999-2004 Apple Computer, Inc. All rights reserved.
4 * @APPLE_APACHE_LICENSE_HEADER_START@
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * @APPLE_APACHE_LICENSE_HEADER_END@
21 * bootstrap -- fundamental service initiator and port server
22 * Mike DeMoney, NeXT, Inc.
23 * Copyright, 1990. All rights reserved.
26 subsystem bootstrap 400;
28 #include <mach/std_types.defs>
29 #include <mach/mach_types.defs>
30 #include "launchd_mig_types.defs"
31 import "bootstrap_public.h";
32 import "bootstrap_private.h";
34 userprefix vproc_mig_;
35 serverprefix job_mig_;
37 routine create_server(
40 __server_uid : natural_t;
41 __on_demand : boolean_t;
42 ServerAuditToken __token : audit_token_t;
43 out __server_port : mach_port_make_send_t);
45 skip; /* Last used in 10.4. Was bootstrap_unprivileged() */
49 __service_name : name_t;
50 ServerAuditToken __token : audit_token_t;
51 out __service_port : mach_port_move_receive_t);
55 ServerAuditToken __token : audit_token_t;
56 __service_name : name_t;
57 __service_port : mach_port_t);
61 ServerAuditToken __token : audit_token_t;
62 __service_name : name_t;
63 out __service_port : mach_port_send_t);
65 skip; /* last used in 10.4 */
69 out __parent_port : mach_port_send_t);
71 skip; /* last used in 10.4 */
75 out __service_names : name_array_t, dealloc;
76 out __service_active : bootstrap_status_array_t, dealloc);
80 __requestor_port: mach_port_t;
81 out __subset_port : mach_port_make_send_t);
83 routine create_service(
85 __service_name : name_t;
86 out __service_port : mach_port_t);
88 routine transfer_subset(
90 out __bs_reqport : mach_port_t;
91 out __bs_rcvright : mach_port_move_receive_t;
92 out __service_names : name_array_t, dealloc;
93 out __service_pids : pointer_t, dealloc;
94 out __service_ports : mach_port_array_t, dealloc);
98 out __sockpath : name_t);
102 ServerAuditToken __token : audit_token_t;
103 __chars : _internal_string_t;
109 out __obsvr_port : mach_port_make_send_t);
113 sreplyport __rport : mach_port_make_send_once_t;
114 ServerAuditToken __token : audit_token_t;
115 out __waitval : integer_t);
119 ServerAuditToken __token : audit_token_t);
121 /* Essentially the inverse of bootstrap_unprivileged() */
124 ServerAuditToken __token : audit_token_t;
125 out __job_port : mach_port_make_send_t);