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