iPXE
Ip6Config.h
Go to the documentation of this file.
1 /** @file
2  This file provides a definition of the EFI IPv6 Configuration
3  Protocol.
4 
5 Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7 
8 **/
9 
10 #ifndef __EFI_IP6CONFIG_PROTOCOL_H__
11 #define __EFI_IP6CONFIG_PROTOCOL_H__
12 
13 FILE_LICENCE ( BSD2_PATENT );
14 FILE_SECBOOT ( PERMITTED );
15 
16 #include <ipxe/efi/Protocol/Ip6.h>
17 
18 #define EFI_IP6_CONFIG_PROTOCOL_GUID \
19  { \
20  0x937fe521, 0x95ae, 0x4d1a, {0x89, 0x29, 0x48, 0xbc, 0xd9, 0x0a, 0xd3, 0x1a } \
21  }
22 
24 
25 ///
26 /// EFI_IP6_CONFIG_DATA_TYPE
27 ///
28 typedef enum {
29  ///
30  /// The interface information of the communication
31  /// device this EFI IPv6 Configuration Protocol instance manages.
32  /// This type of data is read only.The corresponding Data is of type
33  /// EFI_IP6_CONFIG_INTERFACE_INFO.
34  ///
36  ///
37  /// The alternative interface ID for the
38  /// communication device this EFI IPv6 Configuration Protocol
39  /// instance manages if the link local IPv6 address generated from
40  /// the interfaced ID based on the default source the EFI IPv6
41  /// Protocol uses is a duplicate address. The length of the interface
42  /// ID is 64 bit. The corresponding Data is of type
43  /// EFI_IP6_CONFIG_INTERFACE_ID.
44  ///
46  ///
47  /// The general configuration policy for the EFI IPv6 network
48  /// stack running on the communication device this EFI IPv6
49  /// Configuration Protocol instance manages. The policy will affect
50  /// other configuration settings. The corresponding Data is of type
51  /// EFI_IP6_CONFIG_POLICY.
52  ///
54  ///
55  /// The number of consecutive
56  /// Neighbor Solicitation messages sent while performing Duplicate
57  /// Address Detection on a tentative address. A value of zero
58  /// indicates that Duplicate Address Detection will not be performed
59  /// on tentative addresses. The corresponding Data is of type
60  /// EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS.
61  ///
63  ///
64  /// The station addresses set manually for the EFI
65  /// IPv6 network stack. It is only configurable when the policy is
66  /// Ip6ConfigPolicyManual. The corresponding Data is a
67  /// pointer to an array of EFI_IPv6_ADDRESS instances. When
68  /// DataSize is 0 and Data is NULL, the existing configuration
69  /// is cleared from the EFI IPv6 Configuration Protocol instance.
70  ///
72  ///
73  /// The gateway addresses set manually for the EFI IPv6
74  /// network stack running on the communication device this EFI
75  /// IPv6 Configuration Protocol manages. It is not configurable when
76  /// the policy is Ip6ConfigPolicyAutomatic. The gateway
77  /// addresses must be unicast IPv6 addresses. The corresponding
78  /// Data is a pointer to an array of EFI_IPv6_ADDRESS instances.
79  /// When DataSize is 0 and Data is NULL, the existing configuration
80  /// is cleared from the EFI IPv6 Configuration Protocol instance.
81  ///
83  ///
84  /// The DNS server list for the EFI IPv6 network stack
85  /// running on the communication device this EFI IPv6
86  /// Configuration Protocol manages. It is not configurable when the
87  /// policy is Ip6ConfigPolicyAutomatic.The DNS server
88  /// addresses must be unicast IPv6 addresses. The corresponding
89  /// Data is a pointer to an array of EFI_IPv6_ADDRESS instances.
90  /// When DataSize is 0 and Data is NULL, the existing configuration
91  /// is cleared from the EFI IPv6 Configuration Protocol instance.
92  ///
94  ///
95  /// The number of this enumeration memebers.
96  ///
99 
100 ///
101 /// EFI_IP6_CONFIG_INTERFACE_INFO
102 /// describes the operational state of the interface this
103 /// EFI IPv6 Configuration Protocol instance manages.
104 ///
105 typedef struct {
106  ///
107  /// The name of the interface. It is a NULL-terminated string.
108  ///
110  ///
111  /// The interface type of the network interface.
112  ///
114  ///
115  /// The size, in bytes, of the network interface's hardware address.
116  ///
118  ///
119  /// The hardware address for the network interface.
120  ///
122  ///
123  /// Number of EFI_IP6_ADDRESS_INFO structures pointed to by AddressInfo.
124  ///
126  ///
127  /// Pointer to an array of EFI_IP6_ADDRESS_INFO instances
128  /// which contain the local IPv6 addresses and the corresponding
129  /// prefix length information. Set to NULL if AddressInfoCount
130  /// is zero.
131  ///
133  ///
134  /// Number of route table entries in the following RouteTable.
135  ///
137  ///
138  /// The route table of the IPv6 network stack runs on this interface.
139  /// Set to NULL if RouteCount is zero.
140  ///
143 
144 ///
145 /// EFI_IP6_CONFIG_INTERFACE_ID
146 /// describes the 64-bit interface ID.
147 ///
148 typedef struct {
149  UINT8 Id[8];
151 
152 ///
153 /// EFI_IP6_CONFIG_POLICY
154 /// defines the general configuration policy the EFI IPv6
155 /// Configuration Protocol supports.
156 ///
157 typedef enum {
158  ///
159  /// Under this policy, the IpI6ConfigDataTypeManualAddress,
160  /// Ip6ConfigDataTypeGateway and Ip6ConfigDataTypeDnsServer
161  /// configuration data are required to be set manually.
162  /// The EFI IPv6 Protocol will get all required configuration
163  /// such as address, prefix and gateway settings from the EFI
164  /// IPv6 Configuration protocol.
165  ///
167  ///
168  /// Under this policy, the IpI6ConfigDataTypeManualAddress,
169  /// Ip6ConfigDataTypeGateway and Ip6ConfigDataTypeDnsServer
170  /// configuration data are not allowed to set via SetData().
171  /// All of these configurations are retrieved from some auto
172  /// configuration mechanism.
173  /// The EFI IPv6 Protocol will use the IPv6 stateless address
174  /// autoconfiguration mechanism and/or the IPv6 stateful address
175  /// autoconfiguration mechanism described in the related RFCs to
176  /// get address and other configuration information
177  ///
180 
181 ///
182 /// EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS
183 /// describes the number of consecutive Neighbor Solicitation messages sent
184 /// while performing Duplicate Address Detection on a tentative address.
185 /// The default value for a newly detected communication device is 1.
186 ///
187 typedef struct {
188  UINT32 DupAddrDetectTransmits; ///< The number of consecutive Neighbor Solicitation messages sent.
190 
191 ///
192 /// EFI_IP6_CONFIG_MANUAL_ADDRESS
193 /// is used to set the station address information for the EFI IPv6 network
194 /// stack manually when the policy is Ip6ConfigPolicyManual.
195 ///
196 typedef struct {
197  EFI_IPv6_ADDRESS Address; ///< The IPv6 unicast address.
198  BOOLEAN IsAnycast; ///< Set to TRUE if Address is anycast.
199  UINT8 PrefixLength; ///< The length, in bits, of the prefix associated with this Address.
201 
202 /**
203  Set the configuration for the EFI IPv6 network stack running on the communication
204  device this EFI IPv6 Configuration Protocol instance manages.
205 
206  This function is used to set the configuration data of type DataType for the EFI
207  IPv6 network stack running on the communication device this EFI IPv6 Configuration
208  Protocol instance manages.
209 
210  The DataSize is used to calculate the count of structure instances in the Data for
211  some DataType that multiple structure instances are allowed.
212 
213  This function is always non-blocking. When setting some type of configuration data,
214  an asynchronous process is invoked to check the correctness of the data, such as
215  doing Duplicate Address Detection on the manually set local IPv6 addresses.
216  EFI_NOT_READY is returned immediately to indicate that such an asynchronous process
217  is invoked and the process is not finished yet. The caller willing to get the result
218  of the asynchronous process is required to call RegisterDataNotify() to register an
219  event on the specified configuration data. Once the event is signaled, the caller
220  can call GetData() to get back the configuration data in order to know the result.
221  For other types of configuration data that do not require an asynchronous configuration
222  process, the result of the operation is immediately returned.
223 
224  @param[in] This Pointer to the EFI_IP6_CONFIG_PROTOCOL instance.
225  @param[in] DataType The type of data to set.
226  @param[in] DataSize Size of the buffer pointed to by Data in bytes.
227  @param[in] Data The data buffer to set. The type of the data buffer is
228  associated with the DataType.
229 
230  @retval EFI_SUCCESS The specified configuration data for the EFI IPv6
231  network stack is set successfully.
232  @retval EFI_INVALID_PARAMETER One or more of the following are TRUE:
233  - This is NULL.
234  - One or more fields in Data and DataSize do not match the
235  requirement of the data type indicated by DataType.
236  @retval EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified
237  configuration data can not be set under the current policy
238  @retval EFI_ACCESS_DENIED Another set operation on the specified configuration
239  data is already in process.
240  @retval EFI_NOT_READY An asynchronous process is invoked to set the specified
241  configuration data and the process is not finished yet.
242  @retval EFI_BAD_BUFFER_SIZE The DataSize does not match the size of the type
243  indicated by DataType.
244  @retval EFI_UNSUPPORTED This DataType is not supported.
245  @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
246  @retval EFI_DEVICE_ERROR An unexpected system error or network error occurred.
247 
248 **/
249 typedef
253  IN EFI_IP6_CONFIG_DATA_TYPE DataType,
254  IN UINTN DataSize,
255  IN VOID *Data
256  );
257 
258 /**
259  Get the configuration data for the EFI IPv6 network stack running on the communication
260  device this EFI IPv6 Configuration Protocol instance manages.
261 
262  This function returns the configuration data of type DataType for the EFI IPv6 network
263  stack running on the communication device this EFI IPv6 Configuration Protocol instance
264  manages.
265 
266  The caller is responsible for allocating the buffer used to return the specified
267  configuration data and the required size will be returned to the caller if the size of
268  the buffer is too small.
269 
270  EFI_NOT_READY is returned if the specified configuration data is not ready due to an
271  already in progress asynchronous configuration process. The caller can call RegisterDataNotify()
272  to register an event on the specified configuration data. Once the asynchronous configuration
273  process is finished, the event will be signaled and a subsequent GetData() call will return
274  the specified configuration data.
275 
276  @param[in] This Pointer to the EFI_IP6_CONFIG_PROTOCOL instance.
277  @param[in] DataType The type of data to get.
278  @param[in,out] DataSize On input, in bytes, the size of Data. On output, in bytes, the
279  size of buffer required to store the specified configuration data.
280  @param[in] Data The data buffer in which the configuration data is returned. The
281  type of the data buffer is associated with the DataType.
282 
283  @retval EFI_SUCCESS The specified configuration data is got successfully.
284  @retval EFI_INVALID_PARAMETER One or more of the followings are TRUE:
285  - This is NULL.
286  - DataSize is NULL.
287  - Data is NULL if *DataSize is not zero.
288  @retval EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified configuration data
289  and the required size is returned in DataSize.
290  @retval EFI_NOT_READY The specified configuration data is not ready due to an already in
291  progress asynchronous configuration process.
292  @retval EFI_NOT_FOUND The specified configuration data is not found.
293 
294 **/
295 typedef
299  IN EFI_IP6_CONFIG_DATA_TYPE DataType,
300  IN OUT UINTN *DataSize,
301  IN VOID *Data OPTIONAL
302  );
303 
304 /**
305  Register an event that is to be signaled whenever a configuration process on the specified
306  configuration data is done.
307 
308  This function registers an event that is to be signaled whenever a configuration process
309  on the specified configuration data is done. An event can be registered for different DataType
310  simultaneously and the caller is responsible for determining which type of configuration data
311  causes the signaling of the event in such case.
312 
313  @param[in] This Pointer to the EFI_IP6_CONFIG_PROTOCOL instance.
314  @param[in] DataType The type of data to unregister the event for.
315  @param[in] Event The event to register.
316 
317  @retval EFI_SUCCESS The notification event for the specified configuration data is
318  registered.
319  @retval EFI_INVALID_PARAMETER This is NULL or Event is NULL.
320  @retval EFI_UNSUPPORTED The configuration data type specified by DataType is not
321  supported.
322  @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
323  @retval EFI_ACCESS_DENIED The Event is already registered for the DataType.
324 
325 **/
326 typedef
330  IN EFI_IP6_CONFIG_DATA_TYPE DataType,
331  IN EFI_EVENT Event
332  );
333 
334 /**
335  Remove a previously registered event for the specified configuration data.
336 
337  This function removes a previously registered event for the specified configuration data.
338 
339  @param[in] This Pointer to the EFI_IP6_CONFIG_PROTOCOL instance.
340  @param[in] DataType The type of data to remove the previously registered event for.
341  @param[in] Event The event to unregister.
342 
343  @retval EFI_SUCCESS The event registered for the specified configuration data is removed.
344  @retval EFI_INVALID_PARAMETER This is NULL or Event is NULL.
345  @retval EFI_NOT_FOUND The Event has not been registered for the specified
346  DataType.
347 
348 **/
349 typedef
353  IN EFI_IP6_CONFIG_DATA_TYPE DataType,
354  IN EFI_EVENT Event
355  );
356 
357 ///
358 /// The EFI_IP6_CONFIG_PROTOCOL provides the mechanism to set and get various
359 /// types of configurations for the EFI IPv6 network stack.
360 ///
366 };
367 
369 
370 #endif
#define OPTIONAL
Passing the datum to the function is optional, and a NULL is passed if the value is not supplied.
Definition: Base.h:293
BOOLEAN IsAnycast
Set to TRUE if Address is anycast.
Definition: Ip6Config.h:198
EFI_IP6_CONFIG_REGISTER_NOTIFY RegisterDataNotify
Definition: Ip6Config.h:364
EFI_IP6_ADDRESS_INFO.
Definition: Ip6.h:223
EFI_IP6_CONFIG_POLICY
EFI_IP6_CONFIG_POLICY defines the general configuration policy the EFI IPv6 Configuration Protocol su...
Definition: Ip6Config.h:157
128 bit buffer containing a unique identifier value.
Definition: Base.h:216
Definition: efi.h:63
EFI_IPv6_ADDRESS Address
The IPv6 unicast address.
Definition: Ip6Config.h:197
32-byte buffer containing a network Media Access Control address.
Definition: UefiBaseType.h:98
EFI_GUID gEfiIp6ConfigProtocolGuid
unsigned char BOOLEAN
EFI_IP6_CONFIG_UNREGISTER_NOTIFY UnregisterDataNotify
Definition: Ip6Config.h:365
unsigned int UINT32
Definition: ProcessorBind.h:99
unsigned short CHAR16
Under this policy, the IpI6ConfigDataTypeManualAddress, Ip6ConfigDataTypeGateway and Ip6ConfigDataTyp...
Definition: Ip6Config.h:178
unsigned char UINT8
FILE_SECBOOT(PERMITTED)
EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS describes the number of consecutive Neighbor Solicitation me...
Definition: Ip6Config.h:187
EFI_IP6_ROUTE_TABLE is the entry structure that is used in routing tables.
Definition: Ip6.h:232
EFI_STATUS(EFIAPI * EFI_IP6_CONFIG_GET_DATA)(IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN OUT UINTN *DataSize, IN VOID *Data OPTIONAL)
Get the configuration data for the EFI IPv6 network stack running on the communication device this EF...
Definition: Ip6Config.h:297
EFI_IP6_CONFIG_GET_DATA GetData
Definition: Ip6Config.h:363
UINT8 PrefixLength
The length, in bits, of the prefix associated with this Address.
Definition: Ip6Config.h:199
UINT8 Name
Definition: Acpi10.h:136
#define OUT
Definition: mlx_utils.h:29
16-byte buffer.
Definition: Base.h:233
UINT32 HwAddressSize
The size, in bytes, of the network interface's hardware address.
Definition: Ip6Config.h:117
EFI_STATUS(EFIAPI * EFI_IP6_CONFIG_UNREGISTER_NOTIFY)(IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN EFI_EVENT Event)
Remove a previously registered event for the specified configuration data.
Definition: Ip6Config.h:351
The gateway addresses set manually for the EFI IPv6 network stack running on the communication device...
Definition: Ip6Config.h:82
UINT8 IfType
The interface type of the network interface.
Definition: Ip6Config.h:113
EFI_IP6_CONFIG_INTERFACE_INFO describes the operational state of the interface this EFI IPv6 Configur...
Definition: Ip6Config.h:105
The number of this enumeration memebers.
Definition: Ip6Config.h:97
The interface information of the communication device this EFI IPv6 Configuration Protocol instance m...
Definition: Ip6Config.h:35
UINT32 AddressInfoCount
Number of EFI_IP6_ADDRESS_INFO structures pointed to by AddressInfo.
Definition: Ip6Config.h:125
FILE_LICENCE(BSD2_PATENT)
#define EFIAPI
This file defines the EFI IPv6 (Internet Protocol version 6) Protocol interface.
The DNS server list for the EFI IPv6 network stack running on the communication device this EFI IPv6 ...
Definition: Ip6Config.h:93
UINT64 UINTN
Unsigned value of native width.
UINT32 RouteCount
Number of route table entries in the following RouteTable.
Definition: Ip6Config.h:136
#define VOID
Undeclared type.
Definition: Base.h:272
EFI_MAC_ADDRESS HwAddress
The hardware address for the network interface.
Definition: Ip6Config.h:121
EFI_IP6_ADDRESS_INFO * AddressInfo
Pointer to an array of EFI_IP6_ADDRESS_INFO instances which contain the local IPv6 addresses and the ...
Definition: Ip6Config.h:132
#define IN
Definition: mlx_utils.h:28
The general configuration policy for the EFI IPv6 network stack running on the communication device t...
Definition: Ip6Config.h:53
The EFI_IP6_CONFIG_PROTOCOL provides the mechanism to set and get various types of configurations for...
Definition: Ip6Config.h:361
EFI_IP6_CONFIG_MANUAL_ADDRESS is used to set the station address information for the EFI IPv6 network...
Definition: Ip6Config.h:196
Under this policy, the IpI6ConfigDataTypeManualAddress, Ip6ConfigDataTypeGateway and Ip6ConfigDataTyp...
Definition: Ip6Config.h:166
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:32
EFI_STATUS(EFIAPI * EFI_IP6_CONFIG_SET_DATA)(IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN UINTN DataSize, IN VOID *Data)
Set the configuration for the EFI IPv6 network stack running on the communication device this EFI IPv...
Definition: Ip6Config.h:251
EFI_IP6_CONFIG_SET_DATA SetData
Definition: Ip6Config.h:362
The station addresses set manually for the EFI IPv6 network stack.
Definition: Ip6Config.h:71
EFI_IP6_ROUTE_TABLE * RouteTable
The route table of the IPv6 network stack runs on this interface.
Definition: Ip6Config.h:141
EFI_IP6_CONFIG_DATA_TYPE
EFI_IP6_CONFIG_DATA_TYPE.
Definition: Ip6Config.h:28
UINT32 DupAddrDetectTransmits
The number of consecutive Neighbor Solicitation messages sent.
Definition: Ip6Config.h:188
The number of consecutive Neighbor Solicitation messages sent while performing Duplicate Address Dete...
Definition: Ip6Config.h:62
The alternative interface ID for the communication device this EFI IPv6 Configuration Protocol instan...
Definition: Ip6Config.h:45
EFI_IP6_CONFIG_INTERFACE_ID describes the 64-bit interface ID.
Definition: Ip6Config.h:148
EFI_STATUS(EFIAPI * EFI_IP6_CONFIG_REGISTER_NOTIFY)(IN EFI_IP6_CONFIG_PROTOCOL *This, IN EFI_IP6_CONFIG_DATA_TYPE DataType, IN EFI_EVENT Event)
Register an event that is to be signaled whenever a configuration process on the specified configurat...
Definition: Ip6Config.h:328