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 protocol_vproc 400;
28 #include <mach/std_types.defs>
29 #include <mach/mach_types.defs>
30 #include "launchd_mig_types.defs"
32 import "vproc_priv.h";
33 import "vproc_internal.h";
35 type mach_port_move_send_array_t = array[] of mach_port_move_send_t
36 ctype: mach_port_array_t;
38 userprefix vproc_mig_;
39 serverprefix job_mig_;
41 routine create_server(
45 __on_demand : boolean_t;
46 out __server_port : mach_port_make_send_t);
54 __service_name : name_t;
55 out __service_port : mach_port_move_receive_t;
60 __service_name : name_t;
61 __service_port : mach_port_t;
66 sreplyport __rport : mach_port_make_send_once_t;
67 __service_name : name_t;
68 out __service_port : mach_port_t;
69 UserAuditToken __server_cred : audit_token_t;
75 sreplyport __rport : mach_port_make_send_once_t;
77 __signal : integer_t);
81 sreplyport __rport : mach_port_make_send_once_t;
82 out __parent_port : mach_port_make_send_t);
84 routine post_fork_ping(
87 out __audit_session : mach_port_t);
91 out __service_names : name_array_t, dealloc;
92 out __service_jobs : name_array_t, dealloc;
93 out __service_active : bootstrap_status_array_t, dealloc;
98 __requestor_port : mach_port_t;
99 out __subset_port : mach_port_make_send_t);
103 out __shmem_port : mach_port_move_send_t);
107 out __bs_reqport : mach_port_move_send_t;
108 out __bs_rcvright : mach_port_move_receive_t;
109 out __outdata : pointer_t, dealloc;
110 out __service_ports : mach_port_move_send_array_t, dealloc);
114 out __sockpath : name_t);
118 __indata : pointer_t;
119 __audit_session : mach_port_t;
121 out __obsvr_port : mach_port_make_send_t);
125 sreplyport __rport : mach_port_make_send_once_t;
126 out __waitval : integer_t);
131 routine swap_integer(
133 __inkey : vproc_gsk_t;
134 __outkey : vproc_gsk_t;
136 out __outval : int64_t);
144 routine lookup_per_user_context(
147 out __u_cont : mach_port_t);
151 __target_port : mach_port_t;
152 __sessiontype : name_t;
153 __audit_session : mach_port_t;
154 __sessionflags : uint64_t);
156 routine swap_complex(
158 __inkey : vproc_gsk_t;
159 __outkey : vproc_gsk_t;
161 out __outval : pointer_t, dealloc);
165 sreplyport __rport : mach_port_make_send_once_t;
166 out __outval : pointer_t, dealloc);
170 __inval : pointer_t);
176 out __name_port : mach_port_t;
177 out __obsrvr_port : mach_port_make_send_t;
178 __flags : natural_t);
180 routine embedded_wait(
183 out __waitval : integer_t);
185 routine lookup_children(
187 out __child_ports : mach_port_move_send_array_t, dealloc;
188 out __child_names : name_array_t, dealloc;
189 out __child_properties : bootstrap_property_array_t, dealloc);
191 routine switch_to_session(
193 __req_port : mach_port_t;
194 __session_name : name_t;
195 __audit_session : mach_port_t;
196 out __new_bs_port : mach_port_make_send_t);
198 routine transaction_count_for_pid(
201 out __cnt : integer_t;
202 out __condemend : boolean_t);
204 routine pid_is_managed(
207 out __managed : boolean_t);
209 routine port_for_label(
212 out __mp : mach_port_make_send_t);
214 routine init_session(
216 __session_name : name_t;
217 __audit_session : mach_port_t);
219 routine set_security_session(
222 __session : mach_port_t);
226 __target_port : job_t;
227 sreplyport __rport : mach_port_make_send_once_t;
228 out __waitval : integer_t;
229 __legacy : boolean_t);