]> git.saurik.com Git - apple/launchd.git/blame - launchd/src/protocol_vproc.defs
launchd-329.3.tar.gz
[apple/launchd.git] / launchd / src / protocol_vproc.defs
CommitLineData
5b0a4722
A
1/*
2 * Copyright (c) 1999-2004 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_APACHE_LICENSE_HEADER_START@
5 *
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
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
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.
17 *
18 * @APPLE_APACHE_LICENSE_HEADER_END@
19 */
20/*
21 * bootstrap -- fundamental service initiator and port server
22 * Mike DeMoney, NeXT, Inc.
23 * Copyright, 1990. All rights reserved.
24 */
25
26subsystem protocol_vproc 400;
27
28#include <mach/std_types.defs>
29#include <mach/mach_types.defs>
30#include "launchd_mig_types.defs"
ef398931
A
31import "vproc.h";
32import "vproc_priv.h";
33import "vproc_internal.h";
5b0a4722
A
34
35type mach_port_move_send_array_t = array[] of mach_port_move_send_t
36 ctype: mach_port_array_t;
37
5b0a4722
A
38userprefix vproc_mig_;
39serverprefix job_mig_;
40
41routine create_server(
ddbbfbc1
A
42 __bs_port : job_t;
43 __server_cmd : cmd_t;
44 __server_uid : uid_t;
45 __on_demand : boolean_t;
46out __server_port : mach_port_make_send_t);
5b0a4722
A
47
48routine reboot2(
ddbbfbc1
A
49 __bs_port : job_t;
50 __flags : uint64_t);
5b0a4722 51
ddbbfbc1
A
52routine check_in2(
53 __bs_port : job_t;
54 __service_name : name_t;
55out __service_port : mach_port_move_receive_t;
56 __flags : uint64_t);
5b0a4722
A
57
58routine register2(
ddbbfbc1
A
59 __bs_port : job_t;
60 __service_name : name_t;
61 __service_port : mach_port_t;
62 __flags : uint64_t);
5b0a4722
A
63
64routine look_up2(
ddbbfbc1
A
65 __bs_port : job_t;
66sreplyport __rport : mach_port_make_send_once_t;
67 __service_name : name_t;
68out __service_port : mach_port_t;
69UserAuditToken __server_cred : audit_token_t;
70 __target_pid : pid_t;
71 __flags : uint64_t);
5b0a4722
A
72
73routine send_signal(
ddbbfbc1
A
74 __bs_port : job_t;
75sreplyport __rport : mach_port_make_send_once_t;
76 __label : name_t;
77 __signal : integer_t);
5b0a4722
A
78
79routine parent(
ddbbfbc1
A
80 __bs_port : job_t;
81sreplyport __rport : mach_port_make_send_once_t;
82out __parent_port : mach_port_make_send_t);
5b0a4722
A
83
84routine post_fork_ping(
ddbbfbc1
A
85 __bs_port : job_t;
86 __task_port : task_t;
87out __audit_session : mach_port_t);
5b0a4722
A
88
89routine info(
ddbbfbc1
A
90 __bs_port : job_t;
91out __service_names : name_array_t, dealloc;
92out __service_jobs : name_array_t, dealloc;
93out __service_active : bootstrap_status_array_t, dealloc;
94 __flags : uint64_t);
5b0a4722
A
95
96routine subset(
ddbbfbc1
A
97 __bs_port : job_t;
98 __requestor_port : mach_port_t;
99out __subset_port : mach_port_make_send_t);
5b0a4722 100
ddbbfbc1
A
101routine setup_shmem(
102 __bs_port : job_t;
103out __shmem_port : mach_port_move_send_t);
5b0a4722
A
104
105routine take_subset(
ddbbfbc1
A
106 __bs_port : job_t;
107out __bs_reqport : mach_port_move_send_t;
108out __bs_rcvright : mach_port_move_receive_t;
109out __outdata : pointer_t, dealloc;
110out __service_ports : mach_port_move_send_array_t, dealloc);
5b0a4722
A
111
112routine getsocket(
ddbbfbc1
A
113 __bs_port : job_t;
114out __sockpath : name_t);
5b0a4722
A
115
116routine spawn(
ddbbfbc1
A
117 __bs_port : job_t;
118 __indata : pointer_t;
119 __audit_session : mach_port_t;
120out __pid : pid_t;
121out __obsvr_port : mach_port_make_send_t);
5b0a4722
A
122
123routine wait(
ddbbfbc1
A
124 __bs_port : job_t;
125sreplyport __rport : mach_port_make_send_once_t;
126out __waitval : integer_t);
5b0a4722
A
127
128routine uncork_fork(
ddbbfbc1 129 __bs_port : job_t);
5b0a4722
A
130
131routine swap_integer(
ddbbfbc1
A
132 __bs_port : job_t;
133 __inkey : vproc_gsk_t;
134 __outkey : vproc_gsk_t;
135 __inval : int64_t;
136out __outval : int64_t);
5b0a4722
A
137
138routine log(
ddbbfbc1
A
139 __bs_port : job_t;
140 __pri : integer_t;
141 __err : integer_t;
142 __msg : logmsg_t);
5b0a4722
A
143
144routine lookup_per_user_context(
ddbbfbc1
A
145 __bs_port : job_t;
146 __wu : uid_t;
147out __u_cont : mach_port_t);
5b0a4722
A
148
149routine move_subset(
ddbbfbc1
A
150 __bs_port : job_t;
151 __target_port : mach_port_t;
152 __sessiontype : name_t;
153 __audit_session : mach_port_t;
154 __sessionflags : uint64_t);
5b0a4722
A
155
156routine swap_complex(
ddbbfbc1
A
157 __bs_port : job_t;
158 __inkey : vproc_gsk_t;
159 __outkey : vproc_gsk_t;
160 __inval : pointer_t;
161out __outval : pointer_t, dealloc);
5b0a4722
A
162
163routine log_drain(
ddbbfbc1
A
164 __bs_port : job_t;
165sreplyport __rport : mach_port_make_send_once_t;
166out __outval : pointer_t, dealloc);
5b0a4722
A
167
168routine log_forward(
ddbbfbc1
A
169 __bs_port : job_t;
170 __inval : pointer_t);
f36da725 171
ddbbfbc1
A
172routine kickstart(
173 __bs_port : job_t;
174 __label : name_t;
175out __pid : pid_t;
176out __name_port : mach_port_t;
177out __obsrvr_port : mach_port_make_send_t;
178 __flags : natural_t);
f36da725
A
179
180routine embedded_wait(
ddbbfbc1
A
181 __bs_port : job_t;
182 __label : name_t;
183out __waitval : integer_t);
184
185routine lookup_children(
186 __bs_port : job_t;
187out __child_ports : mach_port_move_send_array_t, dealloc;
188out __child_names : name_array_t, dealloc;
189out __child_properties : bootstrap_property_array_t, dealloc);
190
191routine switch_to_session(
192 __bs_port : job_t;
193 __req_port : mach_port_t;
194 __session_name : name_t;
195 __audit_session : mach_port_t;
196out __new_bs_port : mach_port_make_send_t);
197
198routine transaction_count_for_pid(
199 __bs_port : job_t;
200 __pid : pid_t;
201out __cnt : integer_t;
202out __condemend : boolean_t);
203
204routine pid_is_managed(
205 __bs_port : job_t;
206 __pid : pid_t;
207out __managed : boolean_t);
208
209routine port_for_label(
210 __bs_port : job_t;
211 __label : name_t;
212out __mp : mach_port_make_send_t);
213
214routine init_session(
215 __bs_port : job_t;
216 __session_name : name_t;
217 __audit_session : mach_port_t);
218
219routine set_security_session(
220 __bs_port : job_t;
221 __uuid : uuid_t;
222 __session : mach_port_t);
223
224routine wait2(
225 __bs_port : job_t;
226 __target_port : job_t;
227sreplyport __rport : mach_port_make_send_once_t;
228out __waitval : integer_t;
229 __legacy : boolean_t);