1/*
2 * Copyright (c) 2002-2013 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24/*
25 * Modification History
26 *
27 * October 16, 2002		Dieter Siegmund (dieter@apple.com)
28 * - initial revision
29 */
30
31#include <mach/std_types.defs>
32#include <mach/mach_types.defs>
33#include <TargetConditionals.h>
34
35subsystem eapolcontroller 22000;
36
37import "eapolcontroller_types.h";
38
39/*
40 * serialized XML data (client->server)
41 */
42type xmlData    = ^ array [] of MACH_MSG_TYPE_BYTE
43	ctype : xmlData_t;
44
45/*
46 * serialized XML data (server->client)
47 */
48type xmlDataOut = ^ array [] of MACH_MSG_TYPE_BYTE
49	ctype : xmlDataOut_t;
50
51type if_name = array[32] of char
52	ctype : if_name_t;
53
54/*
55 * routines called by UI/control to start/stop/update an 802.1X client process
56 */
57routine eapolcontroller_get_state (	server		: mach_port_t;
58					if_name		: if_name;
59				 out	state		: int;
60				 out	result		: int);
61
62routine eapolcontroller_start	(	server		: mach_port_t;
63					if_name		: if_name;
64					config_data	: xmlData;
65					bootstrap	: bootstrap_t;
66					au_session	: mach_port_t;
67				 out	result		: int);
68
69routine eapolcontroller_stop	(	server		: mach_port_t;
70					if_name		: if_name;
71				 out	result		: int);
72
73routine eapolcontroller_update	(	server		: mach_port_t;
74					if_name		: if_name;
75					config_data	: xmlData;
76				 out	result		: int);
77
78routine eapolcontroller_retry	(	server		: mach_port_t;
79					if_name		: if_name;
80				 out	result		: int);
81
82routine eapolcontroller_copy_status (	server		: mach_port_t;
83					if_name		: if_name;
84				 out	status_data	: xmlDataOut, dealloc;
85				 out	state		: int;
86				 out	result		: int);
87
88skip;
89
90routine eapolcontroller_provide_user_input (	server	: mach_port_t;
91					if_name		: if_name;
92					user_input	: xmlData;
93				 out	result		: int);
94
95#if ! TARGET_OS_EMBEDDED
96
97routine eapolcontroller_start_system	(	server	: mach_port_t;
98					if_name		: if_name;
99					options_data	: xmlData;
100				 out	result		: int);
101
102routine eapolcontroller_copy_loginwindow_config ( server : mach_port_t;
103     					if_name		: if_name;
104				 out	config		: xmlDataOut, dealloc;
105				 out	result		: int);
106#else /* ! TARGET_OS_EMBEDDED */
107
108skip;
109
110skip;
111
112#endif /* ! TARGET_OS_EMBEDDED */
113
114/*
115 * routines called by the 802.1X client process
116 */
117routine eapolcontroller_client_attach (	server		: mach_port_t;
118					task		: task_t;
119					if_name		: if_name;
120					port		: mach_port_move_send_t;
121				 out	session		: mach_port_move_send_t;
122				 out    control_data	: xmlDataOut, dealloc;
123				 out	bootstrap	: bootstrap_t;
124				 out	au_session	: mach_port_t;
125				 out	result		: int);
126
127/*
128 * the client must talk to the server using the session port
129 * returned by attach with the following routines
130 */
131routine eapolcontroller_client_detach (	server		: mach_port_t;
132				 out	result		: int);
133
134routine eapolcontroller_client_getconfig (server	: mach_port_t;
135				 out      control_data	: xmlDataOut, dealloc;
136				 out	  result	: int);
137
138routine eapolcontroller_client_report_status(server	: mach_port_t;
139					status_data	: xmlData;
140				 out	result		: int);
141
142routine eapolcontroller_client_force_renew(server	: mach_port_t;
143				 out	result		: int);
144
145#if ! TARGET_OS_EMBEDDED
146routine eapolcontroller_client_user_cancelled(server	: mach_port_t;
147				 out	result		: int);
148skip;
149skip;
150skip;
151skip;
152skip;
153skip;
154skip;
155skip;
156skip;
157skip;
158
159/*
160 * More routines called by UI/control.
161 */
162routine eapolcontroller_copy_autodetect_info	( server : mach_port_t;
163				 out	info		: xmlDataOut, dealloc;
164				 out	result		: int);
165
166routine eapolcontroller_did_user_cancel(server	: mach_port_t;
167     				if_name		: if_name;
168			 out	user_cancelled	: boolean_t);
169#endif /* ! TARGET_OS_EMBEDDED */
170
171