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;
39 userprefix vproc_mig_;
40 serverprefix job_mig_;
42 routine create_server(
46 __on_demand : boolean_t;
47 out __server_port : mach_port_make_send_t);
55 __service_name : name_t;
56 out __service_port : mach_port_move_receive_t);
60 __service_name : name_t;
61 __service_port : mach_port_t;
66 __service_name : name_t;
67 out __service_port : mach_port_send_t;
73 sreplyport __rport : mach_port_make_send_once_t;
75 __signal : integer_t);
79 out __parent_port : mach_port_send_t);
81 routine post_fork_ping(
83 __task_port : task_t);
87 out __service_names : name_array_t, dealloc;
88 out __service_active : bootstrap_status_array_t, dealloc);
92 __requestor_port: mach_port_t;
93 out __subset_port : mach_port_make_send_t);
95 routine create_service(
97 __service_name : name_t;
98 out __service_port : mach_port_t);
102 out __bs_reqport : mach_port_move_send_t;
103 out __bs_rcvright : mach_port_move_receive_t;
104 out __outdata : pointer_t, dealloc;
105 out __service_ports : mach_port_move_send_array_t, dealloc);
109 out __sockpath : name_t);
113 __indata : pointer_t;
115 out __obsvr_port : mach_port_make_send_t);
119 sreplyport __rport : mach_port_make_send_once_t;
120 out __waitval : integer_t);
125 routine swap_integer(
127 __inkey : vproc_gsk_t;
128 __outkey : vproc_gsk_t;
130 out __outval : int64_t);
132 routine set_service_policy(
134 __target_pid : pid_t;
144 routine lookup_per_user_context(
147 out __u_cont : mach_port_t);
151 __target_port : mach_port_t;
152 __sessiontype : name_t);
154 routine swap_complex(
156 __inkey : vproc_gsk_t;
157 __outkey : vproc_gsk_t;
159 out __outval : pointer_t, dealloc);
163 sreplyport __rport : mach_port_make_send_once_t;
164 out __outval : pointer_t, dealloc);
168 __inval : pointer_t);
170 routine embedded_kickstart(
174 out __name_port : mach_port_t);
176 routine embedded_wait(
179 out __waitval : integer_t);