]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/LinkConfiguration.h
configd-395.11.tar.gz
[apple/configd.git] / SystemConfiguration.fproj / LinkConfiguration.h
1 /*
2 * Copyright (c) 2002, 2004, 2006, 2008 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 _LINKCONFIGURATION_H
26 #define _LINKCONFIGURATION_H
27
28 #include <Availability.h>
29 #include <sys/cdefs.h>
30 #include <CoreFoundation/CoreFoundation.h>
31
32 /*!
33 @header LinkConfiguration
34 */
35
36 __BEGIN_DECLS
37
38 /*!
39 @function NetworkInterfaceCopyMediaOptions
40 @discussion For the specified network interface, returns information
41 about the currently requested media options, the active media
42 options, and the media options which are available.
43 @param interface The desired network interface.
44 @param current A pointer to memory that will be filled with a CFDictionaryRef
45 representing the currently requested media options (subtype, options).
46 If NULL, the current options will not be returned.
47 @param active A pointer to memory that will be filled with a CFDictionaryRef
48 representing the active media options (subtype, options).
49 If NULL, the active options will not be returned.
50 @param available A pointer to memory that will be filled with a CFArrayRef
51 representing the possible media options (subtype, options).
52 If NULL, the available options will not be returned.
53 @param filter A boolean indicating whether the available options should be
54 filtered to exclude those options which would not normally be
55 requested by a user/admin (e.g. hw-loopback).
56 @result TRUE if requested information has been returned.
57
58 */
59 Boolean
60 NetworkInterfaceCopyMediaOptions(
61 CFStringRef interface,
62 CFDictionaryRef *current,
63 CFDictionaryRef *active,
64 CFArrayRef *available,
65 Boolean filter
66 ) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA);
67
68 /*!
69 @function NetworkInterfaceCopyMediaSubTypes
70 @discussion For the provided interface configuration options, return a list
71 of available media subtypes.
72 @param available The available options as returned by the
73 NetworkInterfaceCopyMediaOptions function.
74 @result An array of available media subtypes CFString's (e.g. 10BaseT/UTP,
75 100baseTX, etc). NULL if no subtypes are available.
76 */
77 CFArrayRef
78 NetworkInterfaceCopyMediaSubTypes(
79 CFArrayRef available
80 ) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA);
81
82 /*!
83 @function NetworkInterfaceCopyMediaSubTypeOptions
84 @discussion For the provided interface configuration options and specific
85 subtype, return a list of available media options.
86 @param available The available options as returned by the
87 NetworkInterfaceCopyMediaOptions function.
88 @param subType The subtype
89 @result An array of available media options. Each of the available options
90 is returned as an array of CFString's (e.g. <half-duplex>,
91 <full-duplex,flow-control>). NULL if no options are available.
92 */
93 CFArrayRef
94 NetworkInterfaceCopyMediaSubTypeOptions(
95 CFArrayRef available,
96 CFStringRef subType
97 ) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA);
98
99 /*!
100 @function NetworkInterfaceCopyMTU
101 @discussion
102 @param interface The desired network interface.
103 @param mtu_cur A pointer to memory that will be filled with the current
104 MTU setting for the interface.
105 @param mtu_min A pointer to memory that will be filled with the minimum
106 MTU setting for the interface. If negative, the minimum setting
107 could not be determined.
108 @param mtu_max A pointer to memory that will be filled with the maximum
109 MTU setting for the interface. If negative, the maximum setting
110 could not be determined.
111 @result TRUE if requested information has been returned.
112
113 */
114 Boolean
115 NetworkInterfaceCopyMTU(
116 CFStringRef interface,
117 int *mtu_cur,
118 int *mtu_min,
119 int *mtu_max
120 ) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_5,__IPHONE_NA,__IPHONE_NA);
121
122
123 __END_DECLS
124
125 #endif /* _LINKCONFIGURATION_H */
126