]> git.proxmox.com Git - mirror_edk2.git/blob - 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
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 #include <Protocol/Ip4.h>
19
20 #define EFI_IP4_CONFIG_PROTOCOL_GUID \
21 { \
22 0x3b95aa31, 0x3793, 0x434b, {0x86, 0x67, 0xc8, 0x07, 0x08, 0x92, 0xe0, 0x5e } \
23 }
24
25 typedef struct _EFI_IP4_CONFIG_PROTOCOL EFI_IP4_CONFIG_PROTOCOL;
26
27 #define IP4_CONFIG_VARIABLE_ATTRIBUTES \
28 (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | \
29 EFI_VARIABLE_RUNTIME_ACCESS )
30
31 typedef struct {
32 EFI_IPv4_ADDRESS StationAddress;
33 EFI_IPv4_ADDRESS SubnetMask;
34 UINT32 RouteTableSize;
35 EFI_IP4_ROUTE_TABLE *RouteTable; //OPTIONAL
36 } EFI_IP4_IPCONFIG_DATA;
37
38
39 /**
40 Starts running the configuration policy for the EFI IPv4 Protocol driver.
41
42 @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
43 @param DoneEvent Event that will be signaled when the EFI IPv4 Protocol driver
44 configuration policy completes execution. This event must be of
45 type EVT_NOTIFY_SIGNAL.
46 @param ReconfigEvent Event that will be signaled when the EFI IPv4 Protocol driver
47 configuration needs to be updated. This event must be of type
48 EVT_NOTIFY_SIGNAL.
49
50 @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol driver is now
51 running.
52 @retval EFI_INVALID_PARAMETER This, DoneEvent, or ReconfigEvent is NULL.
53 @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated.
54 @retval EFI_ALREADY_STARTED The configuration policy for the EFI IPv4 Protocol driver was
55 already started.
56 @retval EFI_DEVICE_ERROR An unexpected system error or network error occurred.
57 @retval EFI_UNSUPPORTED This interface does not support the EFI IPv4 Protocol driver
58 configuration.
59
60 **/
61 typedef
62 EFI_STATUS
63 (EFIAPI *EFI_IP4_CONFIG_START) (
64 IN EFI_IP4_CONFIG_PROTOCOL *This,
65 IN EFI_EVENT DoneEvent,
66 IN EFI_EVENT ReconfigEvent
67 )
68 ;
69
70 /**
71 Stops running the configuration policy for the EFI IPv4 Protocol driver.
72
73 @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
74
75 @retval EFI_SUCCESS The configuration policy for the EFI IPv4 Protocol driver has been stopped.
76 @retval EFI_INVALID_PARAMETER This is NULL.
77 @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol driver was not started.
78
79 **/
80 typedef
81 EFI_STATUS
82 (EFIAPI *EFI_IP4_CONFIG_STOP) (
83 IN EFI_IP4_CONFIG_PROTOCOL *This
84 )
85 ;
86
87 /**
88 Returns the default configuration data (if any) for the EFI IPv4 Protocol driver.
89
90 @param This Pointer to the EFI_IP4_CONFIG_PROTOCOL instance.
91 @param IpConfigDataSize On input, the size of the IpConfigData buffer.
92 On output, the count of bytes that were written into the IpConfigData buffer.
93 @param IpConfigData Pointer to the EFI IPv4 Configuration Protocol driver
94 configuration data structure.
95
96 @retval EFI_SUCCESS The EFI IPv4 Protocol driver configuration has been returned.
97 @retval EFI_INVALID_PARAMETER This is NULL.
98 @retval EFI_NOT_STARTED The configuration policy for the EFI IPv4 Protocol driver is not
99 running.
100 @retval EFI_NOT_READY EFI IPv4 Protocol driver configuration is still running.
101 @retval EFI_ABORTED EFI IPv4 Protocol driver configuration could not complete.
102 @retval EFI_BUFFER_TOO_SMALL *IpConfigDataSize is smaller than the configuration data
103 buffer or IpConfigData is NULL.
104
105 **/
106 typedef
107 EFI_STATUS
108 (EFIAPI *EFI_IP4_CONFIG_GET_DATA) (
109 IN EFI_IP4_CONFIG_PROTOCOL *This,
110 IN OUT UINTN *IpConfigDataSize,
111 OUT EFI_IP4_IPCONFIG_DATA *IpConfigData OPTIONAL
112 )
113 ;
114
115 struct _EFI_IP4_CONFIG_PROTOCOL {
116 EFI_IP4_CONFIG_START Start;
117 EFI_IP4_CONFIG_STOP Stop;
118 EFI_IP4_CONFIG_GET_DATA GetData;
119 };
120
121 extern EFI_GUID gEfiIp4ConfigProtocolGuid;
122
123 #endif