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