2 * Copyright (c) 2004, 2005 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
24 #ifndef _SCNETWORKCONFIGURATIONINTERNAL_H
25 #define _SCNETWORKCONFIGURATIONINTERNAL_H
28 #include <sys/cdefs.h>
29 #include <CoreFoundation/CoreFoundation.h>
30 #include <CoreFoundation/CFRuntime.h>
31 #include <SystemConfiguration/SystemConfiguration.h>
32 #include <SystemConfiguration/SCPreferencesPathKey.h>
33 #include <IOKit/IOKitLib.h>
35 #include "SCNetworkConfiguration.h"
39 /* base CFType information */
46 SCPreferencesRef prefs
;
48 } SCNetworkSetPrivate
, *SCNetworkSetPrivateRef
;
53 /* base CFType information */
57 CFStringRef serviceID
;
60 SCNetworkInterfaceRef interface
;
63 SCPreferencesRef prefs
;
65 } SCNetworkServicePrivate
, *SCNetworkServicePrivateRef
;
70 /* base CFType information */
77 SCNetworkServiceRef service
;
79 } SCNetworkProtocolPrivate
, *SCNetworkProtocolPrivateRef
;
84 // base CFType information
87 // interface information
88 CFStringRef interface_type
; // interface type
91 CFStringRef localized_name
; // localized [display] name
92 CFStringRef localized_key
;
93 CFStringRef localized_arg1
;
94 CFStringRef localized_arg2
;
96 /* [layered] interface*/
97 SCNetworkInterfaceRef interface
;
99 /* service (NULL if not associated with a service) */
100 SCNetworkServiceRef service
;
102 /* unsaved configuration (when prefs not [yet] available) */
103 CFDictionaryRef unsaved
;
105 // [SCPreferences] interface entity information
106 CFStringRef entity_device
; // interface device
107 CFStringRef entity_type
; // interface type
108 CFStringRef entity_subtype
; // interface subtype
110 // configuration information
111 CFMutableArrayRef supported_interface_types
;
112 CFMutableArrayRef supported_protocol_types
;
114 // IORegistry (service plane) information
117 CFStringRef location
;
119 CFStringRef modemCCL
;
121 Boolean supportsBond
;
122 Boolean supportsVLAN
;
125 int sort_order
; // sort order for this interface
127 } SCNetworkInterfacePrivate
, *SCNetworkInterfacePrivateRef
;
133 SCNetworkServicePrivateRef
134 __SCNetworkServiceCreatePrivate (CFAllocatorRef allocator
,
135 CFStringRef serviceID
,
136 SCNetworkInterfaceRef interface
,
137 SCPreferencesRef prefs
);
140 SCNetworkProtocolPrivateRef
141 __SCNetworkProtocolCreatePrivate (CFAllocatorRef allocator
,
142 CFStringRef entityID
,
143 SCNetworkServiceRef service
);
146 __SCNetworkProtocolIsValidType (CFStringRef protocolType
);
148 SCNetworkInterfacePrivateRef
149 __SCNetworkInterfaceCreateCopy (CFAllocatorRef allocator
,
150 SCNetworkInterfaceRef interface
,
151 SCNetworkServiceRef service
);
153 SCNetworkInterfacePrivateRef
154 __SCNetworkInterfaceCreatePrivate (CFAllocatorRef allocator
,
155 SCNetworkInterfaceRef interface
,
156 SCNetworkServiceRef service
,
160 __SCNetworkInterfaceCopyInterfaceEntity (SCNetworkInterfaceRef interface
);
162 SCNetworkInterfaceRef
163 __SCNetworkInterfaceCreateWithEntity (CFAllocatorRef allocator
,
164 CFDictionaryRef interface_entity
,
165 SCNetworkServiceRef service
);
168 __SCNetworkInterfaceCopyDeepConfiguration (SCNetworkInterfaceRef interface
);
171 __SCNetworkInterfaceGetModemCCL (SCNetworkInterfaceRef interface
);
174 __SCNetworkInterfaceIsModemV92 (SCNetworkInterfaceRef interface
);
177 __SCNetworkInterfaceSetConfiguration (SCNetworkInterfaceRef interface
,
178 CFDictionaryRef config
,
182 __SCNetworkInterfaceSetDeepConfiguration (SCNetworkInterfaceRef interface
,
186 __copyInterfaceTemplate (CFStringRef interfaceType
,
187 CFStringRef childInterfaceType
);
190 __copyProtocolTemplate (CFStringRef interfaceType
,
191 CFStringRef childInterfaceType
,
192 CFStringRef protocolType
);
195 __getPrefsConfiguration (SCPreferencesRef prefs
,
199 __setPrefsConfiguration (SCPreferencesRef prefs
,
201 CFDictionaryRef config
,
202 Boolean keepInactive
);
205 __getPrefsEnabled (SCPreferencesRef prefs
,
209 __setPrefsEnabled (SCPreferencesRef prefs
,
214 __createInterface (int s
,
215 CFStringRef interface
);
218 __destroyInterface (int s
,
219 CFStringRef interface
);
222 __markInterfaceUp (int s
,
223 CFStringRef interface
);
227 #endif /* _SCNETWORKCONFIGURATIONINTERNAL_H */