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