]> git.saurik.com Git - apple/launchd.git/blob - src/protocol_jobmgr.defs
launchd-842.1.4.tar.gz
[apple/launchd.git] / src / protocol_jobmgr.defs
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
26 subsystem bootstrap 400;
27
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";
33
34 userprefix vproc_mig_;
35 serverprefix job_mig_;
36
37 routine create_server(
38 __bs_port : job_t;
39 __server_cmd : cmd_t;
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);
44
45 skip; /* Last used in 10.4. Was bootstrap_unprivileged() */
46
47 routine check_in(
48 __bs_port : job_t;
49 __service_name : name_t;
50 ServerAuditToken __token : audit_token_t;
51 out __service_port : mach_port_move_receive_t);
52
53 routine register(
54 __bs_port : job_t;
55 ServerAuditToken __token : audit_token_t;
56 __service_name : name_t;
57 __service_port : mach_port_t);
58
59 routine look_up(
60 __bs_port : job_t;
61 ServerAuditToken __token : audit_token_t;
62 __service_name : name_t;
63 out __service_port : mach_port_send_t);
64
65 skip; /* last used in 10.4 */
66
67 routine parent(
68 __bs_port : job_t;
69 out __parent_port : mach_port_send_t);
70
71 skip; /* last used in 10.4 */
72
73 routine info(
74 __bs_port : job_t;
75 out __service_names : name_array_t, dealloc;
76 out __service_active : bootstrap_status_array_t, dealloc);
77
78 routine subset(
79 __bs_port : job_t;
80 __requestor_port: mach_port_t;
81 out __subset_port : mach_port_make_send_t);
82
83 routine create_service(
84 __bs_port : job_t;
85 __service_name : name_t;
86 out __service_port : mach_port_t);
87
88 routine transfer_subset(
89 __bs_port : job_t;
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);
95
96 routine getsocket(
97 __bs_port : job_t;
98 out __sockpath : name_t);
99
100 routine spawn(
101 __bs_port : job_t;
102 ServerAuditToken __token : audit_token_t;
103 __chars : _internal_string_t;
104 __argc : uint32_t;
105 __envc : uint32_t;
106 __flags : uint64_t;
107 __umask : uint16_t;
108 out __pid : pid_t;
109 out __obsvr_port : mach_port_make_send_t);
110
111 routine wait(
112 __bs_port : job_t;
113 sreplyport __rport : mach_port_make_send_once_t;
114 ServerAuditToken __token : audit_token_t;
115 out __waitval : integer_t);
116
117 routine uncork_fork(
118 __bs_port : job_t;
119 ServerAuditToken __token : audit_token_t);
120
121 /* Essentially the inverse of bootstrap_unprivileged() */
122 routine get_self(
123 __bs_port : job_t;
124 ServerAuditToken __token : audit_token_t;
125 out __job_port : mach_port_make_send_t);