2 * $FreeBSD: src/sys/boot/efi/include/efinet.h,v 1.2 2002/05/19 03:17:20 marcel Exp $
3 * $DragonFly: src/sys/boot/efi/include/efinet.h,v 1.1 2003/11/10 06:08:32 dillon Exp $
10 Copyright (c) 1999 Intel Corporation
16 EFI Simple Network protocol
22 #define EFI_SIMPLE_NETWORK_PROTOCOL \
23 { 0xA19832B9, 0xAC25, 0x11D3, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }
25 INTERFACE_DECL(_EFI_SIMPLE_NETWORK
);
29 * Total number of frames received. Includes frames with errors and
34 /* Number of valid frames received and copied into receive buffers. */
38 * Number of frames below the minimum length for the media.
39 * This would be <64 for ethernet.
41 UINT64 RxUndersizeFrames
;
44 * Number of frames longer than the maxminum length for the
45 * media. This would be >1500 for ethernet.
47 UINT64 RxOversizeFrames
;
49 /* Valid frames that were dropped because receive buffers were full. */
50 UINT64 RxDroppedFrames
;
52 /* Number of valid unicast frames received and not dropped. */
53 UINT64 RxUnicastFrames
;
55 /* Number of valid broadcast frames received and not dropped. */
56 UINT64 RxBroadcastFrames
;
58 /* Number of valid mutlicast frames received and not dropped. */
59 UINT64 RxMulticastFrames
;
61 /* Number of frames w/ CRC or alignment errors. */
62 UINT64 RxCrcErrorFrames
;
65 * Total number of bytes received. Includes frames with errors
70 /* Transmit statistics. */
73 UINT64 TxUndersizeFrames
;
74 UINT64 TxOversizeFrames
;
75 UINT64 TxDroppedFrames
;
76 UINT64 TxUnicastFrames
;
77 UINT64 TxBroadcastFrames
;
78 UINT64 TxMulticastFrames
;
79 UINT64 TxCrcErrorFrames
;
82 /* Number of collisions detection on this subnet. */
85 /* Number of frames destined for unsupported protocol. */
86 UINT64 UnsupportedProtocol
;
88 } EFI_NETWORK_STATISTICS
;
91 EfiSimpleNetworkStopped
,
92 EfiSimpleNetworkStarted
,
93 EfiSimpleNetworkInitialized
,
94 EfiSimpleNetworkMaxState
95 } EFI_SIMPLE_NETWORK_STATE
;
97 #define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
98 #define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
99 #define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
100 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
101 #define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
103 #define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
104 #define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
105 #define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
106 #define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
108 #define MAX_MCAST_FILTER_CNT 16
111 UINT32 HwAddressSize
;
112 UINT32 MediaHeaderSize
;
113 UINT32 MaxPacketSize
;
115 UINT32 NvRamAccessSize
;
116 UINT32 ReceiveFilterMask
;
117 UINT32 ReceiveFilterSetting
;
118 UINT32 MaxMCastFilterCount
;
119 UINT32 MCastFilterCount
;
120 EFI_MAC_ADDRESS MCastFilter
[MAX_MCAST_FILTER_CNT
];
121 EFI_MAC_ADDRESS CurrentAddress
;
122 EFI_MAC_ADDRESS BroadcastAddress
;
123 EFI_MAC_ADDRESS PermanentAddress
;
125 BOOLEAN MacAddressChangeable
;
126 BOOLEAN MultipleTxSupported
;
127 BOOLEAN MediaPresentSupported
;
128 BOOLEAN MediaPresent
;
129 } EFI_SIMPLE_NETWORK_MODE
;
133 (EFIAPI
*EFI_SIMPLE_NETWORK_START
) (
134 IN
struct _EFI_SIMPLE_NETWORK
*This
139 (EFIAPI
*EFI_SIMPLE_NETWORK_STOP
) (
140 IN
struct _EFI_SIMPLE_NETWORK
*This
145 (EFIAPI
*EFI_SIMPLE_NETWORK_INITIALIZE
) (
146 IN
struct _EFI_SIMPLE_NETWORK
*This
,
147 IN UINTN ExtraRxBufferSize OPTIONAL
,
148 IN UINTN ExtraTxBufferSize OPTIONAL
153 (EFIAPI
*EFI_SIMPLE_NETWORK_RESET
) (
154 IN
struct _EFI_SIMPLE_NETWORK
*This
,
155 IN BOOLEAN ExtendedVerification
160 (EFIAPI
*EFI_SIMPLE_NETWORK_SHUTDOWN
) (
161 IN
struct _EFI_SIMPLE_NETWORK
*This
166 (EFIAPI
*EFI_SIMPLE_NETWORK_RECEIVE_FILTERS
) (
167 IN
struct _EFI_SIMPLE_NETWORK
*This
,
170 IN BOOLEAN ResetMCastFilter
,
171 IN UINTN MCastFilterCnt OPTIONAL
,
172 IN EFI_MAC_ADDRESS
*MCastFilter OPTIONAL
177 (EFIAPI
*EFI_SIMPLE_NETWORK_STATION_ADDRESS
) (
178 IN
struct _EFI_SIMPLE_NETWORK
*This
,
180 IN EFI_MAC_ADDRESS
*New OPTIONAL
185 (EFIAPI
*EFI_SIMPLE_NETWORK_STATISTICS
) (
186 IN
struct _EFI_SIMPLE_NETWORK
*This
,
188 IN OUT UINTN
*StatisticsSize OPTIONAL
,
189 OUT EFI_NETWORK_STATISTICS
*StatisticsTable OPTIONAL
194 (EFIAPI
*EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC
) (
195 IN
struct _EFI_SIMPLE_NETWORK
*This
,
197 IN EFI_IP_ADDRESS
*IP
,
198 OUT EFI_MAC_ADDRESS
*MAC
203 (EFIAPI
*EFI_SIMPLE_NETWORK_NVDATA
) (
204 IN
struct _EFI_SIMPLE_NETWORK
*This
,
205 IN BOOLEAN ReadWrite
,
213 (EFIAPI
*EFI_SIMPLE_NETWORK_GET_STATUS
) (
214 IN
struct _EFI_SIMPLE_NETWORK
*This
,
215 OUT UINT32
*InterruptStatus OPTIONAL
,
216 OUT VOID
**TxBuf OPTIONAL
221 (EFIAPI
*EFI_SIMPLE_NETWORK_TRANSMIT
) (
222 IN
struct _EFI_SIMPLE_NETWORK
*This
,
226 IN EFI_MAC_ADDRESS
*SrcAddr OPTIONAL
,
227 IN EFI_MAC_ADDRESS
*DestAddr OPTIONAL
,
228 IN UINT16
*Protocol OPTIONAL
233 (EFIAPI
*EFI_SIMPLE_NETWORK_RECEIVE
) (
234 IN
struct _EFI_SIMPLE_NETWORK
*This
,
235 OUT UINTN
*HeaderSize OPTIONAL
,
236 IN OUT UINTN
*BufferSize
,
238 OUT EFI_MAC_ADDRESS
*SrcAddr OPTIONAL
,
239 OUT EFI_MAC_ADDRESS
*DestAddr OPTIONAL
,
240 OUT UINT16
*Protocol OPTIONAL
243 #define EFI_SIMPLE_NETWORK_INTERFACE_REVISION 0x00010000
245 typedef struct _EFI_SIMPLE_NETWORK
{
247 EFI_SIMPLE_NETWORK_START Start
;
248 EFI_SIMPLE_NETWORK_STOP Stop
;
249 EFI_SIMPLE_NETWORK_INITIALIZE Initialize
;
250 EFI_SIMPLE_NETWORK_RESET Reset
;
251 EFI_SIMPLE_NETWORK_SHUTDOWN Shutdown
;
252 EFI_SIMPLE_NETWORK_RECEIVE_FILTERS ReceiveFilters
;
253 EFI_SIMPLE_NETWORK_STATION_ADDRESS StationAddress
;
254 EFI_SIMPLE_NETWORK_STATISTICS Statistics
;
255 EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC MCastIpToMac
;
256 EFI_SIMPLE_NETWORK_NVDATA NvData
;
257 EFI_SIMPLE_NETWORK_GET_STATUS GetStatus
;
258 EFI_SIMPLE_NETWORK_TRANSMIT Transmit
;
259 EFI_SIMPLE_NETWORK_RECEIVE Receive
;
260 EFI_EVENT WaitForPacket
;
261 EFI_SIMPLE_NETWORK_MODE
*Mode
;
262 } EFI_SIMPLE_NETWORK
;
264 #endif /* _EFINET_H */