]>
git.saurik.com Git - apple/configd.git/blob - SystemConfiguration.fproj/SCDynamicStoreCopyDHCPInfo.h
4eab51cd6da2f681f2cab3fb501586755948c4e9
2 * Copyright (c) 2001-2002 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
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
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.
23 * @APPLE_LICENSE_HEADER_END@
26 #ifndef _SCDYNAMICSTORECOPYDHCPINFO_H
27 #define _SCDYNAMICSTORECOPYDHCPINFO_H
29 #include <sys/cdefs.h>
30 #include <CoreFoundation/CoreFoundation.h>
31 #include <SystemConfiguration/SCDynamicStore.h>
35 @header SCDynamicStoreCopyDHCPInfo.h
36 The following APIs allow an application to retrieve DHCP/BOOTP
37 information, in particular DHCP/BOOTP options.
44 @function SCDynamicStoreCopyDHCPInfo
45 @discussion Copies the DHCP/BOOTP information dictionary for the
46 requested serviceID, or the primary service if
48 @param store An SCDynamicStoreRef that should be used for communication
50 If NULL, a temporary session will be used.
51 @param serviceID A CFStringRef containing the requested service.
52 If NULL, returns information for the primary service.
53 @result A dictionary containing DHCP/BOOTP information if successful,
55 Use the DHCPInfoGetOption() to retrieve
56 individual options from the returned dictionary.
58 A non-NULL return value must be released using CFRelease().
61 SCDynamicStoreCopyDHCPInfo(SCDynamicStoreRef store
, CFStringRef serviceID
);
64 @function DHCPInfoGetOptionData
65 @discussion Returns a non-NULL CFDataRef containing the BOOTP/DHCP
66 option data if present, NULL otherwise.
67 @param info The non-NULL DHCP information dictionary returned by
68 calling SCDynamicStoreCopyDHCPInfo.
69 @param code The DHCP/BOOTP option code (see RFC 2132) to return
71 @result A non-NULL CFDataRef containing the option data,
74 The return value must NOT be released.
77 DHCPInfoGetOptionData(CFDictionaryRef info
, UInt8 code
);
80 @function DHCPInfoGetLeaseStartTime
81 @discussion Returns a CFDateRef corresponding to the lease start time,
82 if present, NULL otherwise. A NULL return value is returned
83 if the configuration method is BOOTP.
84 @param info The non-NULL DHCP information dictionary returned by
85 calling SCDynamicStoreCopyDHCPInfo.
86 @result A non-NULL CFDateRef if present, NULL otherwise.
88 The return value must NOT be released.
91 DHCPInfoGetLeaseStartTime(CFDictionaryRef info
);
95 #endif /* _SCDYNAMICSTORECOPYDHCPINFO_H */