00001 /** @file 00002 Simple Network protocol as defined in the UEFI 2.0 specification. 00003 00004 Basic network device abstraction. 00005 00006 Rx - Received 00007 Tx - Transmit 00008 MCast - MultiCast 00009 ... 00010 00011 Copyright (c) 2006 - 2008, Intel Corporation 00012 All rights reserved. This program and the accompanying materials 00013 are licensed and made available under the terms and conditions of the BSD License 00014 which accompanies this distribution. The full text of the license may be found at 00015 http://opensource.org/licenses/bsd-license.php 00016 00017 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 00018 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 00019 00020 **/ 00021 00022 #ifndef __SIMPLE_NETWORK_H__ 00023 #define __SIMPLE_NETWORK_H__ 00024 00025 #define EFI_SIMPLE_NETWORK_PROTOCOL_GUID \ 00026 { \ 00027 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D } \ 00028 } 00029 00030 typedef struct _EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK_PROTOCOL; 00031 00032 00033 /// 00034 /// Protocol defined in EFI1.1. 00035 /// 00036 typedef EFI_SIMPLE_NETWORK_PROTOCOL EFI_SIMPLE_NETWORK; 00037 00038 /// 00039 /// Simple Network Protocol data structures 00040 /// 00041 typedef struct { 00042 /// 00043 /// Total number of frames received. Includes frames with errors and 00044 /// dropped frames. 00045 /// 00046 UINT64 RxTotalFrames; 00047 00048 /// 00049 /// Number of valid frames received and copied into receive buffers. 00050 /// 00051 UINT64 RxGoodFrames; 00052 00053 /// 00054 /// Number of frames below the minimum length for the media. 00055 /// This would be <64 for ethernet. 00056 /// 00057 UINT64 RxUndersizeFrames; 00058 00059 /// 00060 /// Number of frames longer than the maxminum length for the 00061 /// media. This would be >1500 for ethernet. 00062 /// 00063 UINT64 RxOversizeFrames; 00064 00065 /// 00066 /// Valid frames that were dropped because receive buffers were full. 00067 /// 00068 UINT64 RxDroppedFrames; 00069 00070 /// 00071 /// Number of valid unicast frames received and not dropped. 00072 /// 00073 UINT64 RxUnicastFrames; 00074 00075 /// 00076 /// Number of valid broadcast frames received and not dropped. 00077 /// 00078 UINT64 RxBroadcastFrames; 00079 00080 /// 00081 /// Number of valid mutlicast frames received and not dropped. 00082 /// 00083 UINT64 RxMulticastFrames; 00084 00085 /// 00086 /// Number of frames w/ CRC or alignment errors. 00087 /// 00088 UINT64 RxCrcErrorFrames; 00089 00090 /// 00091 /// Total number of bytes received. Includes frames with errors 00092 /// and dropped frames. 00093 // 00094 UINT64 RxTotalBytes; 00095 00096 /// 00097 /// Transmit statistics. 00098 /// 00099 UINT64 TxTotalFrames; 00100 UINT64 TxGoodFrames; 00101 UINT64 TxUndersizeFrames; 00102 UINT64 TxOversizeFrames; 00103 UINT64 TxDroppedFrames; 00104 UINT64 TxUnicastFrames; 00105 UINT64 TxBroadcastFrames; 00106 UINT64 TxMulticastFrames; 00107 UINT64 TxCrcErrorFrames; 00108 UINT64 TxTotalBytes; 00109 00110 /// 00111 /// Number of collisions detection on this subnet. 00112 /// 00113 UINT64 Collisions; 00114 00115 /// 00116 /// Number of frames destined for unsupported protocol. 00117 /// 00118 UINT64 UnsupportedProtocol; 00119 00120 } EFI_NETWORK_STATISTICS; 00121 00122 typedef enum { 00123 EfiSimpleNetworkStopped, 00124 EfiSimpleNetworkStarted, 00125 EfiSimpleNetworkInitialized, 00126 EfiSimpleNetworkMaxState 00127 } EFI_SIMPLE_NETWORK_STATE; 00128 00129 #define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01 00130 #define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02 00131 #define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04 00132 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08 00133 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10 00134 00135 #define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01 00136 #define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02 00137 #define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04 00138 #define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08 00139 00140 #define MAX_MCAST_FILTER_CNT 16 00141 typedef struct { 00142 UINT32 State; 00143 UINT32 HwAddressSize; 00144 UINT32 MediaHeaderSize; 00145 UINT32 MaxPacketSize; 00146 UINT32 NvRamSize; 00147 UINT32 NvRamAccessSize; 00148 UINT32 ReceiveFilterMask; 00149 UINT32 ReceiveFilterSetting; 00150 UINT32 MaxMCastFilterCount; 00151 UINT32 MCastFilterCount; 00152 EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT]; 00153 EFI_MAC_ADDRESS CurrentAddress; 00154 EFI_MAC_ADDRESS BroadcastAddress; 00155 EFI_MAC_ADDRESS PermanentAddress; 00156 UINT8 IfType; 00157 BOOLEAN MacAddressChangeable; 00158 BOOLEAN MultipleTxSupported; 00159 BOOLEAN MediaPresentSupported; 00160 BOOLEAN MediaPresent; 00161 } EFI_SIMPLE_NETWORK_MODE; 00162 00163 // 00164 // Protocol Member Functions 00165 // 00166 /** 00167 Changes the state of a network interface from "stopped" to "started". 00168 00169 @param This Protocol instance pointer. 00170 00171 @retval EFI_SUCCESS The network interface was started. 00172 @retval EFI_ALREADY_STARTED The network interface is already in the started state. 00173 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00174 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00175 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00176 00177 **/ 00178 typedef 00179 EFI_STATUS 00180 (EFIAPI *EFI_SIMPLE_NETWORK_START)( 00181 IN EFI_SIMPLE_NETWORK_PROTOCOL *This 00182 ); 00183 00184 /** 00185 Changes the state of a network interface from "started" to "stopped". 00186 00187 @param This Protocol instance pointer. 00188 00189 @retval EFI_SUCCESS The network interface was stopped. 00190 @retval EFI_ALREADY_STARTED The network interface is already in the stopped state. 00191 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00192 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00193 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00194 00195 **/ 00196 typedef 00197 EFI_STATUS 00198 (EFIAPI *EFI_SIMPLE_NETWORK_STOP)( 00199 IN EFI_SIMPLE_NETWORK_PROTOCOL *This 00200 ); 00201 00202 /** 00203 Resets a network adapter and allocates the transmit and receive buffers 00204 required by the network interface; optionally, also requests allocation 00205 of additional transmit and receive buffers. 00206 00207 @param This Protocol instance pointer. 00208 @param ExtraRxBufferSize The size, in bytes, of the extra receive buffer space 00209 that the driver should allocate for the network interface. 00210 Some network interfaces will not be able to use the extra 00211 buffer, and the caller will not know if it is actually 00212 being used. 00213 @param ExtraTxBufferSize The size, in bytes, of the extra transmit buffer space 00214 that the driver should allocate for the network interface. 00215 Some network interfaces will not be able to use the extra 00216 buffer, and the caller will not know if it is actually 00217 being used. 00218 00219 @retval EFI_SUCCESS The network interface was initialized. 00220 @retval EFI_NOT_STARTED The network interface has not been started 00221 @retval EFI_OUT_OF_RESOURCES There was not enough memory for the transmit and 00222 receive buffers. . 00223 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00224 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00225 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00226 00227 **/ 00228 typedef 00229 EFI_STATUS 00230 (EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE)( 00231 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00232 IN UINTN ExtraRxBufferSize OPTIONAL, 00233 IN UINTN ExtraTxBufferSize OPTIONAL 00234 ); 00235 00236 /** 00237 Resets a network adapter and re-initializes it with the parameters that were 00238 provided in the previous call to Initialize(). 00239 00240 @param This Protocol instance pointer. 00241 @param ExtendedVerification Indicates that the driver may perform a more 00242 exhaustive verification operation of the device 00243 during reset. 00244 00245 @retval EFI_SUCCESS The network interface was reset. 00246 @retval EFI_NOT_STARTED The network interface has not been started 00247 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00248 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00249 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00250 00251 **/ 00252 typedef 00253 EFI_STATUS 00254 (EFIAPI *EFI_SIMPLE_NETWORK_RESET)( 00255 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00256 IN BOOLEAN ExtendedVerification 00257 ); 00258 00259 /** 00260 Resets a network adapter and leaves it in a state that is safe for 00261 another driver to initialize. 00262 00263 @param This Protocol instance pointer. 00264 00265 @retval EFI_SUCCESS The network interface was shutdown. 00266 @retval EFI_NOT_STARTED The network interface has not been started 00267 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00268 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00269 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00270 00271 **/ 00272 typedef 00273 EFI_STATUS 00274 (EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN)( 00275 IN EFI_SIMPLE_NETWORK_PROTOCOL *This 00276 ); 00277 00278 /** 00279 Manages the multicast receive filters of a network interface. 00280 00281 @param This Protocol instance pointer. 00282 @param Enable A bit mask of receive filters to enable on the network interface. 00283 @param Disable A bit mask of receive filters to disable on the network interface. 00284 @param ResetMCastFilter Set to TRUE to reset the contents of the multicast receive 00285 filters on the network interface to their default values. 00286 @param McastFilterCnt Number of multicast HW MAC addresses in the new 00287 MCastFilter list. This value must be less than or equal to 00288 the MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This 00289 field is optional if ResetMCastFilter is TRUE. 00290 @param MCastFilter A pointer to a list of new multicast receive filter HW MAC 00291 addresses. This list will replace any existing multicast 00292 HW MAC address list. This field is optional if 00293 ResetMCastFilter is TRUE. 00294 00295 @retval EFI_SUCCESS The multicast receive filter list was updated. 00296 @retval EFI_NOT_STARTED The network interface has not been started 00297 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00298 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00299 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00300 00301 **/ 00302 typedef 00303 EFI_STATUS 00304 (EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS)( 00305 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00306 IN UINT32 Enable, 00307 IN UINT32 Disable, 00308 IN BOOLEAN ResetMCastFilter, 00309 IN UINTN MCastFilterCnt OPTIONAL, 00310 IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL 00311 ); 00312 00313 /** 00314 Modifies or resets the current station address, if supported. 00315 00316 @param This Protocol instance pointer. 00317 @param Reset Flag used to reset the station address to the network interfaces 00318 permanent address. 00319 @param New New station address to be used for the network interface. 00320 00321 @retval EFI_SUCCESS The network interfaces station address was updated. 00322 @retval EFI_NOT_STARTED The network interface has not been started 00323 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00324 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00325 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00326 00327 **/ 00328 typedef 00329 EFI_STATUS 00330 (EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS)( 00331 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00332 IN BOOLEAN Reset, 00333 IN EFI_MAC_ADDRESS *New OPTIONAL 00334 ); 00335 00336 /** 00337 Resets or collects the statistics on a network interface. 00338 00339 @param This Protocol instance pointer. 00340 @param Reset Set to TRUE to reset the statistics for the network interface. 00341 @param StatisticsSize On input the size, in bytes, of StatisticsTable. On 00342 output the size, in bytes, of the resulting table of 00343 statistics. 00344 @param StatisticsTable A pointer to the EFI_NETWORK_STATISTICS structure that 00345 contains the statistics. 00346 00347 @retval EFI_SUCCESS The statistics were collected from the network interface. 00348 @retval EFI_NOT_STARTED The network interface has not been started. 00349 @retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer 00350 size needed to hold the statistics is returned in 00351 StatisticsSize. 00352 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00353 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00354 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00355 00356 **/ 00357 typedef 00358 EFI_STATUS 00359 (EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS)( 00360 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00361 IN BOOLEAN Reset, 00362 IN OUT UINTN *StatisticsSize OPTIONAL, 00363 OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL 00364 ); 00365 00366 /** 00367 Converts a multicast IP address to a multicast HW MAC address. 00368 00369 @param This Protocol instance pointer. 00370 @param IPv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set 00371 to FALSE if the multicast IP address is IPv4 [RFC 791]. 00372 @param IP The multicast IP address that is to be converted to a multicast 00373 HW MAC address. 00374 @param MAC The multicast HW MAC address that is to be generated from IP. 00375 00376 @retval EFI_SUCCESS The multicast IP address was mapped to the multicast 00377 HW MAC address. 00378 @retval EFI_NOT_STARTED The network interface has not been started. 00379 @retval EFI_BUFFER_TOO_SMALL The Statistics buffer was too small. The current buffer 00380 size needed to hold the statistics is returned in 00381 StatisticsSize. 00382 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00383 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00384 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00385 00386 **/ 00387 typedef 00388 EFI_STATUS 00389 (EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC)( 00390 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00391 IN BOOLEAN IPv6, 00392 IN EFI_IP_ADDRESS *IP, 00393 OUT EFI_MAC_ADDRESS *MAC 00394 ); 00395 00396 /** 00397 Performs read and write operations on the NVRAM device attached to a 00398 network interface. 00399 00400 @param This Protocol instance pointer. 00401 @param ReadWrite TRUE for read operations, FALSE for write operations. 00402 @param Offset Byte offset in the NVRAM device at which to start the read or 00403 write operation. This must be a multiple of NvRamAccessSize and 00404 less than NvRamSize. 00405 @param BufferSize The number of bytes to read or write from the NVRAM device. 00406 This must also be a multiple of NvramAccessSize. 00407 @param Buffer A pointer to the data buffer. 00408 00409 @retval EFI_SUCCESS The NVRAM access was performed. 00410 @retval EFI_NOT_STARTED The network interface has not been started. 00411 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00412 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00413 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00414 00415 **/ 00416 typedef 00417 EFI_STATUS 00418 (EFIAPI *EFI_SIMPLE_NETWORK_NVDATA)( 00419 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00420 IN BOOLEAN ReadWrite, 00421 IN UINTN Offset, 00422 IN UINTN BufferSize, 00423 IN OUT VOID *Buffer 00424 ); 00425 00426 /** 00427 Reads the current interrupt status and recycled transmit buffer status from 00428 a network interface. 00429 00430 @param This Protocol instance pointer. 00431 @param InterruptStatus A pointer to the bit mask of the currently active interrupts 00432 If this is NULL, the interrupt status will not be read from 00433 the device. If this is not NULL, the interrupt status will 00434 be read from the device. When the interrupt status is read, 00435 it will also be cleared. Clearing the transmit interrupt 00436 does not empty the recycled transmit buffer array. 00437 @param TxBuf Recycled transmit buffer address. The network interface will 00438 not transmit if its internal recycled transmit buffer array 00439 is full. Reading the transmit buffer does not clear the 00440 transmit interrupt. If this is NULL, then the transmit buffer 00441 status will not be read. If there are no transmit buffers to 00442 recycle and TxBuf is not NULL, * TxBuf will be set to NULL. 00443 00444 @retval EFI_SUCCESS The status of the network interface was retrieved. 00445 @retval EFI_NOT_STARTED The network interface has not been started. 00446 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00447 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00448 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00449 00450 **/ 00451 typedef 00452 EFI_STATUS 00453 (EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS)( 00454 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00455 OUT UINT32 *InterruptStatus OPTIONAL, 00456 OUT VOID **TxBuf OPTIONAL 00457 ); 00458 00459 /** 00460 Places a packet in the transmit queue of a network interface. 00461 00462 @param This Protocol instance pointer. 00463 @param HeaderSize The size, in bytes, of the media header to be filled in by 00464 the Transmit() function. If HeaderSize is non-zero, then it 00465 must be equal to This->Mode->MediaHeaderSize and the DestAddr 00466 and Protocol parameters must not be NULL. 00467 @param BufferSize The size, in bytes, of the entire packet (media header and 00468 data) to be transmitted through the network interface. 00469 @param Buffer A pointer to the packet (media header followed by data) to be 00470 transmitted. This parameter cannot be NULL. If HeaderSize is zero, 00471 then the media header in Buffer must already be filled in by the 00472 caller. If HeaderSize is non-zero, then the media header will be 00473 filled in by the Transmit() function. 00474 @param SrcAddr The source HW MAC address. If HeaderSize is zero, then this parameter 00475 is ignored. If HeaderSize is non-zero and SrcAddr is NULL, then 00476 This->Mode->CurrentAddress is used for the source HW MAC address. 00477 @param DsetAddr The destination HW MAC address. If HeaderSize is zero, then this 00478 parameter is ignored. 00479 @param Protocol The type of header to build. If HeaderSize is zero, then this 00480 parameter is ignored. See RFC 1700, section "Ether Types", for 00481 examples. 00482 00483 @retval EFI_SUCCESS The packet was placed on the transmit queue. 00484 @retval EFI_NOT_STARTED The network interface has not been started. 00485 @retval EFI_NOT_READY The network interface is too busy to accept this transmit request. 00486 @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small. 00487 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00488 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00489 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00490 00491 **/ 00492 typedef 00493 EFI_STATUS 00494 (EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT)( 00495 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00496 IN UINTN HeaderSize, 00497 IN UINTN BufferSize, 00498 IN VOID *Buffer, 00499 IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL, 00500 IN EFI_MAC_ADDRESS *DestAddr OPTIONAL, 00501 IN UINT16 *Protocol OPTIONAL 00502 ); 00503 00504 /** 00505 Receives a packet from a network interface. 00506 00507 @param This Protocol instance pointer. 00508 @param HeaderSize The size, in bytes, of the media header received on the network 00509 interface. If this parameter is NULL, then the media header size 00510 will not be returned. 00511 @param BufferSize On entry, the size, in bytes, of Buffer. On exit, the size, in 00512 bytes, of the packet that was received on the network interface. 00513 @param Buffer A pointer to the data buffer to receive both the media header and 00514 the data. 00515 @param SrcAddr The source HW MAC address. If this parameter is NULL, the 00516 HW MAC source address will not be extracted from the media 00517 header. 00518 @param DsetAddr The destination HW MAC address. If this parameter is NULL, 00519 the HW MAC destination address will not be extracted from the 00520 media header. 00521 @param Protocol The media header type. If this parameter is NULL, then the 00522 protocol will not be extracted from the media header. See 00523 RFC 1700 section "Ether Types" for examples. 00524 00525 @retval EFI_SUCCESS The received data was stored in Buffer, and BufferSize has 00526 been updated to the number of bytes received. 00527 @retval EFI_NOT_STARTED The network interface has not been started. 00528 @retval EFI_NOT_READY The network interface is too busy to accept this transmit 00529 request. 00530 @retval EFI_BUFFER_TOO_SMALL The BufferSize parameter is too small. 00531 @retval EFI_INVALID_PARAMETER One or more of the parameters has an unsupported value. 00532 @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. 00533 @retval EFI_UNSUPPORTED This function is not supported by the network interface. 00534 00535 **/ 00536 typedef 00537 EFI_STATUS 00538 (EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE)( 00539 IN EFI_SIMPLE_NETWORK_PROTOCOL *This, 00540 OUT UINTN *HeaderSize OPTIONAL, 00541 IN OUT UINTN *BufferSize, 00542 OUT VOID *Buffer, 00543 OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL, 00544 OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL, 00545 OUT UINT16 *Protocol OPTIONAL 00546 ); 00547 00548 #define EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 0x00010000 00549 00550 // 00551 // Revision defined in EFI1.1 00552 // 00553 #define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION 00554 00555 /// 00556 /// The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access 00557 /// to a network adapter. Once the network adapter initializes, 00558 /// the EFI_SIMPLE_NETWORK_PROTOCOL protocol provides services that 00559 /// allow packets to be transmitted and received. 00560 /// 00561 struct _EFI_SIMPLE_NETWORK_PROTOCOL { 00562 /// 00563 /// Revision of the EFI_SIMPLE_NETWORK_PROTOCOL. All future revisions must 00564 /// be backwards compatible. If a future version is not backwards compatible 00565 /// it is not the same GUID. 00566 /// 00567 UINT64 Revision; 00568 EFI_SIMPLE_NETWORK_START Start; 00569 EFI_SIMPLE_NETWORK_STOP Stop; 00570 EFI_SIMPLE_NETWORK_INITIALIZE Initialize; 00571 EFI_SIMPLE_NETWORK_RESET Reset; 00572 EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown; 00573 EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters; 00574 EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress; 00575 EFI_SIMPLE_NETWORK_STATISTICS Statistics; 00576 EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac; 00577 EFI_SIMPLE_NETWORK_NVDATA NvData; 00578 EFI_SIMPLE_NETWORK_GET_STATUS GetStatus; 00579 EFI_SIMPLE_NETWORK_TRANSMIT Transmit; 00580 EFI_SIMPLE_NETWORK_RECEIVE Receive; 00581 /// 00582 /// Event used with WaitForEvent() to wait for a packet to be received. 00583 /// 00584 EFI_EVENT WaitForPacket; 00585 /// 00586 /// Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device. 00587 /// 00588 EFI_SIMPLE_NETWORK_MODE *Mode; 00589 }; 00590 00591 extern EFI_GUID gEfiSimpleNetworkProtocolGuid; 00592 00593 #endif
1.5.7.1