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#ifndef _S_CONTROLLER_H 26#define _S_CONTROLLER_H 27 28#include <sys/types.h> 29#include <sys/queue.h> 30#include <mach/mach.h> 31#include <CoreFoundation/CFDictionary.h> 32#include <CoreFoundation/CFString.h> 33#include <TargetConditionals.h> 34 35#include "eapolcontroller_types.h" 36 37int 38ControllerCopyStateAndStatus(if_name_t if_name, 39 int * state, 40 CFDictionaryRef * status_dict); 41 42int 43ControllerGetState(if_name_t if_name, int * state); 44 45int 46ControllerStart(if_name_t if_name, uid_t uid, gid_t gid, 47 CFDictionaryRef config_dict, mach_port_t bootstrap, 48 mach_port_t au_session); 49 50int 51ControllerStartSystem(if_name_t if_name, uid_t uid, gid_t gid, 52 CFDictionaryRef options); 53 54int 55ControllerUpdate(if_name_t if_name, uid_t uid, gid_t gid, 56 CFDictionaryRef config_dict); 57 58int 59ControllerProvideUserInput(if_name_t if_name, uid_t uid, gid_t gid, 60 CFDictionaryRef user_input_dict); 61 62int 63ControllerRetry(if_name_t if_name, uid_t uid, gid_t gid); 64 65int 66ControllerStop(if_name_t if_name, uid_t uid, gid_t gid); 67 68#if ! TARGET_OS_EMBEDDED 69int 70ControllerCopyLoginWindowConfiguration(if_name_t if_name, 71 CFDictionaryRef * config_data_p); 72int 73ControllerCopyAutoDetectInformation(CFDictionaryRef * info_p); 74 75boolean_t 76ControllerDidUserCancel(if_name_t if_name); 77 78#endif /* ! TARGET_OS_EMBEDDED */ 79 80int 81ControllerClientAttach(pid_t pid, if_name_t if_name, 82 mach_port_t notify_port, 83 mach_port_t * session_port, 84 CFDictionaryRef * control_dict, 85 mach_port_t * bootstrap, 86 mach_port_t * au_session); 87 88int 89ControllerClientDetach(mach_port_t session_port); 90 91int 92ControllerClientGetConfig(mach_port_t session_port, 93 CFDictionaryRef * control_dict); 94 95int 96ControllerClientReportStatus(mach_port_t session_port, 97 CFDictionaryRef status_dict); 98 99int 100ControllerClientForceRenew(mach_port_t session_port); 101 102int 103ControllerClientPortDead(mach_port_t session_port); 104 105#if ! TARGET_OS_EMBEDDED 106 107int 108ControllerClientUserCancelled(mach_port_t session_port); 109 110#endif /* ! TARGET_OS_EMBEDDED */ 111 112#endif /* _S_CONTROLLER_H */ 113