1/*
2 * Copyright (c) 2000-2014 Apple 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 * DHCPServer.h
26 */
27/*
28 * Modification History
29 *
30 * November 10, 2000 	Dieter Siegmund (dieter@apple.com)
31 * - initial revision
32 */
33#ifndef _S_DHCPSERVER_H
34#define _S_DHCPSERVER_H
35#include <TargetConditionals.h>
36#include <CoreFoundation/CoreFoundation.h>
37
38/**
39 ** DHCP and NetBoot properties
40 **/
41extern const CFStringRef	kDHCPSPropIdentifier;
42extern const CFStringRef	kDHCPSPropName;
43
44/**
45 ** DHCP lease dictionary properties
46 **/
47extern const CFStringRef	kDHCPSPropDHCPLease;
48extern const CFStringRef	kDHCPSPropDHCPIPAddress;
49extern const CFStringRef	kDHCPSPropDHCPHWAddress;
50
51#if ! TARGET_OS_EMBEDDED
52
53/**
54 ** NetBoot client dictionary properties
55 **/
56
57extern const CFStringRef	kDHCPSPropNetBootArch;
58extern const CFStringRef	kDHCPSPropNetBootSysid;
59extern const CFStringRef	kDHCPSPropNetBootLastBootTime;
60extern const CFStringRef	kDHCPSPropNetBootIPAddress;
61
62/*
63 * Key: kDHCPSPropNetBootImageIndex, kDHCPSPropNetBootImageKind,
64 *      kDHCPSPropNetBootImageIsInstall
65 * Purpose:
66 *   Gives the image index, kind, and install attributes of the image that
67 *   the client is bound to.
68 * Notes:
69 *   kDHCPSPropNetBootImageIndex        CFNumber (1..65535)
70 *   kDHCPSPropNetBootImageKind         CFNumber
71 *                                       0 = Classic/Mac OS 9,
72 *                                       1 = Mac OS X, 2 = Mac OS X Server,
73 *                                       3 = Diagnostics
74 *   kDHCPSPropNetBootImageIsInstall    CFBoolean
75 */
76extern const CFStringRef	kDHCPSPropNetBootImageIndex;
77extern const CFStringRef	kDHCPSPropNetBootImageKind;
78extern const CFStringRef	kDHCPSPropNetBootImageIsInstall;
79
80/*
81 * Key: kDHCPSPropNetBootImageID (deprecated)
82 * Purpose:
83 *   Gives a string representation of the 32-bit boot image ID, consisting
84 *   of the index, kind, and install attributes.
85 * Notes:
86 *   This attribute is deprecated in favor of kDHCPSPropNetBootImageIndex,
87 *   kDHCPSPropNetBootImageKind, and kDHCPSPropNetBootImageIsInstall defined
88 *   above.
89 */
90extern const CFStringRef	kDHCPSPropNetBootImageID;
91#endif /* ! TARGET_OS_EMBEDDED */
92
93/*
94 * Function: DHCPSDHCPLeaseListCreate
95 * Purpose:
96 *   Returns an array of DHCP lease dictionaries, NULL if none
97 *   available.
98 * Note:
99 *   Returned array must be released using CFRelease().
100 */
101extern CFArrayRef		DHCPSDHCPLeaseListCreate(void);
102
103
104/*
105 * Const: DHCPSDHCPLeaseListNotificationKey
106 * Purpose:
107 *   Use with notify(3) to be notified when the DHCP lease list
108 *   adds or removes a client binding.
109 */
110extern const char * 		DHCPSDHCPLeaseListNotificationKey;
111
112/*
113 * Function: DHCPSCopyDisabledInterfaces
114 * Purpose:
115 *   Retrieve the list of interfaces on which DHCP has been disabled.
116 *   The DHCP server can be configured to detect the presence of another
117 *   DHCP server on a link and disable DHCP on that link when another DHCP
118 *   server is detected.
119 *
120 * Returns:
121 *   NULL if DHCP hasn't been disabled on any interface,
122 *   non-NULL array of string interface names otherwise.
123 */
124extern CFArrayRef		DHCPSCopyDisabledInterfaces(void);
125
126/*
127 * Const: DHCPSDisabledInterfacesNotificationKey
128 * Purpose:
129 *   Use with notify(3) to be notified when the list of disabled
130 *   interfaces changes. Use DHCPSCopyDisabledInterfaces() to retrieve
131 *   the current list.
132 */
133extern const char *		DHCPSDisabledInterfacesNotificationKey;
134
135#if ! TARGET_OS_EMBEDDED
136/*
137 * Function: DHCPSNetBootClientListCreate
138 * Purpose:
139 *   Returns an array of NetBoot client dictionaries, NULL if none
140 *   available.
141 * Note:
142 *   Returned array must be released using CFRelease().
143 */
144extern CFArrayRef		DHCPSNetBootClientListCreate(void);
145#endif /* ! TARGET_OS_EMBEDDED */
146
147#endif /* _S_DHCPSERVER_H */
148