6 Copyright (c) 1999 Intel Corporation
12 EFI Simple Network protocol
18 ///////////////////////////////////////////////////////////////////////////////
20 // Simple Network Protocol
23 #define EFI_SIMPLE_NETWORK_PROTOCOL \
24 { 0xA19832B9, 0xAC25, 0x11D3, {0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D} }
27 INTERFACE_DECL(_EFI_SIMPLE_NETWORK
);
29 ///////////////////////////////////////////////////////////////////////////////
34 // Total number of frames received. Includes frames with errors and
40 // Number of valid frames received and copied into receive buffers.
45 // Number of frames below the minimum length for the media.
46 // This would be <64 for ethernet.
48 UINT64 RxUndersizeFrames
;
51 // Number of frames longer than the maxminum length for the
52 // media. This would be >1500 for ethernet.
54 UINT64 RxOversizeFrames
;
57 // Valid frames that were dropped because receive buffers were full.
59 UINT64 RxDroppedFrames
;
62 // Number of valid unicast frames received and not dropped.
64 UINT64 RxUnicastFrames
;
67 // Number of valid broadcast frames received and not dropped.
69 UINT64 RxBroadcastFrames
;
72 // Number of valid mutlicast frames received and not dropped.
74 UINT64 RxMulticastFrames
;
77 // Number of frames w/ CRC or alignment errors.
79 UINT64 RxCrcErrorFrames
;
82 // Total number of bytes received. Includes frames with errors
83 // and dropped frames.
88 // Transmit statistics.
92 UINT64 TxUndersizeFrames
;
93 UINT64 TxOversizeFrames
;
94 UINT64 TxDroppedFrames
;
95 UINT64 TxUnicastFrames
;
96 UINT64 TxBroadcastFrames
;
97 UINT64 TxMulticastFrames
;
98 UINT64 TxCrcErrorFrames
;
102 // Number of collisions detection on this subnet.
107 // Number of frames destined for unsupported protocol.
109 UINT64 UnsupportedProtocol
;
111 } EFI_NETWORK_STATISTICS
;
113 ///////////////////////////////////////////////////////////////////////////////
117 EfiSimpleNetworkStopped
,
118 EfiSimpleNetworkStarted
,
119 EfiSimpleNetworkInitialized
,
120 EfiSimpleNetworkMaxState
121 } EFI_SIMPLE_NETWORK_STATE
;
123 ///////////////////////////////////////////////////////////////////////////////
126 #define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
127 #define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
128 #define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
129 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
130 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
132 ///////////////////////////////////////////////////////////////////////////////
135 #define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
136 #define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
137 #define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
138 #define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
140 ///////////////////////////////////////////////////////////////////////////////
142 #define MAX_MCAST_FILTER_CNT 16
145 UINT32 HwAddressSize
;
146 UINT32 MediaHeaderSize
;
147 UINT32 MaxPacketSize
;
149 UINT32 NvRamAccessSize
;
150 UINT32 ReceiveFilterMask
;
151 UINT32 ReceiveFilterSetting
;
152 UINT32 MaxMCastFilterCount
;
153 UINT32 MCastFilterCount
;
154 EFI_MAC_ADDRESS MCastFilter
[MAX_MCAST_FILTER_CNT
];
155 EFI_MAC_ADDRESS CurrentAddress
;
156 EFI_MAC_ADDRESS BroadcastAddress
;
157 EFI_MAC_ADDRESS PermanentAddress
;
159 BOOLEAN MacAddressChangeable
;
160 BOOLEAN MultipleTxSupported
;
161 BOOLEAN MediaPresentSupported
;
162 BOOLEAN MediaPresent
;
163 } EFI_SIMPLE_NETWORK_MODE
;
165 ///////////////////////////////////////////////////////////////////////////////
170 (EFIAPI
*EFI_SIMPLE_NETWORK_START
) (
171 IN
struct _EFI_SIMPLE_NETWORK
*This
174 ///////////////////////////////////////////////////////////////////////////////
179 (EFIAPI
*EFI_SIMPLE_NETWORK_STOP
) (
180 IN
struct _EFI_SIMPLE_NETWORK
*This
183 ///////////////////////////////////////////////////////////////////////////////
188 (EFIAPI
*EFI_SIMPLE_NETWORK_INITIALIZE
) (
189 IN
struct _EFI_SIMPLE_NETWORK
*This
,
190 IN UINTN ExtraRxBufferSize OPTIONAL
,
191 IN UINTN ExtraTxBufferSize OPTIONAL
194 ///////////////////////////////////////////////////////////////////////////////
199 (EFIAPI
*EFI_SIMPLE_NETWORK_RESET
) (
200 IN
struct _EFI_SIMPLE_NETWORK
*This
,
201 IN BOOLEAN ExtendedVerification
204 ///////////////////////////////////////////////////////////////////////////////
209 (EFIAPI
*EFI_SIMPLE_NETWORK_SHUTDOWN
) (
210 IN
struct _EFI_SIMPLE_NETWORK
*This
213 ///////////////////////////////////////////////////////////////////////////////
218 (EFIAPI
*EFI_SIMPLE_NETWORK_RECEIVE_FILTERS
) (
219 IN
struct _EFI_SIMPLE_NETWORK
*This
,
222 IN BOOLEAN ResetMCastFilter
,
223 IN UINTN MCastFilterCnt OPTIONAL
,
224 IN EFI_MAC_ADDRESS
*MCastFilter OPTIONAL
227 ///////////////////////////////////////////////////////////////////////////////
232 (EFIAPI
*EFI_SIMPLE_NETWORK_STATION_ADDRESS
) (
233 IN
struct _EFI_SIMPLE_NETWORK
*This
,
235 IN EFI_MAC_ADDRESS
*New OPTIONAL
238 ///////////////////////////////////////////////////////////////////////////////
243 (EFIAPI
*EFI_SIMPLE_NETWORK_STATISTICS
) (
244 IN
struct _EFI_SIMPLE_NETWORK
*This
,
246 IN OUT UINTN
*StatisticsSize OPTIONAL
,
247 OUT EFI_NETWORK_STATISTICS
*StatisticsTable OPTIONAL
250 ///////////////////////////////////////////////////////////////////////////////
255 (EFIAPI
*EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC
) (
256 IN
struct _EFI_SIMPLE_NETWORK
*This
,
258 IN EFI_IP_ADDRESS
*IP
,
259 OUT EFI_MAC_ADDRESS
*MAC
262 ///////////////////////////////////////////////////////////////////////////////
267 (EFIAPI
*EFI_SIMPLE_NETWORK_NVDATA
) (
268 IN
struct _EFI_SIMPLE_NETWORK
*This
,
269 IN BOOLEAN ReadWrite
,
275 ///////////////////////////////////////////////////////////////////////////////
280 (EFIAPI
*EFI_SIMPLE_NETWORK_GET_STATUS
) (
281 IN
struct _EFI_SIMPLE_NETWORK
*This
,
282 OUT UINT32
*InterruptStatus OPTIONAL
,
283 OUT VOID
**TxBuf OPTIONAL
286 ///////////////////////////////////////////////////////////////////////////////
291 (EFIAPI
*EFI_SIMPLE_NETWORK_TRANSMIT
) (
292 IN
struct _EFI_SIMPLE_NETWORK
*This
,
296 IN EFI_MAC_ADDRESS
*SrcAddr OPTIONAL
,
297 IN EFI_MAC_ADDRESS
*DestAddr OPTIONAL
,
298 IN UINT16
*Protocol OPTIONAL
301 ///////////////////////////////////////////////////////////////////////////////
306 (EFIAPI
*EFI_SIMPLE_NETWORK_RECEIVE
) (
307 IN
struct _EFI_SIMPLE_NETWORK
*This
,
308 OUT UINTN
*HeaderSize OPTIONAL
,
309 IN OUT UINTN
*BufferSize
,
311 OUT EFI_MAC_ADDRESS
*SrcAddr OPTIONAL
,
312 OUT EFI_MAC_ADDRESS
*DestAddr OPTIONAL
,
313 OUT UINT16
*Protocol OPTIONAL
316 ///////////////////////////////////////////////////////////////////////////////
319 #define EFI_SIMPLE_NETWORK_INTERFACE_REVISION 0x00010000
321 typedef struct _EFI_SIMPLE_NETWORK
{
323 EFI_SIMPLE_NETWORK_START Start
;
324 EFI_SIMPLE_NETWORK_STOP Stop
;
325 EFI_SIMPLE_NETWORK_INITIALIZE Initialize
;
326 EFI_SIMPLE_NETWORK_RESET Reset
;
327 EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown
;
328 EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters
;
329 EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress
;
330 EFI_SIMPLE_NETWORK_STATISTICS Statistics
;
331 EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac
;
332 EFI_SIMPLE_NETWORK_NVDATA NvData
;
333 EFI_SIMPLE_NETWORK_GET_STATUS GetStatus
;
334 EFI_SIMPLE_NETWORK_TRANSMIT Transmit
;
335 EFI_SIMPLE_NETWORK_RECEIVE Receive
;
336 EFI_EVENT WaitForPacket
;
337 EFI_SIMPLE_NETWORK_MODE
*Mode
;
338 } EFI_SIMPLE_NETWORK
;
340 #endif /* _EFINET_H */