1d1f950002362305fcd4c30f108ef7b76679f5843yshang/** @file
24ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao  UDP4 Service Binding Protocol as defined in UEFI specification.
3842f5579c7e2a313f56c576e4c5150f7f4793079AJFISH
44ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao  The EFI UDPv4 Protocol provides simple packet-oriented services
54ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao  to transmit and receive UDP packets.
64ca9b6c4e7dbbcf94f21b54f41f761cefc6b1086lgao
7d551cc64cdf1f943744294819220b78a60b10822Fu SiyuanCopyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
8af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterThis program and the accompanying materials are licensed and made available under
9af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterthe terms and conditions of the BSD License that accompanies this distribution.
10af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterThe full text of the license may be found at
11af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterhttp://opensource.org/licenses/bsd-license.php.
12af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter
13af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14af2dc6a70b9380d702bd0720cdb029d630c505e3myronporterWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
155899caf003c444820082f35098b68c678457b6bcvanjeff
165899caf003c444820082f35098b68c678457b6bcvanjeff  @par Revision Reference:
17af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  This Protocol is introduced in UEFI Specification 2.0.
18d1f950002362305fcd4c30f108ef7b76679f5843yshang
19d1f950002362305fcd4c30f108ef7b76679f5843yshang**/
20d1f950002362305fcd4c30f108ef7b76679f5843yshang
21d1f950002362305fcd4c30f108ef7b76679f5843yshang#ifndef __EFI_UDP4_PROTOCOL_H__
22d1f950002362305fcd4c30f108ef7b76679f5843yshang#define __EFI_UDP4_PROTOCOL_H__
23d1f950002362305fcd4c30f108ef7b76679f5843yshang
24d1f950002362305fcd4c30f108ef7b76679f5843yshang#include <Protocol/Ip4.h>
25d1f950002362305fcd4c30f108ef7b76679f5843yshang//
26d1f950002362305fcd4c30f108ef7b76679f5843yshang//GUID definitions
27d1f950002362305fcd4c30f108ef7b76679f5843yshang//
28d1f950002362305fcd4c30f108ef7b76679f5843yshang#define EFI_UDP4_SERVICE_BINDING_PROTOCOL_GUID \
29d1f950002362305fcd4c30f108ef7b76679f5843yshang  { \
30d1f950002362305fcd4c30f108ef7b76679f5843yshang    0x83f01464, 0x99bd, 0x45e5, {0xb3, 0x83, 0xaf, 0x63, 0x05, 0xd8, 0xe9, 0xe6 } \
31d1f950002362305fcd4c30f108ef7b76679f5843yshang  }
32d1f950002362305fcd4c30f108ef7b76679f5843yshang
33d1f950002362305fcd4c30f108ef7b76679f5843yshang#define EFI_UDP4_PROTOCOL_GUID \
34d1f950002362305fcd4c30f108ef7b76679f5843yshang  { \
35d1f950002362305fcd4c30f108ef7b76679f5843yshang    0x3ad9df29, 0x4501, 0x478d, {0xb1, 0xf8, 0x7f, 0x7f, 0xe7, 0x0e, 0x50, 0xf3 } \
36d1f950002362305fcd4c30f108ef7b76679f5843yshang  }
37d1f950002362305fcd4c30f108ef7b76679f5843yshang
38d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct _EFI_UDP4_PROTOCOL EFI_UDP4_PROTOCOL;
39d1f950002362305fcd4c30f108ef7b76679f5843yshang
40d551cc64cdf1f943744294819220b78a60b10822Fu Siyuan///
41d551cc64cdf1f943744294819220b78a60b10822Fu Siyuan/// EFI_UDP4_SERVICE_POINT is deprecated in the UEFI 2.4B and should not be used any more.
42d551cc64cdf1f943744294819220b78a60b10822Fu Siyuan/// The definition in here is only present to provide backwards compatability.
43d551cc64cdf1f943744294819220b78a60b10822Fu Siyuan///
44d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct {
45d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_HANDLE              InstanceHandle;
46d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_IPv4_ADDRESS        LocalAddress;
47d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT16                  LocalPort;
48d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_IPv4_ADDRESS        RemoteAddress;
49d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT16                  RemotePort;
50d1f950002362305fcd4c30f108ef7b76679f5843yshang} EFI_UDP4_SERVICE_POINT;
51d1f950002362305fcd4c30f108ef7b76679f5843yshang
52d551cc64cdf1f943744294819220b78a60b10822Fu Siyuan///
53d551cc64cdf1f943744294819220b78a60b10822Fu Siyuan/// EFI_UDP4_VARIABLE_DATA is deprecated in the UEFI 2.4B and should not be used any more.
54d551cc64cdf1f943744294819220b78a60b10822Fu Siyuan/// The definition in here is only present to provide backwards compatability.
55d551cc64cdf1f943744294819220b78a60b10822Fu Siyuan///
56d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct {
57d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_HANDLE              DriverHandle;
58d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT32                  ServiceCount;
59d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_SERVICE_POINT  Services[1];
60d1f950002362305fcd4c30f108ef7b76679f5843yshang} EFI_UDP4_VARIABLE_DATA;
61d1f950002362305fcd4c30f108ef7b76679f5843yshang
62d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct {
63d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT32             FragmentLength;
64d1f950002362305fcd4c30f108ef7b76679f5843yshang  VOID               *FragmentBuffer;
65d1f950002362305fcd4c30f108ef7b76679f5843yshang} EFI_UDP4_FRAGMENT_DATA;
66d1f950002362305fcd4c30f108ef7b76679f5843yshang
67d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct {
68d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_IPv4_ADDRESS   SourceAddress;
69d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT16             SourcePort;
70d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_IPv4_ADDRESS   DestinationAddress;
71d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT16             DestinationPort;
72d1f950002362305fcd4c30f108ef7b76679f5843yshang} EFI_UDP4_SESSION_DATA;
73d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct {
74d1f950002362305fcd4c30f108ef7b76679f5843yshang  //
75d1f950002362305fcd4c30f108ef7b76679f5843yshang  // Receiving Filters
76d1f950002362305fcd4c30f108ef7b76679f5843yshang  //
77d1f950002362305fcd4c30f108ef7b76679f5843yshang  BOOLEAN            AcceptBroadcast;
78d1f950002362305fcd4c30f108ef7b76679f5843yshang  BOOLEAN            AcceptPromiscuous;
79d1f950002362305fcd4c30f108ef7b76679f5843yshang  BOOLEAN            AcceptAnyPort;
80d1f950002362305fcd4c30f108ef7b76679f5843yshang  BOOLEAN            AllowDuplicatePort;
81d1f950002362305fcd4c30f108ef7b76679f5843yshang  //
82d1f950002362305fcd4c30f108ef7b76679f5843yshang  // I/O parameters
83d1f950002362305fcd4c30f108ef7b76679f5843yshang  //
84d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT8              TypeOfService;
85d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT8              TimeToLive;
86d1f950002362305fcd4c30f108ef7b76679f5843yshang  BOOLEAN            DoNotFragment;
87d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT32             ReceiveTimeout;
88d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT32             TransmitTimeout;
89d1f950002362305fcd4c30f108ef7b76679f5843yshang  //
90d1f950002362305fcd4c30f108ef7b76679f5843yshang  // Access Point
91d1f950002362305fcd4c30f108ef7b76679f5843yshang  //
92d1f950002362305fcd4c30f108ef7b76679f5843yshang  BOOLEAN            UseDefaultAddress;
93d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_IPv4_ADDRESS   StationAddress;
94d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_IPv4_ADDRESS   SubnetMask;
95d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT16             StationPort;
96d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_IPv4_ADDRESS   RemoteAddress;
97d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT16             RemotePort;
98d1f950002362305fcd4c30f108ef7b76679f5843yshang} EFI_UDP4_CONFIG_DATA;
99d1f950002362305fcd4c30f108ef7b76679f5843yshang
100d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct {
101d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_SESSION_DATA     *UdpSessionData;       //OPTIONAL
102d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_IPv4_ADDRESS          *GatewayAddress;       //OPTIONAL
103d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT32                    DataLength;
104d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT32                    FragmentCount;
105d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_FRAGMENT_DATA    FragmentTable[1];
106d1f950002362305fcd4c30f108ef7b76679f5843yshang} EFI_UDP4_TRANSMIT_DATA;
107d1f950002362305fcd4c30f108ef7b76679f5843yshang
108d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct {
109d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_TIME                  TimeStamp;
110d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_EVENT                 RecycleSignal;
111d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_SESSION_DATA     UdpSession;
112d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT32                    DataLength;
113d1f950002362305fcd4c30f108ef7b76679f5843yshang  UINT32                    FragmentCount;
114d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_FRAGMENT_DATA    FragmentTable[1];
115d1f950002362305fcd4c30f108ef7b76679f5843yshang} EFI_UDP4_RECEIVE_DATA;
116d1f950002362305fcd4c30f108ef7b76679f5843yshang
117d1f950002362305fcd4c30f108ef7b76679f5843yshang
118d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef struct {
119d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_EVENT                 Event;
120d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_STATUS                Status;
121d1f950002362305fcd4c30f108ef7b76679f5843yshang  union {
122d1f950002362305fcd4c30f108ef7b76679f5843yshang    EFI_UDP4_RECEIVE_DATA   *RxData;
123d1f950002362305fcd4c30f108ef7b76679f5843yshang    EFI_UDP4_TRANSMIT_DATA  *TxData;
124d1f950002362305fcd4c30f108ef7b76679f5843yshang  } Packet;
125d1f950002362305fcd4c30f108ef7b76679f5843yshang} EFI_UDP4_COMPLETION_TOKEN;
126d1f950002362305fcd4c30f108ef7b76679f5843yshang
127d1f950002362305fcd4c30f108ef7b76679f5843yshang/**
128d1f950002362305fcd4c30f108ef7b76679f5843yshang  Reads the current operational settings.
129d1f950002362305fcd4c30f108ef7b76679f5843yshang
13030c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The GetModeData() function copies the current operational settings of this EFI
13130c99a724cc3fda9ee853157e07af72335c3f7e3jgong  UDPv4 Protocol instance into user-supplied buffers. This function is used
13230c99a724cc3fda9ee853157e07af72335c3f7e3jgong  optionally to retrieve the operational mode data of underlying networks or
13330c99a724cc3fda9ee853157e07af72335c3f7e3jgong  drivers.
13430c99a724cc3fda9ee853157e07af72335c3f7e3jgong
135af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  This           The pointer to the EFI_UDP4_PROTOCOL instance.
136af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  Udp4ConfigData The pointer to the buffer to receive the current configuration data.
137af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  Ip4ModeData    The pointer to the EFI IPv4 Protocol mode data structure.
138af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  MnpConfigData  The pointer to the managed network configuration data structure.
139af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  SnpModeData    The pointer to the simple network mode data structure.
140d1f950002362305fcd4c30f108ef7b76679f5843yshang
141d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_SUCCESS           The mode data was read.
142d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_STARTED       When Udp4ConfigData is queried, no configuration data is
143d1f950002362305fcd4c30f108ef7b76679f5843yshang                                available because this instance has not been started.
144d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_INVALID_PARAMETER This is NULL.
145d1f950002362305fcd4c30f108ef7b76679f5843yshang
146d1f950002362305fcd4c30f108ef7b76679f5843yshang**/
147d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef
148d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS
1498b13229b469f05ec22d76098b052bd6e943feceeklu(EFIAPI *EFI_UDP4_GET_MODE_DATA)(
150d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN  EFI_UDP4_PROTOCOL                *This,
151d1f950002362305fcd4c30f108ef7b76679f5843yshang  OUT EFI_UDP4_CONFIG_DATA             *Udp4ConfigData OPTIONAL,
152d1f950002362305fcd4c30f108ef7b76679f5843yshang  OUT EFI_IP4_MODE_DATA                *Ip4ModeData    OPTIONAL,
153d1f950002362305fcd4c30f108ef7b76679f5843yshang  OUT EFI_MANAGED_NETWORK_CONFIG_DATA  *MnpConfigData  OPTIONAL,
154d1f950002362305fcd4c30f108ef7b76679f5843yshang  OUT EFI_SIMPLE_NETWORK_MODE          *SnpModeData    OPTIONAL
155ed66e1bc0d2be0a185fc47adab4930c3b7e2767fvanjeff  );
156d1f950002362305fcd4c30f108ef7b76679f5843yshang
157d1f950002362305fcd4c30f108ef7b76679f5843yshang
158d1f950002362305fcd4c30f108ef7b76679f5843yshang/**
159d1f950002362305fcd4c30f108ef7b76679f5843yshang  Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4
160d1f950002362305fcd4c30f108ef7b76679f5843yshang  Protocol.
16130c99a724cc3fda9ee853157e07af72335c3f7e3jgong
16230c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The Configure() function is used to do the following:
16330c99a724cc3fda9ee853157e07af72335c3f7e3jgong  * Initialize and start this instance of the EFI UDPv4 Protocol.
16430c99a724cc3fda9ee853157e07af72335c3f7e3jgong  * Change the filtering rules and operational parameters.
16530c99a724cc3fda9ee853157e07af72335c3f7e3jgong  * Reset this instance of the EFI UDPv4 Protocol.
16630c99a724cc3fda9ee853157e07af72335c3f7e3jgong  Until these parameters are initialized, no network traffic can be sent or
16730c99a724cc3fda9ee853157e07af72335c3f7e3jgong  received by this instance. This instance can be also reset by calling Configure()
16830c99a724cc3fda9ee853157e07af72335c3f7e3jgong  with UdpConfigData set to NULL. Once reset, the receiving queue and transmitting
16930c99a724cc3fda9ee853157e07af72335c3f7e3jgong  queue are flushed and no traffic is allowed through this instance.
17030c99a724cc3fda9ee853157e07af72335c3f7e3jgong  With different parameters in UdpConfigData, Configure() can be used to bind
17130c99a724cc3fda9ee853157e07af72335c3f7e3jgong  this instance to specified port.
172d1f950002362305fcd4c30f108ef7b76679f5843yshang
173af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  This           The pointer to the EFI_UDP4_PROTOCOL instance.
174af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  Udp4ConfigData The pointer to the buffer to receive the current configuration data.
175d1f950002362305fcd4c30f108ef7b76679f5843yshang
176d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_SUCCESS           The configuration settings were set, changed, or reset successfully.
177d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NO_MAPPING        When using a default address, configuration (DHCP, BOOTP,
178d1f950002362305fcd4c30f108ef7b76679f5843yshang                                RARP, etc.) is not finished yet.
179a89fa50ccf7a29405e3d24c49625dbd70cdba9famyronporter  @retval EFI_INVALID_PARAMETER This is NULL.
180a89fa50ccf7a29405e3d24c49625dbd70cdba9famyronporter  @retval EFI_INVALID_PARAMETER UdpConfigData.StationAddress is not a valid unicast IPv4 address.
181852d89119109fd27d58278988a0060a13559e894qhuang  @retval EFI_INVALID_PARAMETER UdpConfigData.SubnetMask is not a valid IPv4 address mask. The subnet
182852d89119109fd27d58278988a0060a13559e894qhuang                                mask must be contiguous.
183852d89119109fd27d58278988a0060a13559e894qhuang  @retval EFI_INVALID_PARAMETER UdpConfigData.RemoteAddress is not a valid unicast IPv4 address if it
184852d89119109fd27d58278988a0060a13559e894qhuang                                is not zero.
185d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_ALREADY_STARTED   The EFI UDPv4 Protocol instance is already started/configured
186d1f950002362305fcd4c30f108ef7b76679f5843yshang                                and must be stopped/reset before it can be reconfigured.
187d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_ACCESS_DENIED     UdpConfigData. AllowDuplicatePort is FALSE
188d1f950002362305fcd4c30f108ef7b76679f5843yshang                                and UdpConfigData.StationPort is already used by
189d1f950002362305fcd4c30f108ef7b76679f5843yshang                                other instance.
190d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_OUT_OF_RESOURCES  The EFI UDPv4 Protocol driver cannot allocate memory for this
191d1f950002362305fcd4c30f108ef7b76679f5843yshang                                EFI UDPv4 Protocol instance.
192d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_DEVICE_ERROR      An unexpected network or system error occurred and this instance
193d1f950002362305fcd4c30f108ef7b76679f5843yshang                                 was not opened.
194d1f950002362305fcd4c30f108ef7b76679f5843yshang
195d1f950002362305fcd4c30f108ef7b76679f5843yshang**/
196d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef
197d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS
1988b13229b469f05ec22d76098b052bd6e943feceeklu(EFIAPI *EFI_UDP4_CONFIGURE)(
199d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_PROTOCOL      *This,
200d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_CONFIG_DATA   *UdpConfigData OPTIONAL
201ed66e1bc0d2be0a185fc47adab4930c3b7e2767fvanjeff  );
202d1f950002362305fcd4c30f108ef7b76679f5843yshang
203d1f950002362305fcd4c30f108ef7b76679f5843yshang/**
204d1f950002362305fcd4c30f108ef7b76679f5843yshang  Joins and leaves multicast groups.
20530c99a724cc3fda9ee853157e07af72335c3f7e3jgong
20630c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The Groups() function is used to enable and disable the multicast group
20730c99a724cc3fda9ee853157e07af72335c3f7e3jgong  filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all
20830c99a724cc3fda9ee853157e07af72335c3f7e3jgong  currently joined groups are left.
209d1f950002362305fcd4c30f108ef7b76679f5843yshang
210af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  This             The pointer to the EFI_UDP4_PROTOCOL instance.
211d1f950002362305fcd4c30f108ef7b76679f5843yshang  @param  JoinFlag         Set to TRUE to join a multicast group. Set to FALSE to leave one
212d1f950002362305fcd4c30f108ef7b76679f5843yshang                           or all multicast groups.
213af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  MulticastAddress The pointer to multicast group address to join or leave.
214d1f950002362305fcd4c30f108ef7b76679f5843yshang
215d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_SUCCESS           The operation completed successfully.
216d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_STARTED       The EFI UDPv4 Protocol instance has not been started.
217d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NO_MAPPING        When using a default address, configuration (DHCP, BOOTP,
218d1f950002362305fcd4c30f108ef7b76679f5843yshang                                RARP, etc.) is not finished yet.
219d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_OUT_OF_RESOURCES  Could not allocate resources to join the group.
220d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
221d1f950002362305fcd4c30f108ef7b76679f5843yshang                                - This is NULL.
222d1f950002362305fcd4c30f108ef7b76679f5843yshang                                - JoinFlag is TRUE and MulticastAddress is NULL.
223d1f950002362305fcd4c30f108ef7b76679f5843yshang                                - JoinFlag is TRUE and *MulticastAddress is not
224d1f950002362305fcd4c30f108ef7b76679f5843yshang                                  a valid multicast address.
225d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_ALREADY_STARTED   The group address is already in the group table (when
226d1f950002362305fcd4c30f108ef7b76679f5843yshang                                JoinFlag is TRUE).
227d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_FOUND         The group address is not in the group table (when JoinFlag is
228d1f950002362305fcd4c30f108ef7b76679f5843yshang                                FALSE).
229d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_DEVICE_ERROR      An unexpected system or network error occurred.
230d1f950002362305fcd4c30f108ef7b76679f5843yshang
231d1f950002362305fcd4c30f108ef7b76679f5843yshang**/
232d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef
233d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS
2348b13229b469f05ec22d76098b052bd6e943feceeklu(EFIAPI *EFI_UDP4_GROUPS)(
235d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_PROTOCOL      *This,
236d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN BOOLEAN                JoinFlag,
237d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_IPv4_ADDRESS       *MulticastAddress    OPTIONAL
238ed66e1bc0d2be0a185fc47adab4930c3b7e2767fvanjeff  );
239d1f950002362305fcd4c30f108ef7b76679f5843yshang
240d1f950002362305fcd4c30f108ef7b76679f5843yshang/**
241d1f950002362305fcd4c30f108ef7b76679f5843yshang  Adds and deletes routing table entries.
24230c99a724cc3fda9ee853157e07af72335c3f7e3jgong
24330c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The Routes() function adds a route to or deletes a route from the routing table.
24430c99a724cc3fda9ee853157e07af72335c3f7e3jgong  Routes are determined by comparing the SubnetAddress with the destination IP
24530c99a724cc3fda9ee853157e07af72335c3f7e3jgong  address and arithmetically AND-ing it with the SubnetMask. The gateway address
24630c99a724cc3fda9ee853157e07af72335c3f7e3jgong  must be on the same subnet as the configured station address.
24730c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The default route is added with SubnetAddress and SubnetMask both set to 0.0.0.0.
24830c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The default route matches all destination IP addresses that do not match any
24930c99a724cc3fda9ee853157e07af72335c3f7e3jgong  other routes.
25030c99a724cc3fda9ee853157e07af72335c3f7e3jgong  A zero GatewayAddress is a nonroute. Packets are sent to the destination IP
25130c99a724cc3fda9ee853157e07af72335c3f7e3jgong  address if it can be found in the Address Resolution Protocol (ARP) cache or
25230c99a724cc3fda9ee853157e07af72335c3f7e3jgong  on the local subnet. One automatic nonroute entry will be inserted into the
25330c99a724cc3fda9ee853157e07af72335c3f7e3jgong  routing table for outgoing packets that are addressed to a local subnet
25430c99a724cc3fda9ee853157e07af72335c3f7e3jgong  (gateway address of 0.0.0.0).
25530c99a724cc3fda9ee853157e07af72335c3f7e3jgong  Each instance of the EFI UDPv4 Protocol has its own independent routing table.
25630c99a724cc3fda9ee853157e07af72335c3f7e3jgong  Instances of the EFI UDPv4 Protocol that use the default IP address will also
25730c99a724cc3fda9ee853157e07af72335c3f7e3jgong  have copies of the routing table provided by the EFI_IP4_CONFIG_PROTOCOL. These
25830c99a724cc3fda9ee853157e07af72335c3f7e3jgong  copies will be updated automatically whenever the IP driver reconfigures its
25930c99a724cc3fda9ee853157e07af72335c3f7e3jgong  instances; as a result, the previous modification to these copies will be lost.
260d1f950002362305fcd4c30f108ef7b76679f5843yshang
261af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  This           The pointer to the EFI_UDP4_PROTOCOL instance.
262d1f950002362305fcd4c30f108ef7b76679f5843yshang  @param  DeleteRoute    Set to TRUE to delete this route from the routing table.
263d1f950002362305fcd4c30f108ef7b76679f5843yshang                         Set to FALSE to add this route to the routing table.
264d1f950002362305fcd4c30f108ef7b76679f5843yshang  @param  SubnetAddress  The destination network address that needs to be routed.
265d1f950002362305fcd4c30f108ef7b76679f5843yshang  @param  SubnetMask     The subnet mask of SubnetAddress.
266d1f950002362305fcd4c30f108ef7b76679f5843yshang  @param  GatewayAddress The gateway IP address for this route.
267d1f950002362305fcd4c30f108ef7b76679f5843yshang
268d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_SUCCESS           The operation completed successfully.
269d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_STARTED       The EFI UDPv4 Protocol instance has not been started.
270d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NO_MAPPING        When using a default address, configuration (DHCP, BOOTP,
271d1f950002362305fcd4c30f108ef7b76679f5843yshang                                - RARP, etc.) is not finished yet.
272d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
273d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_OUT_OF_RESOURCES  Could not add the entry to the routing table.
274d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_FOUND         This route is not in the routing table.
275d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_ACCESS_DENIED     The route is already defined in the routing table.
276d1f950002362305fcd4c30f108ef7b76679f5843yshang
277d1f950002362305fcd4c30f108ef7b76679f5843yshang**/
278d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef
279d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS
2808b13229b469f05ec22d76098b052bd6e943feceeklu(EFIAPI *EFI_UDP4_ROUTES)(
281d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_PROTOCOL      *This,
282d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN BOOLEAN                DeleteRoute,
283d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_IPv4_ADDRESS       *SubnetAddress,
284d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_IPv4_ADDRESS       *SubnetMask,
285d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_IPv4_ADDRESS       *GatewayAddress
286ed66e1bc0d2be0a185fc47adab4930c3b7e2767fvanjeff  );
287d1f950002362305fcd4c30f108ef7b76679f5843yshang
288d1f950002362305fcd4c30f108ef7b76679f5843yshang/**
289d1f950002362305fcd4c30f108ef7b76679f5843yshang  Polls for incoming data packets and processes outgoing data packets.
29030c99a724cc3fda9ee853157e07af72335c3f7e3jgong
29130c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The Poll() function can be used by network drivers and applications to increase
29230c99a724cc3fda9ee853157e07af72335c3f7e3jgong  the rate that data packets are moved between the communications device and the
29330c99a724cc3fda9ee853157e07af72335c3f7e3jgong  transmit and receive queues.
29430c99a724cc3fda9ee853157e07af72335c3f7e3jgong  In some systems, the periodic timer event in the managed network driver may not
29530c99a724cc3fda9ee853157e07af72335c3f7e3jgong  poll the underlying communications device fast enough to transmit and/or receive
29630c99a724cc3fda9ee853157e07af72335c3f7e3jgong  all data packets without missing incoming packets or dropping outgoing packets.
29730c99a724cc3fda9ee853157e07af72335c3f7e3jgong  Drivers and applications that are experiencing packet loss should try calling
29830c99a724cc3fda9ee853157e07af72335c3f7e3jgong  the Poll() function more often.
299d1f950002362305fcd4c30f108ef7b76679f5843yshang
300af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  This The pointer to the EFI_UDP4_PROTOCOL instance.
301d1f950002362305fcd4c30f108ef7b76679f5843yshang
302d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_SUCCESS           Incoming or outgoing data was processed.
303d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_INVALID_PARAMETER This is NULL.
304d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_DEVICE_ERROR      An unexpected system or network error occurred.
305d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_TIMEOUT           Data was dropped out of the transmit and/or receive queue.
306d1f950002362305fcd4c30f108ef7b76679f5843yshang
307d1f950002362305fcd4c30f108ef7b76679f5843yshang**/
308d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef
309d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS
3108b13229b469f05ec22d76098b052bd6e943feceeklu(EFIAPI *EFI_UDP4_POLL)(
311d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_PROTOCOL      *This
312ed66e1bc0d2be0a185fc47adab4930c3b7e2767fvanjeff  );
313d1f950002362305fcd4c30f108ef7b76679f5843yshang
314d1f950002362305fcd4c30f108ef7b76679f5843yshang/**
315d1f950002362305fcd4c30f108ef7b76679f5843yshang  Places an asynchronous receive request into the receiving queue.
31630c99a724cc3fda9ee853157e07af72335c3f7e3jgong
31730c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The Receive() function places a completion token into the receive packet queue.
31830c99a724cc3fda9ee853157e07af72335c3f7e3jgong  This function is always asynchronous.
31930c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The caller must fill in the Token.Event field in the completion token, and this
32030c99a724cc3fda9ee853157e07af72335c3f7e3jgong  field cannot be NULL. When the receive operation completes, the EFI UDPv4 Protocol
32130c99a724cc3fda9ee853157e07af72335c3f7e3jgong  driver updates the Token.Status and Token.Packet.RxData fields and the Token.Event
32230c99a724cc3fda9ee853157e07af72335c3f7e3jgong  is signaled. Providing a proper notification function and context for the event
32330c99a724cc3fda9ee853157e07af72335c3f7e3jgong  will enable the user to receive the notification and receiving status. That
32430c99a724cc3fda9ee853157e07af72335c3f7e3jgong  notification function is guaranteed to not be re-entered.
325d1f950002362305fcd4c30f108ef7b76679f5843yshang
326af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  This  The pointer to the EFI_UDP4_PROTOCOL instance.
327af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  Token The pointer to a token that is associated with the receive data
328d1f950002362305fcd4c30f108ef7b76679f5843yshang                descriptor.
329d1f950002362305fcd4c30f108ef7b76679f5843yshang
330d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_SUCCESS           The receive completion token was cached.
331d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_STARTED       This EFI UDPv4 Protocol instance has not been started.
332d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NO_MAPPING        When using a default address, configuration (DHCP, BOOTP, RARP, etc.)
333d1f950002362305fcd4c30f108ef7b76679f5843yshang                                is not finished yet.
334a89fa50ccf7a29405e3d24c49625dbd70cdba9famyronporter  @retval EFI_INVALID_PARAMETER This is NULL.
335852d89119109fd27d58278988a0060a13559e894qhuang  @retval EFI_INVALID_PARAMETER Token is NULL.
336852d89119109fd27d58278988a0060a13559e894qhuang  @retval EFI_INVALID_PARAMETER Token.Event is NULL.
337d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_OUT_OF_RESOURCES  The receive completion token could not be queued due to a lack of system
338d1f950002362305fcd4c30f108ef7b76679f5843yshang                                resources (usually memory).
339d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_DEVICE_ERROR      An unexpected system or network error occurred.
340d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_ACCESS_DENIED     A receive completion token with the same Token.Event was already in
341d1f950002362305fcd4c30f108ef7b76679f5843yshang                                the receive queue.
342d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_READY         The receive request could not be queued because the receive queue is full.
343d1f950002362305fcd4c30f108ef7b76679f5843yshang
344d1f950002362305fcd4c30f108ef7b76679f5843yshang**/
345d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef
346d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS
3478b13229b469f05ec22d76098b052bd6e943feceeklu(EFIAPI *EFI_UDP4_RECEIVE)(
348d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_PROTOCOL          *This,
349d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_COMPLETION_TOKEN  *Token
350ed66e1bc0d2be0a185fc47adab4930c3b7e2767fvanjeff  );
351d1f950002362305fcd4c30f108ef7b76679f5843yshang
352d1f950002362305fcd4c30f108ef7b76679f5843yshang/**
353d1f950002362305fcd4c30f108ef7b76679f5843yshang  Queues outgoing data packets into the transmit queue.
35430c99a724cc3fda9ee853157e07af72335c3f7e3jgong
35530c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The Transmit() function places a sending request to this instance of the EFI
35630c99a724cc3fda9ee853157e07af72335c3f7e3jgong  UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever
35730c99a724cc3fda9ee853157e07af72335c3f7e3jgong  the packet in the token is sent out or some errors occur, the Token.Event will
35830c99a724cc3fda9ee853157e07af72335c3f7e3jgong  be signaled and Token.Status is updated. Providing a proper notification function
35930c99a724cc3fda9ee853157e07af72335c3f7e3jgong  and context for the event will enable the user to receive the notification and
36030c99a724cc3fda9ee853157e07af72335c3f7e3jgong  transmitting status.
361d1f950002362305fcd4c30f108ef7b76679f5843yshang
362af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  This  The pointer to the EFI_UDP4_PROTOCOL instance.
363af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  Token The pointer to the completion token that will be placed into the
364d1f950002362305fcd4c30f108ef7b76679f5843yshang                transmit queue.
365d1f950002362305fcd4c30f108ef7b76679f5843yshang
366d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_SUCCESS           The data has been queued for transmission.
367d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_STARTED       This EFI UDPv4 Protocol instance has not been started.
368d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NO_MAPPING        When using a default address, configuration (DHCP, BOOTP,
369d1f950002362305fcd4c30f108ef7b76679f5843yshang                                RARP, etc.) is not finished yet.
370d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_INVALID_PARAMETER One or more parameters are invalid.
371d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_ACCESS_DENIED     The transmit completion token with the same
372d1f950002362305fcd4c30f108ef7b76679f5843yshang                                Token.Event was already in the transmit queue.
373d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_READY         The completion token could not be queued because the
374d1f950002362305fcd4c30f108ef7b76679f5843yshang                                transmit queue is full.
375d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_OUT_OF_RESOURCES  Could not queue the transmit data.
376d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_NOT_FOUND         There is no route to the destination network or address.
377d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval EFI_BAD_BUFFER_SIZE   The data length is greater than the maximum UDP packet
378d1f950002362305fcd4c30f108ef7b76679f5843yshang                                size. Or the length of the IP header + UDP header + data
379d1f950002362305fcd4c30f108ef7b76679f5843yshang                                length is greater than MTU if DoNotFragment is TRUE.
380d1f950002362305fcd4c30f108ef7b76679f5843yshang
381d1f950002362305fcd4c30f108ef7b76679f5843yshang**/
382d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef
383d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS
3848b13229b469f05ec22d76098b052bd6e943feceeklu(EFIAPI *EFI_UDP4_TRANSMIT)(
385d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_PROTOCOL           *This,
386d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_COMPLETION_TOKEN   *Token
387ed66e1bc0d2be0a185fc47adab4930c3b7e2767fvanjeff  );
388d1f950002362305fcd4c30f108ef7b76679f5843yshang
389d1f950002362305fcd4c30f108ef7b76679f5843yshang/**
390d1f950002362305fcd4c30f108ef7b76679f5843yshang  Aborts an asynchronous transmit or receive request.
39130c99a724cc3fda9ee853157e07af72335c3f7e3jgong
39230c99a724cc3fda9ee853157e07af72335c3f7e3jgong  The Cancel() function is used to abort a pending transmit or receive request.
39330c99a724cc3fda9ee853157e07af72335c3f7e3jgong  If the token is in the transmit or receive request queues, after calling this
39430c99a724cc3fda9ee853157e07af72335c3f7e3jgong  function, Token.Status will be set to EFI_ABORTED and then Token.Event will be
39530c99a724cc3fda9ee853157e07af72335c3f7e3jgong  signaled. If the token is not in one of the queues, which usually means that
39630c99a724cc3fda9ee853157e07af72335c3f7e3jgong  the asynchronous operation has completed, this function will not signal the
39730c99a724cc3fda9ee853157e07af72335c3f7e3jgong  token and EFI_NOT_FOUND is returned.
398d1f950002362305fcd4c30f108ef7b76679f5843yshang
399af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  This  The pointer to the EFI_UDP4_PROTOCOL instance.
400af2dc6a70b9380d702bd0720cdb029d630c505e3myronporter  @param  Token The pointer to a token that has been issued by
401d1f950002362305fcd4c30f108ef7b76679f5843yshang                EFI_UDP4_PROTOCOL.Transmit() or
402d1f950002362305fcd4c30f108ef7b76679f5843yshang                EFI_UDP4_PROTOCOL.Receive().If NULL, all pending
403d1f950002362305fcd4c30f108ef7b76679f5843yshang                tokens are aborted.
404d1f950002362305fcd4c30f108ef7b76679f5843yshang
405d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval  EFI_SUCCESS           The asynchronous I/O request was aborted and Token.Event
406d1f950002362305fcd4c30f108ef7b76679f5843yshang                                 was signaled. When Token is NULL, all pending requests are
407d1f950002362305fcd4c30f108ef7b76679f5843yshang                                 aborted and their events are signaled.
408d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval  EFI_INVALID_PARAMETER This is NULL.
409d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval  EFI_NOT_STARTED       This instance has not been started.
410d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval  EFI_NO_MAPPING        When using the default address, configuration (DHCP, BOOTP,
411d1f950002362305fcd4c30f108ef7b76679f5843yshang                                 RARP, etc.) is not finished yet.
412d1f950002362305fcd4c30f108ef7b76679f5843yshang  @retval  EFI_NOT_FOUND         When Token is not NULL, the asynchronous I/O request was
413d1f950002362305fcd4c30f108ef7b76679f5843yshang                                 not found in the transmit or receive queue. It has either completed
414d1f950002362305fcd4c30f108ef7b76679f5843yshang                                 or was not issued by Transmit() and Receive().
415d1f950002362305fcd4c30f108ef7b76679f5843yshang
416d1f950002362305fcd4c30f108ef7b76679f5843yshang**/
417d1f950002362305fcd4c30f108ef7b76679f5843yshangtypedef
418d1f950002362305fcd4c30f108ef7b76679f5843yshangEFI_STATUS
419d1f950002362305fcd4c30f108ef7b76679f5843yshang(EFIAPI *EFI_UDP4_CANCEL)(
420d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_PROTOCOL          *This,
421d1f950002362305fcd4c30f108ef7b76679f5843yshang  IN EFI_UDP4_COMPLETION_TOKEN  *Token  OPTIONAL
422ed66e1bc0d2be0a185fc47adab4930c3b7e2767fvanjeff  );
423d1f950002362305fcd4c30f108ef7b76679f5843yshang
42444717a398fddc4df1f4aeaa70bcd7a043187ed34xli///
42544717a398fddc4df1f4aeaa70bcd7a043187ed34xli/// The EFI_UDP4_PROTOCOL defines an EFI UDPv4 Protocol session that can be used
42644717a398fddc4df1f4aeaa70bcd7a043187ed34xli/// by any network drivers, applications, or daemons to transmit or receive UDP packets.
42744717a398fddc4df1f4aeaa70bcd7a043187ed34xli/// This protocol instance can either be bound to a specified port as a service or
42844717a398fddc4df1f4aeaa70bcd7a043187ed34xli/// connected to some remote peer as an active client. Each instance has its own settings,
42944717a398fddc4df1f4aeaa70bcd7a043187ed34xli/// such as the routing table and group table, which are independent from each other.
43044717a398fddc4df1f4aeaa70bcd7a043187ed34xli///
431d1f950002362305fcd4c30f108ef7b76679f5843yshangstruct _EFI_UDP4_PROTOCOL {
432d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_GET_MODE_DATA        GetModeData;
433d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_CONFIGURE            Configure;
434d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_GROUPS               Groups;
435d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_ROUTES               Routes;
436d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_TRANSMIT             Transmit;
437d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_RECEIVE              Receive;
438d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_CANCEL               Cancel;
439d1f950002362305fcd4c30f108ef7b76679f5843yshang  EFI_UDP4_POLL                 Poll;
440d1f950002362305fcd4c30f108ef7b76679f5843yshang};
441d1f950002362305fcd4c30f108ef7b76679f5843yshang
442d1f950002362305fcd4c30f108ef7b76679f5843yshangextern EFI_GUID gEfiUdp4ServiceBindingProtocolGuid;
443d1f950002362305fcd4c30f108ef7b76679f5843yshangextern EFI_GUID gEfiUdp4ProtocolGuid;
444d1f950002362305fcd4c30f108ef7b76679f5843yshang
445d1f950002362305fcd4c30f108ef7b76679f5843yshang#endif
446