]> git.proxmox.com Git - mirror_edk2.git/blob - NetworkPkg/Dhcp6Dxe/Dhcp6Io.h
Add NetworkPkg (P.UDK2010.UP3.Network.P1)
[mirror_edk2.git] / NetworkPkg / Dhcp6Dxe / Dhcp6Io.h
1 /** @file
2 Dhcp6 internal functions declaration.
3
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
5
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.
10
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.
13
14 **/
15
16 #ifndef __EFI_DHCP6_IO_H__
17 #define __EFI_DHCP6_IO_H__
18
19
20 /**
21 Clean up the specific nodes in the retry list.
22
23 @param[in] Instance The pointer to the Dhcp6 instance.
24 @param[in] Scope The scope of cleanup nodes.
25
26 **/
27 VOID
28 Dhcp6CleanupRetry (
29 IN DHCP6_INSTANCE *Instance,
30 IN UINT32 Scope
31 );
32
33 /**
34 Clean up the session of the instance stateful exchange.
35
36 @param[in, out] Instance The pointer to the Dhcp6 instance.
37 @param[in] Status The return status from udp.
38
39 **/
40 VOID
41 Dhcp6CleanupSession (
42 IN OUT DHCP6_INSTANCE *Instance,
43 IN EFI_STATUS Status
44 );
45
46 /**
47 Create the solicit message and send it.
48
49 @param[in] Instance The pointer to Dhcp6 instance.
50
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.
54
55 **/
56 EFI_STATUS
57 Dhcp6SendSolicitMsg (
58 IN DHCP6_INSTANCE *Instance
59 );
60
61 /**
62 Create the request message and send it.
63
64 @param[in] Instance The pointer to the Dhcp6 instance.
65
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.
70
71 **/
72 EFI_STATUS
73 Dhcp6SendRequestMsg (
74 IN DHCP6_INSTANCE *Instance
75 );
76
77 /**
78 Create the renew/rebind message and send it.
79
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.
83
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.
88
89 **/
90 EFI_STATUS
91 Dhcp6SendRenewRebindMsg (
92 IN DHCP6_INSTANCE *Instance,
93 IN BOOLEAN RebindRequest
94 );
95
96 /**
97 Create the decline message and send it.
98
99 @param[in] Instance The pointer to the Dhcp6 instance.
100 @param[in] DecIa The pointer to the decline Ia.
101
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.
106
107 **/
108 EFI_STATUS
109 Dhcp6SendDeclineMsg (
110 IN DHCP6_INSTANCE *Instance,
111 IN EFI_DHCP6_IA *DecIa
112 );
113
114 /**
115 Create the release message and send it.
116
117 @param[in] Instance The pointer to the Dhcp6 instance.
118 @param[in] RelIa The pointer to the release Ia.
119
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.
124
125 **/
126 EFI_STATUS
127 Dhcp6SendReleaseMsg (
128 IN DHCP6_INSTANCE *Instance,
129 IN EFI_DHCP6_IA *RelIa
130 );
131
132 /**
133 Create the information request message and send it.
134
135 @param[in] Instance The pointer to the Dhcp6 instance.
136 @param[in] InfCb The pointer to the information request control block.
137 @param[in] SendClientId If TRUE, the client identifier option will be included in
138 information request message. Otherwise, the client identifier
139 option will not be included.
140 @param[in] OptionRequest The pointer to the option request option.
141 @param[in] OptionCount The number options in the OptionList.
142 @param[in] OptionList The array pointers to the appended options.
143 @param[in] Retransmission The pointer to the retransmission control.
144
145 @retval EFI_SUCCESS Create and send the info-request message successfully.
146 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
147 @retval Others Failed to send the info-request message.
148
149 **/
150 EFI_STATUS
151 Dhcp6SendInfoRequestMsg (
152 IN DHCP6_INSTANCE *Instance,
153 IN DHCP6_INF_CB *InfCb,
154 IN BOOLEAN SendClientId,
155 IN EFI_DHCP6_PACKET_OPTION *OptionRequest,
156 IN UINT32 OptionCount,
157 IN EFI_DHCP6_PACKET_OPTION *OptionList[],
158 IN EFI_DHCP6_RETRANSMISSION *Retransmission
159 );
160
161 /**
162 The receive callback function for the Dhcp6 exchange process.
163
164 @param[in] Udp6Wrap The pointer to the received net buffer.
165 @param[in] EndPoint The pointer to the udp end point.
166 @param[in] IoStatus The return status from udp io.
167 @param[in] Context The opaque parameter to the function.
168
169 **/
170 VOID
171 EFIAPI
172 Dhcp6ReceivePacket (
173 IN NET_BUF *Udp6Wrap,
174 IN UDP_END_POINT *EndPoint,
175 IN EFI_STATUS IoStatus,
176 IN VOID *Context
177 );
178
179 /**
180 The timer routine of the Dhcp6 instance for each second.
181
182 @param[in] Event The timer event.
183 @param[in] Context The opaque parameter to the function.
184
185 **/
186 VOID
187 EFIAPI
188 Dhcp6OnTimerTick (
189 IN EFI_EVENT Event,
190 IN VOID *Context
191 );
192
193 #endif