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