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