]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/Ip4Config.h
Add the detailed descriptions for the structure data member in these protocol.
[mirror_edk2.git] / MdePkg / Include / Protocol / Ip4Config.h
1 /** @file
2
3 This file provides a definition of the EFI IPv4 Configuration
4 Protocol.
5
6 Copyright (c) 2006 - 2008, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16 #ifndef __EFI_IP4CONFIG_PROTOCOL_H__
17 #define __EFI_IP4CONFIG_PROTOCOL_H__
18
19 #include <Protocol/Ip4.h>
20
21 #define EFI_IP4_CONFIG_PROTOCOL_GUID \
22 { \
23 0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } \
24 }
25
26 typedef struct _EFI_IP4_CONFIG_PROTOCOL EFI_IP4_CONFIG_PROTOCOL;
27
28 #define IP4_CONFIG_VARIABLE_ATTRIBUTES \
29 (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | \
30 EFI_VARIABLE_RUNTIME_ACCESS)
31
32 typedef struct {
33 ///
34 /// Default station IP address, stored in network byte order.
35 ///
36 EFI_IPv4_ADDRESS StationAddress;
37 ///
38 /// Default subnet mask, stored in network byte order.
39 ///
40 EFI_IPv4_ADDRESS SubnetMask;
41 ///
42 /// Number of entries in the following RouteTable. May be zero.
43 ///
44 UINT32 RouteTableSize;
45 ///
46 /// Default routing table data (stored in network byte order).
47 ///
48 EFI_IP4_ROUTE_TABLE *RouteTable;
49 } EFI_IP4_IPCONFIG_DATA;
50
51
52 /**
53 Starts running the configuration policy for the EFI IPv4 Protocol driver.
54
55 @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
56 @param DoneEvent Event that will be signaled when the EFI IPv4 Protocol driver
57 configuration policy completes execution. This event must be of
58 type EVT_NOTIFY_SIGNAL.
59 @param ReconfigEvent Event that will be signaled when the EFI IPv4 Protocol driver
60 configuration needs to be updated. This event must be of type
61 EVT_NOTIFY_SIGNAL.
62
63 @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol driver is now
64 running.
65 @retval EFI_INVALID_PARAMETER This, DoneEvent, or ReconfigEvent is NULL.
66 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
67 @retval EFI_ALREADY_STARTED The configuration policy for the EFI IPv4 Protocol driver was
68 already started.
69 @retval EFI_DEVICE_ERROR An unexpected system error or network error occurred.
70 @retval EFI_UNSUPPORTED This interface does not support the EFI IPv4 Protocol driver
71 configuration.
72
73 **/
74 typedef
75 EFI_STATUS
76 (EFIAPI *EFI_IP4_CONFIG_START)(
77 IN EFI_IP4_CONFIG_PROTOCOL *This,
78 IN EFI_EVENT DoneEvent,
79 IN EFI_EVENT ReconfigEvent
80 );
81
82 /**
83 Stops running the configuration policy for the EFI IPv4 Protocol driver.
84
85 @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
86
87 @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol driver has been stopped.
88 @retval EFI_INVALID_PARAMETER This is NULL.
89 @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol driver was not started.
90
91 **/
92 typedef
93 EFI_STATUS
94 (EFIAPI *EFI_IP4_CONFIG_STOP)(
95 IN EFI_IP4_CONFIG_PROTOCOL *This
96 );
97
98 /**
99 Returns the default configuration data (if any) for the EFI IPv4 Protocol driver.
100
101 @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
102 @param IpConfigDataSize On input, the size of the IpConfigData buffer.
103 On output, the count of bytes that were written into the IpConfigData buffer.
104 @param IpConfigData Pointer to the EFI IPv4 Configuration Protocol driver
105 configuration data structure.
106
107 @retval EFI_SUCCESS The EFI IPv4 Protocol driver configuration has been returned.
108 @retval EFI_INVALID_PARAMETER This is NULL.
109 @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol driver is not
110 running.
111 @retval EFI_NOT_READY EFI IPv4 Protocol driver configuration is still running.
112 @retval EFI_ABORTED EFI IPv4 Protocol driver configuration could not complete.
113 @retval EFI_BUFFER_TOO_SMALL *IpConfigDataSize is smaller than the configuration data
114 buffer or IpConfigData is NULL.
115
116 **/
117 typedef
118 EFI_STATUS
119 (EFIAPI *EFI_IP4_CONFIG_GET_DATA)(
120 IN EFI_IP4_CONFIG_PROTOCOL *This,
121 IN OUT UINTN *IpConfigDataSize,
122 OUT EFI_IP4_IPCONFIG_DATA *IpConfigData OPTIONAL
123 );
124
125 ///
126 /// The EFI_IP4_CONFIG_PROTOCOL driver performs platform- and policy-dependent
127 /// configuration for the EFI IPv4 Protocol driver.
128 ///
129 struct _EFI_IP4_CONFIG_PROTOCOL {
130 EFI_IP4_CONFIG_START Start;
131 EFI_IP4_CONFIG_STOP Stop;
132 EFI_IP4_CONFIG_GET_DATA GetData;
133 };
134
135 extern EFI_GUID gEfiIp4ConfigProtocolGuid;
136
137 #endif