iPXE
Ip4Config.h
Go to the documentation of this file.
1#ifndef _IPXE_EFI_IP4CONFIG_H
2#define _IPXE_EFI_IP4CONFIG_H
3
4/** @file
5 This file provides a definition of the EFI IPv4 Configuration
6 Protocol.
7
8Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
9SPDX-License-Identifier: BSD-2-Clause-Patent
10
11 @par Revision Reference:
12 This Protocol is introduced in UEFI Specification 2.0.
13
14**/
15
16#ifndef __EFI_IP4CONFIG_PROTOCOL_H__
17#define __EFI_IP4CONFIG_PROTOCOL_H__
18
19FILE_LICENCE ( BSD2_PATENT );
20FILE_SECBOOT ( PERMITTED );
21
23
24#define EFI_IP4_CONFIG_PROTOCOL_GUID \
25 { \
26 0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } \
27 }
28
30
31#define IP4_CONFIG_VARIABLE_ATTRIBUTES \
32 (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS)
33
34///
35/// EFI_IP4_IPCONFIG_DATA contains the minimum IPv4 configuration data
36/// that is needed to start basic network communication. The StationAddress
37/// and SubnetMask must be a valid unicast IP address and subnet mask.
38/// If RouteTableSize is not zero, then RouteTable contains a properly
39/// formatted routing table for the StationAddress/SubnetMask, with the
40/// last entry in the table being the default route.
41///
42typedef struct {
43 ///
44 /// Default station IP address, stored in network byte order.
45 ///
47 ///
48 /// Default subnet mask, stored in network byte order.
49 ///
51 ///
52 /// Number of entries in the following RouteTable. May be zero.
53 ///
55 ///
56 /// Default routing table data (stored in network byte order).
57 /// Ignored if RouteTableSize is zero.
58 ///
61
62/**
63 Starts running the configuration policy for the EFI IPv4 Protocol driver.
64
65 The Start() function is called to determine and to begin the platform
66 configuration policy by the EFI IPv4 Protocol driver. This determination may
67 be as simple as returning EFI_UNSUPPORTED if there is no EFI IPv4 Protocol
68 driver configuration policy. It may be as involved as loading some defaults
69 from nonvolatile storage, downloading dynamic data from a DHCP server, and
70 checking permissions with a site policy server.
71 Starting the configuration policy is just the beginning. It may finish almost
72 instantly or it may take several minutes before it fails to retrieve configuration
73 information from one or more servers. Once the policy is started, drivers
74 should use the DoneEvent parameter to determine when the configuration policy
75 has completed. EFI_IP4_CONFIG_PROTOCOL.GetData() must then be called to
76 determine if the configuration succeeded or failed.
77 Until the configuration completes successfully, EFI IPv4 Protocol driver instances
78 that are attempting to use default configurations must return EFI_NO_MAPPING.
79 Once the configuration is complete, the EFI IPv4 Configuration Protocol driver
80 signals DoneEvent. The configuration may need to be updated in the future.
81 Note that in this case the EFI IPv4 Configuration Protocol driver must signal
82 ReconfigEvent, and all EFI IPv4 Protocol driver instances that are using default
83 configurations must return EFI_NO_MAPPING until the configuration policy has
84 been rerun.
85
86 @param This The pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
87 @param DoneEvent Event that will be signaled when the EFI IPv4
88 Protocol driver configuration policy completes
89 execution. This event must be of type EVT_NOTIFY_SIGNAL.
90 @param ReconfigEvent Event that will be signaled when the EFI IPv4
91 Protocol driver configuration needs to be updated.
92 This event must be of type EVT_NOTIFY_SIGNAL.
93
94 @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol
95 driver is now running.
96 @retval EFI_INVALID_PARAMETER One or more of the following parameters is NULL:
97 This
98 DoneEvent
99 ReconfigEvent
100 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
101 @retval EFI_ALREADY_STARTED The configuration policy for the EFI IPv4 Protocol
102 driver was already started.
103 @retval EFI_DEVICE_ERROR An unexpected system error or network error occurred.
104 @retval EFI_UNSUPPORTED This interface does not support the EFI IPv4 Protocol
105 driver configuration.
106
107**/
108typedef
112 IN EFI_EVENT DoneEvent,
113 IN EFI_EVENT ReconfigEvent
114 );
115
116/**
117 Stops running the configuration policy for the EFI IPv4 Protocol driver.
118
119 The Stop() function stops the configuration policy for the EFI IPv4 Protocol driver.
120 All configuration data will be lost after calling Stop().
121
122 @param This The pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
123
124 @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol
125 driver has been stopped.
126 @retval EFI_INVALID_PARAMETER This is NULL.
127 @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol
128 driver was not started.
129
130**/
131typedef
135 );
136
137/**
138 Returns the default configuration data (if any) for the EFI IPv4 Protocol driver.
139
140 The GetData() function returns the current configuration data for the EFI IPv4
141 Protocol driver after the configuration policy has completed.
142
143 @param This The pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
144 @param IpConfigDataSize On input, the size of the IpConfigData buffer.
145 On output, the count of bytes that were written
146 into the IpConfigData buffer.
147 @param IpConfigData The pointer to the EFI IPv4 Configuration Protocol
148 driver configuration data structure.
149 Type EFI_IP4_IPCONFIG_DATA is defined in
150 "Related Definitions" below.
151
152 @retval EFI_SUCCESS The EFI IPv4 Protocol driver configuration has been returned.
153 @retval EFI_INVALID_PARAMETER This is NULL.
154 @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol
155 driver is not running.
156 @retval EFI_NOT_READY EFI IPv4 Protocol driver configuration is still running.
157 @retval EFI_ABORTED EFI IPv4 Protocol driver configuration could not complete.
158 @retval EFI_BUFFER_TOO_SMALL *IpConfigDataSize is smaller than the configuration
159 data buffer or IpConfigData is NULL.
160
161**/
162typedef
166 IN OUT UINTN *IpConfigDataSize,
168 );
169
170///
171/// The EFI_IP4_CONFIG_PROTOCOL driver performs platform-dependent and policy-dependent
172/// configurations for the EFI IPv4 Protocol driver.
173///
179
181
182#endif
183
184#endif /* _IPXE_EFI_IP4CONFIG_H */
UINT64 UINTN
Unsigned value of native width.
#define EFIAPI
unsigned int UINT32
4-byte unsigned value.
#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
EFI_STATUS(EFIAPI * EFI_IP4_CONFIG_START)(IN EFI_IP4_CONFIG_PROTOCOL *This, IN EFI_EVENT DoneEvent, IN EFI_EVENT ReconfigEvent)
Starts running the configuration policy for the EFI IPv4 Protocol driver.
Definition Ip4Config.h:110
EFI_STATUS(EFIAPI * EFI_IP4_CONFIG_GET_DATA)(IN EFI_IP4_CONFIG_PROTOCOL *This, IN OUT UINTN *IpConfigDataSize, OUT EFI_IP4_IPCONFIG_DATA *IpConfigData OPTIONAL)
Returns the default configuration data (if any) for the EFI IPv4 Protocol driver.
Definition Ip4Config.h:164
EFI_GUID gEfiIp4ConfigProtocolGuid
EFI_STATUS(EFIAPI * EFI_IP4_CONFIG_STOP)(IN EFI_IP4_CONFIG_PROTOCOL *This)
Stops running the configuration policy for the EFI IPv4 Protocol driver.
Definition Ip4Config.h:133
struct _EFI_IP4_CONFIG_PROTOCOL EFI_IP4_CONFIG_PROTOCOL
Definition Ip4Config.h:29
This file defines the EFI IPv4 (Internet Protocol version 4) Protocol interface.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
GUID EFI_GUID
128-bit buffer containing a unique identifier value.
IPv4_ADDRESS EFI_IPv4_ADDRESS
4-byte buffer.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define EFI_EVENT
Definition efi.h:54
#define IN
Definition mlx_utils.h:28
#define OUT
Definition mlx_utils.h:29
EFI_IP4_IPCONFIG_DATA contains the minimum IPv4 configuration data that is needed to start basic netw...
Definition Ip4Config.h:42
EFI_IPv4_ADDRESS SubnetMask
Default subnet mask, stored in network byte order.
Definition Ip4Config.h:50
EFI_IPv4_ADDRESS StationAddress
Default station IP address, stored in network byte order.
Definition Ip4Config.h:46
UINT32 RouteTableSize
Number of entries in the following RouteTable.
Definition Ip4Config.h:54
EFI_IP4_ROUTE_TABLE * RouteTable
Default routing table data (stored in network byte order).
Definition Ip4Config.h:59
The EFI_IP4_CONFIG_PROTOCOL driver performs platform-dependent and policy-dependent configurations fo...
Definition Ip4Config.h:174
EFI_IP4_CONFIG_START Start
Definition Ip4Config.h:175
EFI_IP4_CONFIG_STOP Stop
Definition Ip4Config.h:176
EFI_IP4_CONFIG_GET_DATA GetData
Definition Ip4Config.h:177