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