2 Dhcp6 internal functions declaration.
4 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef __EFI_DHCP6_IO_H__
17 #define __EFI_DHCP6_IO_H__
21 Clean up the specific nodes in the retry list.
23 @param[in] Instance The pointer to the Dhcp6 instance.
24 @param[in] Scope The scope of cleanup nodes.
29 IN DHCP6_INSTANCE
*Instance
,
34 Clean up the session of the instance stateful exchange.
36 @param[in, out] Instance The pointer to the Dhcp6 instance.
37 @param[in] Status The return status from udp.
42 IN OUT DHCP6_INSTANCE
*Instance
,
47 Create the solicit message and send it.
49 @param[in] Instance The pointer to Dhcp6 instance.
51 @retval EFI_SUCCESS Create and send the solicit message successfully.
52 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
53 @retval Others Failed to send the solicit message.
58 IN DHCP6_INSTANCE
*Instance
62 Create the request message and send it.
64 @param[in] Instance The pointer to the Dhcp6 instance.
66 @retval EFI_SUCCESS Create and send the request message successfully.
67 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
68 @retval EFI_DEVICE_ERROR An unexpected error.
69 @retval Others Failed to send the request message.
74 IN DHCP6_INSTANCE
*Instance
78 Create the renew/rebind message and send it.
80 @param[in] Instance The pointer to the Dhcp6 instance.
81 @param[in] RebindRequest If TRUE, it is a Rebind type message.
82 Otherwise, it is a Renew type message.
84 @retval EFI_SUCCESS Create and send the renew/rebind message successfully.
85 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
86 @retval EFI_DEVICE_ERROR An unexpected error.
87 @retval Others Failed to send the renew/rebind message.
91 Dhcp6SendRenewRebindMsg (
92 IN DHCP6_INSTANCE
*Instance
,
93 IN BOOLEAN RebindRequest
97 Create the decline message and send it.
99 @param[in] Instance The pointer to the Dhcp6 instance.
100 @param[in] DecIa The pointer to the decline Ia.
102 @retval EFI_SUCCESS Create and send the decline message successfully.
103 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
104 @retval EFI_DEVICE_ERROR An unexpected error.
105 @retval Others Failed to send the decline message.
109 Dhcp6SendDeclineMsg (
110 IN DHCP6_INSTANCE
*Instance
,
111 IN EFI_DHCP6_IA
*DecIa
115 Create the release message and send it.
117 @param[in] Instance The pointer to the Dhcp6 instance.
118 @param[in] RelIa The pointer to the release Ia.
120 @retval EFI_SUCCESS Create and send the release message successfully.
121 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
122 @retval EFI_DEVICE_ERROR An unexpected error.
123 @retval Others Failed to send the release message.
127 Dhcp6SendReleaseMsg (
128 IN DHCP6_INSTANCE
*Instance
,
129 IN EFI_DHCP6_IA
*RelIa
133 Start the information request process.
135 @param[in] Instance The pointer to the Dhcp6 instance.
136 @param[in] SendClientId If TRUE, the client identifier option will be included in
137 information request message. Otherwise, the client identifier
138 option will not be included.
139 @param[in] OptionRequest The pointer to the option request option.
140 @param[in] OptionCount The number options in the OptionList.
141 @param[in] OptionList The array pointers to the appended options.
142 @param[in] Retransmission The pointer to the retransmission control.
143 @param[in] TimeoutEvent The event of timeout.
144 @param[in] ReplyCallback The callback function when the reply was received.
145 @param[in] CallbackContext The pointer to the parameter passed to the callback.
147 @retval EFI_SUCCESS Start the info-request process successfully.
148 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
149 @retval EFI_NO_MAPPING No source address is available for use.
150 @retval Others Failed to start the info-request process.
154 Dhcp6StartInfoRequest (
155 IN DHCP6_INSTANCE
*Instance
,
156 IN BOOLEAN SendClientId
,
157 IN EFI_DHCP6_PACKET_OPTION
*OptionRequest
,
158 IN UINT32 OptionCount
,
159 IN EFI_DHCP6_PACKET_OPTION
*OptionList
[] OPTIONAL
,
160 IN EFI_DHCP6_RETRANSMISSION
*Retransmission
,
161 IN EFI_EVENT TimeoutEvent OPTIONAL
,
162 IN EFI_DHCP6_INFO_CALLBACK ReplyCallback
,
163 IN VOID
*CallbackContext OPTIONAL
167 Create the information request message and send it.
169 @param[in] Instance The pointer to the Dhcp6 instance.
170 @param[in] InfCb The pointer to the information request control block.
171 @param[in] SendClientId If TRUE, the client identifier option will be included in
172 information request message. Otherwise, the client identifier
173 option will not be included.
174 @param[in] OptionRequest The pointer to the option request option.
175 @param[in] OptionCount The number options in the OptionList.
176 @param[in] OptionList The array pointers to the appended options.
177 @param[in] Retransmission The pointer to the retransmission control.
179 @retval EFI_SUCCESS Create and send the info-request message successfully.
180 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
181 @retval Others Failed to send the info-request message.
185 Dhcp6SendInfoRequestMsg (
186 IN DHCP6_INSTANCE
*Instance
,
187 IN DHCP6_INF_CB
*InfCb
,
188 IN BOOLEAN SendClientId
,
189 IN EFI_DHCP6_PACKET_OPTION
*OptionRequest
,
190 IN UINT32 OptionCount
,
191 IN EFI_DHCP6_PACKET_OPTION
*OptionList
[],
192 IN EFI_DHCP6_RETRANSMISSION
*Retransmission
196 The receive callback function for the Dhcp6 exchange process.
198 @param[in] Udp6Wrap The pointer to the received net buffer.
199 @param[in] EndPoint The pointer to the udp end point.
200 @param[in] IoStatus The return status from udp io.
201 @param[in] Context The opaque parameter to the function.
207 IN NET_BUF
*Udp6Wrap
,
208 IN UDP_END_POINT
*EndPoint
,
209 IN EFI_STATUS IoStatus
,
214 The timer routine of the Dhcp6 instance for each second.
216 @param[in] Event The timer event.
217 @param[in] Context The opaque parameter to the function.