]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCNetworkConfigurationInternal.h
0a3f2dd39b1c418e18f889f1d1fa8a4e831f0777
[apple/configd.git] / SystemConfiguration.fproj / SCNetworkConfigurationInternal.h
1 /*
2 * Copyright (c) 2004, 2005 Apple Computer, 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 #ifndef _SCNETWORKCONFIGURATIONINTERNAL_H
25 #define _SCNETWORKCONFIGURATIONINTERNAL_H
26
27
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>
34
35 #include "SCNetworkConfiguration.h"
36
37 typedef struct {
38
39 /* base CFType information */
40 CFRuntimeBase cfBase;
41
42 /* set id */
43 CFStringRef setID;
44
45 /* prefs */
46 SCPreferencesRef prefs;
47
48 } SCNetworkSetPrivate, *SCNetworkSetPrivateRef;
49
50
51 typedef struct {
52
53 /* base CFType information */
54 CFRuntimeBase cfBase;
55
56 /* service id */
57 CFStringRef serviceID;
58
59 /* interface */
60 SCNetworkInterfaceRef interface;
61
62 /* prefs */
63 SCPreferencesRef prefs;
64
65 } SCNetworkServicePrivate, *SCNetworkServicePrivateRef;
66
67
68 typedef struct {
69
70 /* base CFType information */
71 CFRuntimeBase cfBase;
72
73 /* entity id */
74 CFStringRef entityID;
75
76 /* service */
77 SCNetworkServiceRef service;
78
79 } SCNetworkProtocolPrivate, *SCNetworkProtocolPrivateRef;
80
81
82 typedef struct {
83
84 // base CFType information
85 CFRuntimeBase cfBase;
86
87 // interface information
88 CFStringRef interface_type; // interface type
89
90 // localized name
91 CFStringRef localized_name; // localized [display] name
92 CFStringRef localized_key;
93 CFStringRef localized_arg1;
94 CFStringRef localized_arg2;
95
96 /* [layered] interface*/
97 SCNetworkInterfaceRef interface;
98
99 /* service (NULL if not associated with a service) */
100 SCNetworkServiceRef service;
101
102 /* unsaved configuration (when prefs not [yet] available) */
103 CFDictionaryRef unsaved;
104
105 // [SCPreferences] interface entity information
106 CFStringRef entity_device; // interface device
107 CFStringRef entity_type; // interface type
108 CFStringRef entity_subtype; // interface subtype
109
110 // configuration information
111 CFMutableArrayRef supported_interface_types;
112 CFMutableArrayRef supported_protocol_types;
113
114 // IORegistry (service plane) information
115 CFStringRef address;
116 Boolean builtin;
117 CFStringRef location;
118 CFStringRef path;
119 CFStringRef modemCCL;
120 Boolean modemIsV92;
121 Boolean supportsBond;
122 Boolean supportsVLAN;
123
124 // misc
125 int sort_order; // sort order for this interface
126
127 } SCNetworkInterfacePrivate, *SCNetworkInterfacePrivateRef;
128
129
130 __BEGIN_DECLS
131
132
133 SCNetworkServicePrivateRef
134 __SCNetworkServiceCreatePrivate (CFAllocatorRef allocator,
135 CFStringRef serviceID,
136 SCNetworkInterfaceRef interface,
137 SCPreferencesRef prefs);
138
139
140 SCNetworkProtocolPrivateRef
141 __SCNetworkProtocolCreatePrivate (CFAllocatorRef allocator,
142 CFStringRef entityID,
143 SCNetworkServiceRef service);
144
145 Boolean
146 __SCNetworkProtocolIsValidType (CFStringRef protocolType);
147
148 SCNetworkInterfacePrivateRef
149 __SCNetworkInterfaceCreateCopy (CFAllocatorRef allocator,
150 SCNetworkInterfaceRef interface,
151 SCNetworkServiceRef service);
152
153 SCNetworkInterfacePrivateRef
154 __SCNetworkInterfaceCreatePrivate (CFAllocatorRef allocator,
155 SCNetworkInterfaceRef interface,
156 SCNetworkServiceRef service,
157 io_string_t path);
158
159 CFDictionaryRef
160 __SCNetworkInterfaceCopyInterfaceEntity (SCNetworkInterfaceRef interface);
161
162 SCNetworkInterfaceRef
163 __SCNetworkInterfaceCreateWithEntity (CFAllocatorRef allocator,
164 CFDictionaryRef interface_entity,
165 SCNetworkServiceRef service);
166
167 CFArrayRef
168 __SCNetworkInterfaceCopyDeepConfiguration (SCNetworkInterfaceRef interface);
169
170 CFStringRef
171 __SCNetworkInterfaceGetModemCCL (SCNetworkInterfaceRef interface);
172
173 Boolean
174 __SCNetworkInterfaceIsModemV92 (SCNetworkInterfaceRef interface);
175
176 Boolean
177 __SCNetworkInterfaceSetConfiguration (SCNetworkInterfaceRef interface,
178 CFDictionaryRef config,
179 Boolean okToHold);
180
181 void
182 __SCNetworkInterfaceSetDeepConfiguration (SCNetworkInterfaceRef interface,
183 CFArrayRef configs);
184
185 CFDictionaryRef
186 __copyInterfaceTemplate (CFStringRef interfaceType,
187 CFStringRef childInterfaceType);
188
189 CFDictionaryRef
190 __copyProtocolTemplate (CFStringRef interfaceType,
191 CFStringRef childInterfaceType,
192 CFStringRef protocolType);
193
194 CFDictionaryRef
195 __getPrefsConfiguration (SCPreferencesRef prefs,
196 CFStringRef path);
197
198 Boolean
199 __setPrefsConfiguration (SCPreferencesRef prefs,
200 CFStringRef path,
201 CFDictionaryRef config,
202 Boolean keepInactive);
203
204 Boolean
205 __getPrefsEnabled (SCPreferencesRef prefs,
206 CFStringRef path);
207
208 Boolean
209 __setPrefsEnabled (SCPreferencesRef prefs,
210 CFStringRef path,
211 Boolean enabled);
212
213 Boolean
214 __createInterface (int s,
215 CFStringRef interface);
216
217 Boolean
218 __destroyInterface (int s,
219 CFStringRef interface);
220
221 Boolean
222 __markInterfaceUp (int s,
223 CFStringRef interface);
224
225 __END_DECLS
226
227 #endif /* _SCNETWORKCONFIGURATIONINTERNAL_H */