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