Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/modules/include/mach/host_security.h

1#ifndef_host_security_user_
2#define_host_security_user_
3
4/* Module host_security */
5
6#include <string.h>
7#include <mach/ndr.h>
8#include <mach/boolean.h>
9#include <mach/kern_return.h>
10#include <mach/notify.h>
11#include <mach/mach_types.h>
12#include <mach/message.h>
13#include <mach/mig_errors.h>
14#include <mach/port.h>
15
16#ifdef AUTOTEST
17#ifndef FUNCTION_PTR_T
18#define FUNCTION_PTR_T
19typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
20typedef struct {
21 char *name;
22 function_ptr_t function;
23} function_table_entry;
24typedef function_table_entry *function_table_t;
25#endif /* FUNCTION_PTR_T */
26#endif /* AUTOTEST */
27
28#ifndefhost_security_MSG_COUNT
29#definehost_security_MSG_COUNT2
30#endif/* host_security_MSG_COUNT */
31
32#include <mach/std_types.h>
33#include <mach/mig.h>
34#include <mach/mig.h>
35#include <mach/mach_types.h>
36
37#ifdef __BeforeMigUserHeader
38__BeforeMigUserHeader
39#endif /* __BeforeMigUserHeader */
40
41#include <sys/cdefs.h>
42__BEGIN_DECLS
43
44
45/* Routine host_security_create_task_token */
46#ifdefmig_external
47mig_external
48#else
49extern
50#endif/* mig_external */
51kern_return_t host_security_create_task_token
52(
53host_security_t host_security,
54task_t parent_task,
55security_token_t sec_token,
56audit_token_t audit_token,
57host_t host,
58ledger_array_t ledgers,
59mach_msg_type_number_t ledgersCnt,
60boolean_t inherit_memory,
61task_t *child_task
62);
63
64/* Routine host_security_set_task_token */
65#ifdefmig_external
66mig_external
67#else
68extern
69#endif/* mig_external */
70kern_return_t host_security_set_task_token
71(
72host_security_t host_security,
73task_t target_task,
74security_token_t sec_token,
75audit_token_t audit_token,
76host_t host
77);
78
79__END_DECLS
80
81/********************** Caution **************************/
82/* The following data types should be used to calculate */
83/* maximum message sizes only. The actual message may be */
84/* smaller, and the position of the arguments within the */
85/* message layout may vary from what is presented here. */
86/* For example, if any of the arguments are variable- */
87/* sized, and less than the maximum is sent, the data */
88/* will be packed tight in the actual message to reduce */
89/* the presence of holes. */
90/********************** Caution **************************/
91
92/* typedefs for all requests */
93
94#ifndef __Request__host_security_subsystem__defined
95#define __Request__host_security_subsystem__defined
96
97#ifdef __MigPackStructs
98#pragma pack(4)
99#endif
100typedef struct {
101mach_msg_header_t Head;
102/* start of the kernel processed data */
103mach_msg_body_t msgh_body;
104mach_msg_port_descriptor_t parent_task;
105mach_msg_port_descriptor_t host;
106mach_msg_ool_ports_descriptor_t ledgers;
107/* end of the kernel processed data */
108NDR_record_t NDR;
109security_token_t sec_token;
110audit_token_t audit_token;
111mach_msg_type_number_t ledgersCnt;
112boolean_t inherit_memory;
113} __Request__host_security_create_task_token_t;
114#ifdef __MigPackStructs
115#pragma pack()
116#endif
117
118#ifdef __MigPackStructs
119#pragma pack(4)
120#endif
121typedef struct {
122mach_msg_header_t Head;
123/* start of the kernel processed data */
124mach_msg_body_t msgh_body;
125mach_msg_port_descriptor_t target_task;
126mach_msg_port_descriptor_t host;
127/* end of the kernel processed data */
128NDR_record_t NDR;
129security_token_t sec_token;
130audit_token_t audit_token;
131} __Request__host_security_set_task_token_t;
132#ifdef __MigPackStructs
133#pragma pack()
134#endif
135#endif /* !__Request__host_security_subsystem__defined */
136
137/* union of all requests */
138
139#ifndef __RequestUnion__host_security_subsystem__defined
140#define __RequestUnion__host_security_subsystem__defined
141union __RequestUnion__host_security_subsystem {
142__Request__host_security_create_task_token_t Request_host_security_create_task_token;
143__Request__host_security_set_task_token_t Request_host_security_set_task_token;
144};
145#endif /* !__RequestUnion__host_security_subsystem__defined */
146/* typedefs for all replies */
147
148#ifndef __Reply__host_security_subsystem__defined
149#define __Reply__host_security_subsystem__defined
150
151#ifdef __MigPackStructs
152#pragma pack(4)
153#endif
154typedef struct {
155mach_msg_header_t Head;
156/* start of the kernel processed data */
157mach_msg_body_t msgh_body;
158mach_msg_port_descriptor_t child_task;
159/* end of the kernel processed data */
160} __Reply__host_security_create_task_token_t;
161#ifdef __MigPackStructs
162#pragma pack()
163#endif
164
165#ifdef __MigPackStructs
166#pragma pack(4)
167#endif
168typedef struct {
169mach_msg_header_t Head;
170NDR_record_t NDR;
171kern_return_t RetCode;
172} __Reply__host_security_set_task_token_t;
173#ifdef __MigPackStructs
174#pragma pack()
175#endif
176#endif /* !__Reply__host_security_subsystem__defined */
177
178/* union of all replies */
179
180#ifndef __ReplyUnion__host_security_subsystem__defined
181#define __ReplyUnion__host_security_subsystem__defined
182union __ReplyUnion__host_security_subsystem {
183__Reply__host_security_create_task_token_t Reply_host_security_create_task_token;
184__Reply__host_security_set_task_token_t Reply_host_security_set_task_token;
185};
186#endif /* !__RequestUnion__host_security_subsystem__defined */
187
188#ifndef subsystem_to_name_map_host_security
189#define subsystem_to_name_map_host_security \
190 { "host_security_create_task_token", 600 },\
191 { "host_security_set_task_token", 601 }
192#endif
193
194#ifdef __AfterMigUserHeader
195__AfterMigUserHeader
196#endif /* __AfterMigUserHeader */
197
198#endif /* _host_security_user_ */
199

Archive Download this file

Revision: 2182