]>
Commit | Line | Data |
---|---|---|
5d6a636c | 1 | /** @file\r |
2 | UEFI Dynamic Host Configuration Protocol 6 Definition, which is used to get IPv6\r | |
3 | addresses and other configuration parameters from DHCPv6 servers.\r | |
4 | \r | |
5 | Copyright (c) 2008 - 2009, Intel Corporation \r | |
6 | All rights reserved. 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_PROTOCOL_H__\r | |
17 | #define __EFI_DHCP6_PROTOCOL_H__\r | |
18 | \r | |
19 | #define EFI_DHCP6_PROTOCOL_GUID \\r | |
20 | { \\r | |
21 | 0x87c8bad7, 0x595, 0x4053, {0x82, 0x97, 0xde, 0xde, 0x39, 0x5f, 0x5d, 0x5b } \\r | |
22 | }\r | |
23 | \r | |
24 | #define EFI_DHCP6_SERVICE_BINDING_PROTOCOL_GUID \\r | |
25 | { \\r | |
26 | 0x9fb9a8a1, 0x2f4a, 0x43a6, {0x88, 0x9c, 0xd0, 0xf7, 0xb6, 0xc4, 0x7a, 0xd5 } \\r | |
27 | }\r | |
28 | \r | |
29 | typedef struct _EFI_DHCP6_PROTOCOL EFI_DHCP6_PROTOCOL;\r | |
30 | \r | |
31 | typedef enum { \r | |
32 | ///\r | |
33 | /// The EFI DHCPv6 Protocol instance is configured, and start() needs \r | |
34 | /// to be called\r | |
35 | ///\r | |
36 | Dhcp6Init = 0x0,\r | |
37 | ///\r | |
38 | /// A Solicit packet is sent out to discover DHCPv6 server, and the EFI\r | |
39 | /// DHCPv6 Protocol instance is collecting Advertise packets.\r | |
40 | ///\r | |
41 | Dhcp6Selecting = 0x1,\r | |
42 | ///\r | |
43 | /// A Request is sent out to the DHCPv6 server, and the EFI DHCPv6 \r | |
44 | /// Protocol instance is waiting for Reply packet.\r | |
45 | ///\r | |
46 | Dhcp6Requesting = 0x2,\r | |
47 | ///\r | |
48 | /// A Decline packet is sent out to indicate one or more addresses of the\r | |
49 | /// configured IA are in use by another node, and the EFI DHCPv6.\r | |
50 | /// Protocol instance is waiting for Reply packet.\r | |
51 | ///\r | |
52 | Dhcp6Declining = 0x3,\r | |
53 | ///\r | |
54 | /// A Confirm packet is sent out to confirm the IPv6 addresses of the \r | |
55 | /// configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.\r | |
56 | ///\r | |
57 | Dhcp6Confirming = 0x4,\r | |
58 | ///\r | |
59 | /// A Release packet is sent out to release one or more IPv6 addresses of\r | |
60 | /// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.\r | |
61 | ///\r | |
62 | Dhcp6Releasing = 0x5,\r | |
63 | ///\r | |
64 | /// The DHCPv6 S.A.R.R process is completed for the configured IA.\r | |
65 | ///\r | |
66 | Dhcp6Bound = 0x6,\r | |
67 | ///\r | |
68 | /// A Renew packet is sent out to extend lifetime for the IPv6 addresses of\r | |
69 | /// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.\r | |
70 | ///\r | |
71 | Dhcp6Renewing = 0x7,\r | |
72 | ///\r | |
73 | /// A Rebind packet is sent out to extend lifetime for the IPv6 addresses of\r | |
74 | /// the configured IA, and the EFI DHCPv6 Protocol instance is waiting for Reply packet.\r | |
75 | ///\r | |
76 | Dhcp6Rebinding = 0x8\r | |
77 | } EFI_DHCP6_STATE;\r | |
78 | \r | |
79 | typedef enum {\r | |
80 | /// \r | |
81 | /// A Solicit packet is about to be sent. The packet is passed to Dhcp6Callback and\r | |
82 | /// can be modified or replaced in Dhcp6Callback.\r | |
83 | ///\r | |
84 | Dhcp6SendSolicit = 0x0,\r | |
85 | /// \r | |
86 | /// An Advertise packet is received and will be passed to Dhcp6Callback.\r | |
87 | ///\r | |
88 | Dhcp6RcvdAdvertise = 0x1,\r | |
89 | /// \r | |
90 | /// It is time for Dhcp6Callback to determine whether select the default Advertise\r | |
91 | /// packet by RFC 3315 policy, or overwrite it by specific user policy.\r | |
92 | ///\r | |
93 | Dhcp6SelectAdvertise = 0x2,\r | |
94 | /// \r | |
95 | /// A Request packet is about to be sent. The packet is passed to Dhcp6Callback and\r | |
96 | /// can be modified or replaced in Dhcp6Callback.\r | |
97 | ///\r | |
98 | Dhcp6SendRequest = 0x3,\r | |
99 | /// \r | |
100 | /// A Reply packet is received and will be passed to Dhcp6Callback.\r | |
101 | ///\r | |
102 | Dhcp6RcvdReply = 0x4,\r | |
103 | /// \r | |
104 | /// A Reconfigure packet is received and will be passed to Dhcp6Callback.\r | |
105 | ///\r | |
106 | Dhcp6RcvdReconfigure = 0x5,\r | |
107 | /// \r | |
108 | /// A Decline packet is about to be sent. The packet is passed to Dhcp6Callback and\r | |
109 | /// can be modified or replaced in Dhcp6Callback.\r | |
110 | ///\r | |
111 | Dhcp6SendDecline = 0x6,\r | |
112 | /// \r | |
113 | /// A Confirm packet is about to be sent. The packet is passed to Dhcp6Callback and\r | |
114 | /// can be modified or replaced in Dhcp6Callback.\r | |
115 | ///\r | |
116 | Dhcp6SendConfirm = 0x7,\r | |
117 | /// \r | |
118 | /// A Release packet is about to be sent. The packet is passed to Dhcp6Callback and\r | |
119 | /// can be modified or replaced in Dhcp6Callback.\r | |
120 | ///\r | |
121 | Dhcp6SendRelease = 0x8,\r | |
122 | /// \r | |
123 | /// A Renew packet is about to be sent. The packet is passed to Dhcp6Callback and\r | |
124 | /// can be modified or replaced in Dhcp6Callback. \r | |
125 | ///\r | |
126 | Dhcp6EnterRenewing = 0x9,\r | |
127 | /// \r | |
128 | /// A Rebind packet is about to be sent. The packet is passed to Dhcp6Callback and \r | |
129 | /// can be modified or replaced in Dhcp6Callback.\r | |
130 | ///\r | |
131 | Dhcp6EnterRebinding = 0xa\r | |
132 | } EFI_DHCP6_EVENT;\r | |
133 | \r | |
134 | ///\r | |
135 | /// An IA which carries assigned not temporary address.\r | |
136 | ///\r | |
137 | #define EFI_DHCP6_IA_TYPE_NA 3\r | |
138 | ///\r | |
139 | /// An IA which carries assigned temporary address.\r | |
140 | ///\r | |
141 | #define EFI_DHCP6_IA_TYPE_TA 4\r | |
142 | \r | |
143 | #pragma pack(1)\r | |
144 | typedef struct {\r | |
145 | ///\r | |
146 | /// The DHCPv6 option code.\r | |
147 | ///\r | |
148 | UINT16 OpCode;\r | |
149 | ///\r | |
150 | /// Length of the DHCPv6 option data. From the first byte to the last byte of the Data field.\r | |
151 | ///\r | |
152 | UINT16 OpLen;\r | |
153 | ///\r | |
154 | /// The data for the DHCPv6 option.\r | |
155 | ///\r | |
156 | UINT8 Data[1];\r | |
157 | } EFI_DHCP6_PACKET_OPTION;\r | |
158 | \r | |
159 | typedef struct{\r | |
160 | ///\r | |
161 | /// The DHCPv6 transaction ID.\r | |
162 | ///\r | |
163 | UINT32 MessageType:8;\r | |
164 | ///\r | |
165 | /// The DHCPv6 message type.\r | |
166 | ///\r | |
167 | UINT32 TransactionId:24;\r | |
168 | } EFI_DHCP6_HEADER;\r | |
169 | \r | |
170 | typedef struct {\r | |
171 | ///\r | |
172 | /// Size of the EFI_DHCP6_PACKET buffer.\r | |
173 | ///\r | |
174 | UINT32 Size;\r | |
175 | ///\r | |
176 | /// Length of the EFI_DHCP6_PACKET from the first byte of the Header field to the last\r | |
177 | /// byte of the Option[] field.\r | |
178 | ///\r | |
179 | UINT32 Length;\r | |
180 | struct{\r | |
181 | ///\r | |
182 | /// The DHCPv6 packet header.\r | |
183 | ///\r | |
184 | EFI_DHCP6_HEADER Header;\r | |
185 | ///\r | |
186 | /// Start of the DHCPv6 packed option data.\r | |
187 | ///\r | |
188 | UINT8 Option[1];\r | |
189 | } Dhcp6;\r | |
190 | } EFI_DHCP6_PACKET;\r | |
191 | \r | |
192 | #pragma pack()\r | |
193 | \r | |
194 | typedef struct {\r | |
195 | ///\r | |
196 | /// Length of DUID in octects.\r | |
197 | ///\r | |
198 | UINT16 Length;\r | |
199 | ///\r | |
200 | /// Array of DUID octects.\r | |
201 | ///\r | |
202 | UINT8 Duid[1];\r | |
203 | } EFI_DHCP6_DUID;\r | |
204 | \r | |
205 | typedef struct {\r | |
206 | ///\r | |
207 | /// Initial retransmission timeout.\r | |
208 | ///\r | |
209 | UINT32 Irt;\r | |
210 | ///\r | |
211 | Content-type: text/html ]>