7 Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
8 This software and associated documentation (if any) is furnished
9 under a license and may only be used or copied in accordance
10 with the terms of the license. Except as permitted by such
11 license, no part of this software or documentation may be
12 reproduced, stored in a retrieval system, or transmitted in any
13 form or by any means without the express written consent of
20 EFI Simple Network protocol
26 ///////////////////////////////////////////////////////////////////////////////
28 // Simple Network Protocol
31 #define EFI_SIMPLE_NETWORK_PROTOCOL \
32 { 0xA19832B9, 0xAC25, 0x11D3, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }
35 INTERFACE_DECL(_EFI_SIMPLE_NETWORK);
37 ///////////////////////////////////////////////////////////////////////////////
42 // Total number of frames received. Includes frames with errors and
48 // Number of valid frames received and copied into receive buffers.
53 // Number of frames below the minimum length for the media.
54 // This would be <64 for ethernet.
56 UINT64 RxUndersizeFrames;
59 // Number of frames longer than the maxminum length for the
60 // media. This would be >1500 for ethernet.
62 UINT64 RxOversizeFrames;
65 // Valid frames that were dropped because receive buffers were full.
67 UINT64 RxDroppedFrames;
70 // Number of valid unicast frames received and not dropped.
72 UINT64 RxUnicastFrames;
75 // Number of valid broadcast frames received and not dropped.
77 UINT64 RxBroadcastFrames;
80 // Number of valid mutlicast frames received and not dropped.
82 UINT64 RxMulticastFrames;
85 // Number of frames w/ CRC or alignment errors.
87 UINT64 RxCrcErrorFrames;
90 // Total number of bytes received. Includes frames with errors
91 // and dropped frames.
96 // Transmit statistics.
100 UINT64 TxUndersizeFrames;
101 UINT64 TxOversizeFrames;
102 UINT64 TxDroppedFrames;
103 UINT64 TxUnicastFrames;
104 UINT64 TxBroadcastFrames;
105 UINT64 TxMulticastFrames;
106 UINT64 TxCrcErrorFrames;
110 // Number of collisions detection on this subnet.
115 // Number of frames destined for unsupported protocol.
117 UINT64 UnsupportedProtocol;
119 } EFI_NETWORK_STATISTICS;
121 ///////////////////////////////////////////////////////////////////////////////
125 EfiSimpleNetworkStopped,
126 EfiSimpleNetworkStarted,
127 EfiSimpleNetworkInitialized,
128 EfiSimpleNetworkMaxState
129 } EFI_SIMPLE_NETWORK_STATE;
131 ///////////////////////////////////////////////////////////////////////////////
134 #define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
135 #define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
136 #define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
137 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
138 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
140 ///////////////////////////////////////////////////////////////////////////////
143 #define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
144 #define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
145 #define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
146 #define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
148 ///////////////////////////////////////////////////////////////////////////////
150 #define MAX_MCAST_FILTER_CNT 16
153 UINT32 HwAddressSize;
154 UINT32 MediaHeaderSize;
155 UINT32 MaxPacketSize;
157 UINT32 NvRamAccessSize;
158 UINT32 ReceiveFilterMask;
159 UINT32 ReceiveFilterSetting;
160 UINT32 MaxMCastFilterCount;
161 UINT32 MCastFilterCount;
162 EFI_MAC_ADDRESS MCastFilter[MAX_MCAST_FILTER_CNT];
163 EFI_MAC_ADDRESS CurrentAddress;
164 EFI_MAC_ADDRESS BroadcastAddress;
165 EFI_MAC_ADDRESS PermanentAddress;
167 BOOLEAN MacAddressChangeable;
168 BOOLEAN MultipleTxSupported;
169 BOOLEAN MediaPresentSupported;
170 BOOLEAN MediaPresent;
171 } EFI_SIMPLE_NETWORK_MODE;
173 ///////////////////////////////////////////////////////////////////////////////
178 (EFIAPI *EFI_SIMPLE_NETWORK_START) (
179 IN struct _EFI_SIMPLE_NETWORK *This
182 ///////////////////////////////////////////////////////////////////////////////
187 (EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
188 IN struct _EFI_SIMPLE_NETWORK *This
191 ///////////////////////////////////////////////////////////////////////////////
196 (EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
197 IN struct _EFI_SIMPLE_NETWORK *This,
198 IN UINTN ExtraRxBufferSize OPTIONAL,
199 IN UINTN ExtraTxBufferSize OPTIONAL
202 ///////////////////////////////////////////////////////////////////////////////
207 (EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
208 IN struct _EFI_SIMPLE_NETWORK *This,
209 IN BOOLEAN ExtendedVerification
212 ///////////////////////////////////////////////////////////////////////////////
217 (EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
218 IN struct _EFI_SIMPLE_NETWORK *This
221 ///////////////////////////////////////////////////////////////////////////////
226 (EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
227 IN struct _EFI_SIMPLE_NETWORK *This,
230 IN BOOLEAN ResetMCastFilter,
231 IN UINTN MCastFilterCnt OPTIONAL,
232 IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
235 ///////////////////////////////////////////////////////////////////////////////
240 (EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
241 IN struct _EFI_SIMPLE_NETWORK *This,
243 IN EFI_MAC_ADDRESS *New OPTIONAL
246 ///////////////////////////////////////////////////////////////////////////////
251 (EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
252 IN struct _EFI_SIMPLE_NETWORK *This,
254 IN OUT UINTN *StatisticsSize OPTIONAL,
255 OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
258 ///////////////////////////////////////////////////////////////////////////////
263 (EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
264 IN struct _EFI_SIMPLE_NETWORK *This,
266 IN EFI_IP_ADDRESS *IP,
267 OUT EFI_MAC_ADDRESS *MAC
270 ///////////////////////////////////////////////////////////////////////////////
275 (EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
276 IN struct _EFI_SIMPLE_NETWORK *This,
277 IN BOOLEAN ReadWrite,
283 ///////////////////////////////////////////////////////////////////////////////
288 (EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
289 IN struct _EFI_SIMPLE_NETWORK *This,
290 OUT UINT32 *InterruptStatus OPTIONAL,
291 OUT VOID **TxBuf OPTIONAL
294 ///////////////////////////////////////////////////////////////////////////////
299 (EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
300 IN struct _EFI_SIMPLE_NETWORK *This,
304 IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
305 IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
306 IN UINT16 *Protocol OPTIONAL
309 ///////////////////////////////////////////////////////////////////////////////
314 (EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
315 IN struct _EFI_SIMPLE_NETWORK *This,
316 OUT UINTN *HeaderSize OPTIONAL,
317 IN OUT UINTN *BufferSize,
319 OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
320 OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
321 OUT UINT16 *Protocol OPTIONAL
324 ///////////////////////////////////////////////////////////////////////////////
327 #define EFI_SIMPLE_NETWORK_INTERFACE_REVISION 0x00010000
329 typedef struct _EFI_SIMPLE_NETWORK {
331 EFI_SIMPLE_NETWORK_START Start;
332 EFI_SIMPLE_NETWORK_STOP Stop;
333 EFI_SIMPLE_NETWORK_INITIALIZE Initialize;
334 EFI_SIMPLE_NETWORK_RESET Reset;
335 EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown;
336 EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters;
337 EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress;
338 EFI_SIMPLE_NETWORK_STATISTICS Statistics;
339 EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac;
340 EFI_SIMPLE_NETWORK_NVDATA NvData;
341 EFI_SIMPLE_NETWORK_GET_STATUS GetStatus;
342 EFI_SIMPLE_NETWORK_TRANSMIT Transmit;
343 EFI_SIMPLE_NETWORK_RECEIVE Receive;
344 EFI_EVENT WaitForPacket;
345 EFI_SIMPLE_NETWORK_MODE *Mode;
346 } EFI_SIMPLE_NETWORK;
348 #endif /* _EFINET_H */