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