]> git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/LinkConfiguration.h
configd-84.1.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 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25
26
27 #ifndef _LINKCONFIGURATION_H
28 #define _LINKCONFIGURATION_H
29
30 #include <sys/cdefs.h>
31 #include <CoreFoundation/CoreFoundation.h>
32
33
34 __BEGIN_DECLS
35
36 /*!
37 @function NetworkInterfaceCopyMediaOptions
38 @discussion For the specified network interface, returns information
39 about the currently requested media options, the active media
40 options, and the media options which are available.
41 @param interface The desired network interface.
42 @param current A pointer to memory that will be filled with a CFDictionaryRef
43 representing the currently requested media options (subtype, options).
44 If NULL, the current options will not be returned.
45 @param active A pointer to memory that will be filled with a CFDictionaryRef
46 representing the active media options (subtype, options).
47 If NULL, the active options will not be returned.
48 @param available A pointer to memory that will be filled with a CFArrayRef
49 representing the possible media options (subtype, options).
50 If NULL, the available options will not be returned.
51 @param filter A boolean indicating whether the available options should be
52 filtered to exclude those options which would not normally be
53 requested by a user/admin (e.g. hw-loopback).
54 @result TRUE if requested information has been returned.
55
56 */
57 Boolean
58 NetworkInterfaceCopyMediaOptions(
59 CFStringRef interface,
60 CFDictionaryRef *current,
61 CFDictionaryRef *active,
62 CFArrayRef *available,
63 Boolean filter
64 );
65
66 /*!
67 @function NetworkInterfaceCopyMediaSubTypes
68 @discussion For the provided interface configuration options, return a list
69 of available media subtypes.
70 @param available The available options as returned by the
71 NetworkInterfaceCopyMediaOptions function.
72 @result An array of available media subtypes CFString's (e.g. 10BaseT/UTP,
73 100baseTX, etc). NULL if no subtypes are available.
74 */
75 CFArrayRef
76 NetworkInterfaceCopyMediaSubTypes(
77 CFArrayRef available
78 );
79
80 /*!
81 @function NetworkInterfaceCopyMediaSubTypes
82 @discussion For the provided interface configuration options and specific
83 subtype, return a list of available media options.
84 @param available The available options as returned by the
85 NetworkInterfaceCopyMediaOptions function.
86 @param subType The subtype
87 @result An array of available media options. Each of the available options
88 is returned as an array of CFString's (e.g. <half-duplex>,
89 <full-duplex,flow-control>). NULL if no options are available.
90 */
91 CFArrayRef
92 NetworkInterfaceCopyMediaSubTypeOptions(
93 CFArrayRef available,
94 CFStringRef subType
95 );
96
97 /*!
98 @function NetworkInterfaceCopyMTU
99 @discussion
100 @param interface The desired network interface.
101 @param mtu_cur A pointer to memory that will be filled with the current
102 MTU setting for the interface.
103 @param mtu_min A pointer to memory that will be filled with the minimum
104 MTU setting for the interface. If negative, the minumum setting
105 could not be determined.
106 @param mtu_max A pointer to memory that will be filled with the maximum
107 MTU setting for the interface. If negative, the maximum setting
108 could not be determined.
109 @result TRUE if requested information has been returned.
110
111 */
112 Boolean
113 NetworkInterfaceCopyMTU(
114 CFStringRef interface,
115 int *mtu_cur,
116 int *mtu_min,
117 int *mtu_max
118 );
119
120
121 __END_DECLS
122
123 #endif /* _LINKCONFIGURATION_H */
124