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