3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 UEFI Dynamic Host Configuration Protocol 4 Definition
25 #include EFI_PROTOCOL_DEFINITION (ServiceBinding)
26 #include EFI_PROTOCOL_DEFINITION (Udp4)
29 #define EFI_DHCP4_PROTOCOL_GUID \
30 {0x8a219718, 0x4ef5, 0x4761, 0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56}
32 #define EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID \
33 {0x9d9a39d8, 0xbd42, 0x4a73, 0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80}
35 extern EFI_GUID gEfiDhcp4ProtocolGuid
;
36 extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid
;
38 EFI_FORWARD_DECLARATION (EFI_DHCP4_PROTOCOL
);
45 } EFI_DHCP4_PACKET_OPTION
;
55 EFI_IPv4_ADDRESS ClientAddr
;
56 EFI_IPv4_ADDRESS YourAddr
;
57 EFI_IPv4_ADDRESS ServerAddr
;
58 EFI_IPv4_ADDRESS GwAddr
;
59 UINT8 ClientHwAddr
[16];
61 CHAR8 BootFileName
[128];
68 EFI_DHCP4_HEADER Header
;
79 Dhcp4Requesting
= 0x3,
83 Dhcp4InitReboot
= 0x7,
88 Dhcp4SendDiscover
= 0x01,
89 Dhcp4RcvdOffer
= 0x02,
90 Dhcp4SelectOffer
= 0x03,
91 Dhcp4SendRequest
= 0x04,
94 Dhcp4SendDecline
= 0x07,
95 Dhcp4BoundCompleted
= 0x08,
96 Dhcp4EnterRenewing
= 0x09,
97 Dhcp4EnterRebinding
= 0x0a,
98 Dhcp4AddressLost
= 0x0b,
102 typedef EFI_STATUS (*EFI_DHCP4_CALLBACK
) (
103 IN EFI_DHCP4_PROTOCOL
*This
,
105 IN EFI_DHCP4_STATE CurrentState
,
106 IN EFI_DHCP4_EVENT Dhcp4Event
,
107 IN EFI_DHCP4_PACKET
*Packet OPTIONAL
,
108 OUT EFI_DHCP4_PACKET
**NewPacket OPTIONAL
112 UINT32 DiscoverTryCount
;
113 UINT32
*DiscoverTimeout
;
114 UINT32 RequestTryCount
;
115 UINT32
*RequestTimeout
;
116 EFI_IPv4_ADDRESS ClientAddress
;
117 EFI_DHCP4_CALLBACK Dhcp4Callback
;
118 VOID
*CallbackContext
;
120 EFI_DHCP4_PACKET_OPTION
**OptionList
;
121 }EFI_DHCP4_CONFIG_DATA
;
124 EFI_DHCP4_STATE State
;
125 EFI_DHCP4_CONFIG_DATA ConfigData
;
126 EFI_IPv4_ADDRESS ClientAddress
;
127 EFI_MAC_ADDRESS ClientMacAddress
;
128 EFI_IPv4_ADDRESS ServerAddress
;
129 EFI_IPv4_ADDRESS RouterAddress
;
130 EFI_IPv4_ADDRESS SubnetMask
;
132 EFI_DHCP4_PACKET
*ReplyPacket
;
133 } EFI_DHCP4_MODE_DATA
;
136 EFI_IPv4_ADDRESS ListenAddress
;
137 EFI_IPv4_ADDRESS SubnetMask
;
139 } EFI_DHCP4_LISTEN_POINT
;
143 EFI_EVENT CompletionEvent
;
144 EFI_IPv4_ADDRESS RemoteAddress
;
146 EFI_IPv4_ADDRESS GatewayAddress
;
147 UINT32 ListenPointCount
;
148 EFI_DHCP4_LISTEN_POINT
*ListenPoints
;
150 EFI_DHCP4_PACKET
*Packet
;
151 UINT32 ResponseCount
;
152 EFI_DHCP4_PACKET
*ResponseList
;
153 } EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN
;
157 (EFIAPI
*EFI_DHCP4_GET_MODE_DATA
) (
158 IN EFI_DHCP4_PROTOCOL
*This
,
159 OUT EFI_DHCP4_MODE_DATA
*Dhcp4ModeData
164 (EFIAPI
*EFI_DHCP4_CONFIGURE
) (
165 IN EFI_DHCP4_PROTOCOL
*This
,
166 IN EFI_DHCP4_CONFIG_DATA
*Dhcp4CfgData OPTIONAL
171 (EFIAPI
*EFI_DHCP4_START
) (
172 IN EFI_DHCP4_PROTOCOL
*This
,
173 IN EFI_EVENT CompletionEvent OPTIONAL
178 (EFIAPI
*EFI_DHCP4_RENEW_REBIND
) (
179 IN EFI_DHCP4_PROTOCOL
*This
,
180 IN BOOLEAN RebindRequest
,
181 IN EFI_EVENT CompletionEvent OPTIONAL
186 (EFIAPI
*EFI_DHCP4_RELEASE
) (
187 IN EFI_DHCP4_PROTOCOL
*This
191 (EFIAPI
*EFI_DHCP4_STOP
) (
192 IN EFI_DHCP4_PROTOCOL
*This
197 (EFIAPI
*EFI_DHCP4_BUILD
) (
198 IN EFI_DHCP4_PROTOCOL
*This
,
199 IN EFI_DHCP4_PACKET
*SeedPacket
,
200 IN UINT32 DeleteCount
,
201 IN UINT8
*DeleteList OPTIONAL
,
202 IN UINT32 AppendCount
,
203 IN EFI_DHCP4_PACKET_OPTION
*AppendList
[] OPTIONAL
,
204 OUT EFI_DHCP4_PACKET
**NewPacket
209 (EFIAPI
*EFI_DHCP4_TRANSMIT_RECEIVE
) (
210 IN EFI_DHCP4_PROTOCOL
*This
,
211 IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN
*Token
216 (EFIAPI
*EFI_DHCP4_PARSE
) (
217 IN EFI_DHCP4_PROTOCOL
*This
,
218 IN EFI_DHCP4_PACKET
*Packet
,
219 IN OUT UINT32
*OptionCount
,
220 OUT EFI_DHCP4_PACKET_OPTION
*PacketOptionList
[] OPTIONAL
223 struct _EFI_DHCP4_PROTOCOL
{
224 EFI_DHCP4_GET_MODE_DATA GetModeData
;
225 EFI_DHCP4_CONFIGURE Configure
;
226 EFI_DHCP4_START Start
;
227 EFI_DHCP4_RENEW_REBIND RenewRebind
;
228 EFI_DHCP4_RELEASE Release
;
230 EFI_DHCP4_BUILD Build
;
231 EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive
;
232 EFI_DHCP4_PARSE Parse
;