]> git.proxmox.com Git - mirror_edk2.git/blame - NetworkPkg/Dhcp6Dxe/Dhcp6Io.h
OvmfPkg/CpuHotplugSmm: complete root MMI handler for CPU hotplug
[mirror_edk2.git] / NetworkPkg / Dhcp6Dxe / Dhcp6Io.h
CommitLineData
a3bcde70
HT
1/** @file\r
2 Dhcp6 internal functions declaration.\r
3\r
cc658224 4 Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
a3bcde70 5\r
ecf98fbc 6 SPDX-License-Identifier: BSD-2-Clause-Patent\r
a3bcde70
HT
7\r
8**/\r
9\r
10#ifndef __EFI_DHCP6_IO_H__\r
11#define __EFI_DHCP6_IO_H__\r
12\r
13\r
14/**\r
15 Clean up the specific nodes in the retry list.\r
16\r
17 @param[in] Instance The pointer to the Dhcp6 instance.\r
18 @param[in] Scope The scope of cleanup nodes.\r
19\r
20**/\r
21VOID\r
22Dhcp6CleanupRetry (\r
23 IN DHCP6_INSTANCE *Instance,\r
24 IN UINT32 Scope\r
25 );\r
26\r
27/**\r
28 Clean up the session of the instance stateful exchange.\r
29\r
30 @param[in, out] Instance The pointer to the Dhcp6 instance.\r
31 @param[in] Status The return status from udp.\r
32\r
33**/\r
34VOID\r
35Dhcp6CleanupSession (\r
36 IN OUT DHCP6_INSTANCE *Instance,\r
37 IN EFI_STATUS Status\r
38 );\r
39\r
40/**\r
41 Create the solicit message and send it.\r
42\r
43 @param[in] Instance The pointer to Dhcp6 instance.\r
44\r
45 @retval EFI_SUCCESS Create and send the solicit message successfully.\r
46 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
47 @retval Others Failed to send the solicit message.\r
48\r
49**/\r
50EFI_STATUS\r
51Dhcp6SendSolicitMsg (\r
52 IN DHCP6_INSTANCE *Instance\r
53 );\r
54\r
55/**\r
56 Create the request message and send it.\r
57\r
58 @param[in] Instance The pointer to the Dhcp6 instance.\r
59\r
60 @retval EFI_SUCCESS Create and send the request message successfully.\r
61 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
62 @retval EFI_DEVICE_ERROR An unexpected error.\r
63 @retval Others Failed to send the request message.\r
64\r
65**/\r
66EFI_STATUS\r
67Dhcp6SendRequestMsg (\r
68 IN DHCP6_INSTANCE *Instance\r
69 );\r
70\r
71/**\r
72 Create the renew/rebind message and send it.\r
73\r
74 @param[in] Instance The pointer to the Dhcp6 instance.\r
75 @param[in] RebindRequest If TRUE, it is a Rebind type message.\r
76 Otherwise, it is a Renew type message.\r
77\r
78 @retval EFI_SUCCESS Create and send the renew/rebind message successfully.\r
79 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
80 @retval EFI_DEVICE_ERROR An unexpected error.\r
81 @retval Others Failed to send the renew/rebind message.\r
82\r
83**/\r
84EFI_STATUS\r
85Dhcp6SendRenewRebindMsg (\r
86 IN DHCP6_INSTANCE *Instance,\r
87 IN BOOLEAN RebindRequest\r
88 );\r
89\r
90/**\r
91 Create the decline message and send it.\r
92\r
93 @param[in] Instance The pointer to the Dhcp6 instance.\r
94 @param[in] DecIa The pointer to the decline Ia.\r
95\r
96 @retval EFI_SUCCESS Create and send the decline message successfully.\r
97 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
98 @retval EFI_DEVICE_ERROR An unexpected error.\r
99 @retval Others Failed to send the decline message.\r
100\r
101**/\r
102EFI_STATUS\r
103Dhcp6SendDeclineMsg (\r
104 IN DHCP6_INSTANCE *Instance,\r
105 IN EFI_DHCP6_IA *DecIa\r
106 );\r
107\r
108/**\r
109 Create the release message and send it.\r
110\r
111 @param[in] Instance The pointer to the Dhcp6 instance.\r
112 @param[in] RelIa The pointer to the release Ia.\r
113\r
114 @retval EFI_SUCCESS Create and send the release message successfully.\r
115 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
116 @retval EFI_DEVICE_ERROR An unexpected error.\r
117 @retval Others Failed to send the release message.\r
118\r
119**/\r
120EFI_STATUS\r
121Dhcp6SendReleaseMsg (\r
122 IN DHCP6_INSTANCE *Instance,\r
123 IN EFI_DHCP6_IA *RelIa\r
124 );\r
125\r
cc658224 126/**\r
127 Start the information request process.\r
128\r
129 @param[in] Instance The pointer to the Dhcp6 instance.\r
130 @param[in] SendClientId If TRUE, the client identifier option will be included in\r
131 information request message. Otherwise, the client identifier\r
132 option will not be included.\r
133 @param[in] OptionRequest The pointer to the option request option.\r
134 @param[in] OptionCount The number options in the OptionList.\r
135 @param[in] OptionList The array pointers to the appended options.\r
136 @param[in] Retransmission The pointer to the retransmission control.\r
137 @param[in] TimeoutEvent The event of timeout.\r
138 @param[in] ReplyCallback The callback function when the reply was received.\r
139 @param[in] CallbackContext The pointer to the parameter passed to the callback.\r
140\r
141 @retval EFI_SUCCESS Start the info-request process successfully.\r
142 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
143 @retval EFI_NO_MAPPING No source address is available for use.\r
144 @retval Others Failed to start the info-request process.\r
145\r
146**/\r
147EFI_STATUS\r
148Dhcp6StartInfoRequest (\r
149 IN DHCP6_INSTANCE *Instance,\r
150 IN BOOLEAN SendClientId,\r
151 IN EFI_DHCP6_PACKET_OPTION *OptionRequest,\r
152 IN UINT32 OptionCount,\r
153 IN EFI_DHCP6_PACKET_OPTION *OptionList[] OPTIONAL,\r
154 IN EFI_DHCP6_RETRANSMISSION *Retransmission,\r
155 IN EFI_EVENT TimeoutEvent OPTIONAL,\r
156 IN EFI_DHCP6_INFO_CALLBACK ReplyCallback,\r
157 IN VOID *CallbackContext OPTIONAL\r
158 );\r
159\r
a3bcde70
HT
160/**\r
161 Create the information request message and send it.\r
162\r
163 @param[in] Instance The pointer to the Dhcp6 instance.\r
164 @param[in] InfCb The pointer to the information request control block.\r
165 @param[in] SendClientId If TRUE, the client identifier option will be included in\r
166 information request message. Otherwise, the client identifier\r
167 option will not be included.\r
168 @param[in] OptionRequest The pointer to the option request option.\r
169 @param[in] OptionCount The number options in the OptionList.\r
170 @param[in] OptionList The array pointers to the appended options.\r
171 @param[in] Retransmission The pointer to the retransmission control.\r
172\r
173 @retval EFI_SUCCESS Create and send the info-request message successfully.\r
174 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.\r
175 @retval Others Failed to send the info-request message.\r
176\r
177**/\r
178EFI_STATUS\r
179Dhcp6SendInfoRequestMsg (\r
180 IN DHCP6_INSTANCE *Instance,\r
181 IN DHCP6_INF_CB *InfCb,\r
182 IN BOOLEAN SendClientId,\r
183 IN EFI_DHCP6_PACKET_OPTION *OptionRequest,\r
184 IN UINT32 OptionCount,\r
185 IN EFI_DHCP6_PACKET_OPTION *OptionList[],\r
186 IN EFI_DHCP6_RETRANSMISSION *Retransmission\r
187 );\r
188\r
189/**\r
190 The receive callback function for the Dhcp6 exchange process.\r
191\r
192 @param[in] Udp6Wrap The pointer to the received net buffer.\r
193 @param[in] EndPoint The pointer to the udp end point.\r
194 @param[in] IoStatus The return status from udp io.\r
195 @param[in] Context The opaque parameter to the function.\r
196\r
197**/\r
198VOID\r
199EFIAPI\r
200Dhcp6ReceivePacket (\r
201 IN NET_BUF *Udp6Wrap,\r
202 IN UDP_END_POINT *EndPoint,\r
203 IN EFI_STATUS IoStatus,\r
204 IN VOID *Context\r
205 );\r
206\r
207/**\r
208 The timer routine of the Dhcp6 instance for each second.\r
209\r
210 @param[in] Event The timer event.\r
211 @param[in] Context The opaque parameter to the function.\r
212\r
213**/\r
214VOID\r
215EFIAPI\r
216Dhcp6OnTimerTick (\r
217 IN EFI_EVENT Event,\r
218 IN VOID *Context\r
219 );\r
220\r
221#endif\r