Deleted Added
full compact
efinet.h (96893) efinet.h (163898)
1/* $FreeBSD: head/sys/boot/efi/include/efinet.h 96893 2002-05-19 03:17:22Z marcel $ */
1/* $FreeBSD: head/sys/boot/efi/include/efinet.h 163898 2006-11-02 02:42:48Z marcel $ */
2#ifndef _EFINET_H
3#define _EFINET_H
4
5
6/*++
2#ifndef _EFINET_H
3#define _EFINET_H
4
5
6/*++
7Copyright (c) 1999 Intel Corporation
7Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
8This software and associated documentation (if any) is furnished
9under a license and may only be used or copied in accordance
10with the terms of the license. Except as permitted by such
11license, no part of this software or documentation may be
12reproduced, stored in a retrieval system, or transmitted in any
13form or by any means without the express written consent of
14Intel Corporation.
8
9Module Name:
10 efinet.h
11
12Abstract:
13 EFI Simple Network protocol
14
15Revision History
16--*/
17
18
15
16Module Name:
17 efinet.h
18
19Abstract:
20 EFI Simple Network protocol
21
22Revision History
23--*/
24
25
26///////////////////////////////////////////////////////////////////////////////
27//
28// Simple Network Protocol
29//
30
19#define EFI_SIMPLE_NETWORK_PROTOCOL \
20 { 0xA19832B9, 0xAC25, 0x11D3, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }
21
31#define EFI_SIMPLE_NETWORK_PROTOCOL \
32 { 0xA19832B9, 0xAC25, 0x11D3, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }
33
34
22INTERFACE_DECL(_EFI_SIMPLE_NETWORK);
23
35INTERFACE_DECL(_EFI_SIMPLE_NETWORK);
36
37///////////////////////////////////////////////////////////////////////////////
38//
39
24typedef struct {
40typedef struct {
25 /*
26 * Total number of frames received. Includes frames with errors and
27 * dropped frames.
28 */
41 //
42 // Total number of frames received. Includes frames with errors and
43 // dropped frames.
44 //
29 UINT64 RxTotalFrames;
30
45 UINT64 RxTotalFrames;
46
31 /* Number of valid frames received and copied into receive buffers. */
47 //
48 // Number of valid frames received and copied into receive buffers.
49 //
32 UINT64 RxGoodFrames;
33
50 UINT64 RxGoodFrames;
51
34 /*
35 * Number of frames below the minimum length for the media.
36 * This would be <64 for ethernet.
37 */
52 //
53 // Number of frames below the minimum length for the media.
54 // This would be <64 for ethernet.
55 //
38 UINT64 RxUndersizeFrames;
39
56 UINT64 RxUndersizeFrames;
57
40 /*
41 * Number of frames longer than the maxminum length for the
42 * media. This would be >1500 for ethernet.
43 */
58 //
59 // Number of frames longer than the maxminum length for the
60 // media. This would be >1500 for ethernet.
61 //
44 UINT64 RxOversizeFrames;
45
62 UINT64 RxOversizeFrames;
63
46 /* Valid frames that were dropped because receive buffers were full. */
64 //
65 // Valid frames that were dropped because receive buffers were full.
66 //
47 UINT64 RxDroppedFrames;
48
67 UINT64 RxDroppedFrames;
68
49 /* Number of valid unicast frames received and not dropped. */
69 //
70 // Number of valid unicast frames received and not dropped.
71 //
50 UINT64 RxUnicastFrames;
51
72 UINT64 RxUnicastFrames;
73
52 /* Number of valid broadcast frames received and not dropped. */
74 //
75 // Number of valid broadcast frames received and not dropped.
76 //
53 UINT64 RxBroadcastFrames;
54
77 UINT64 RxBroadcastFrames;
78
55 /* Number of valid mutlicast frames received and not dropped. */
79 //
80 // Number of valid mutlicast frames received and not dropped.
81 //
56 UINT64 RxMulticastFrames;
57
82 UINT64 RxMulticastFrames;
83
58 /* Number of frames w/ CRC or alignment errors. */
84 //
85 // Number of frames w/ CRC or alignment errors.
86 //
59 UINT64 RxCrcErrorFrames;
60
87 UINT64 RxCrcErrorFrames;
88
61 /*
62 * Total number of bytes received. Includes frames with errors
63 * and dropped frames.
64 */
89 //
90 // Total number of bytes received. Includes frames with errors
91 // and dropped frames.
92 //
65 UINT64 RxTotalBytes;
66
93 UINT64 RxTotalBytes;
94
67 /* Transmit statistics. */
95 //
96 // Transmit statistics.
97 //
68 UINT64 TxTotalFrames;
69 UINT64 TxGoodFrames;
70 UINT64 TxUndersizeFrames;
71 UINT64 TxOversizeFrames;
72 UINT64 TxDroppedFrames;
73 UINT64 TxUnicastFrames;
74 UINT64 TxBroadcastFrames;
75 UINT64 TxMulticastFrames;
76 UINT64 TxCrcErrorFrames;
77 UINT64 TxTotalBytes;
78
98 UINT64 TxTotalFrames;
99 UINT64 TxGoodFrames;
100 UINT64 TxUndersizeFrames;
101 UINT64 TxOversizeFrames;
102 UINT64 TxDroppedFrames;
103 UINT64 TxUnicastFrames;
104 UINT64 TxBroadcastFrames;
105 UINT64 TxMulticastFrames;
106 UINT64 TxCrcErrorFrames;
107 UINT64 TxTotalBytes;
108
79 /* Number of collisions detection on this subnet. */
109 //
110 // Number of collisions detection on this subnet.
111 //
80 UINT64 Collisions;
81
112 UINT64 Collisions;
113
82 /* Number of frames destined for unsupported protocol. */
114 //
115 // Number of frames destined for unsupported protocol.
116 //
83 UINT64 UnsupportedProtocol;
84
85} EFI_NETWORK_STATISTICS;
86
117 UINT64 UnsupportedProtocol;
118
119} EFI_NETWORK_STATISTICS;
120
121///////////////////////////////////////////////////////////////////////////////
122//
123
87typedef enum {
88 EfiSimpleNetworkStopped,
89 EfiSimpleNetworkStarted,
90 EfiSimpleNetworkInitialized,
91 EfiSimpleNetworkMaxState
92} EFI_SIMPLE_NETWORK_STATE;
93
124typedef enum {
125 EfiSimpleNetworkStopped,
126 EfiSimpleNetworkStarted,
127 EfiSimpleNetworkInitialized,
128 EfiSimpleNetworkMaxState
129} EFI_SIMPLE_NETWORK_STATE;
130
131///////////////////////////////////////////////////////////////////////////////
132//
133
94#define EFI_SIMPLE_NETWORK_RECEIVE_UNICAST 0x01
95#define EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST 0x02
96#define EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST 0x04
97#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS 0x08
98#define EFI_SIMPLE_NETWORK_RECEIVE_PROMISCUOUS_MULTICAST 0x10
99
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
139
140///////////////////////////////////////////////////////////////////////////////
141//
142
100#define EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT 0x01
101#define EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT 0x02
102#define EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT 0x04
103#define EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT 0x08
104
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
147
148///////////////////////////////////////////////////////////////////////////////
149//
105#define MAX_MCAST_FILTER_CNT 16
106typedef struct {
107 UINT32 State;
108 UINT32 HwAddressSize;
109 UINT32 MediaHeaderSize;
110 UINT32 MaxPacketSize;
111 UINT32 NvRamSize;
112 UINT32 NvRamAccessSize;

--- 7 unchanged lines hidden (view full) ---

120 EFI_MAC_ADDRESS PermanentAddress;
121 UINT8 IfType;
122 BOOLEAN MacAddressChangeable;
123 BOOLEAN MultipleTxSupported;
124 BOOLEAN MediaPresentSupported;
125 BOOLEAN MediaPresent;
126} EFI_SIMPLE_NETWORK_MODE;
127
150#define MAX_MCAST_FILTER_CNT 16
151typedef struct {
152 UINT32 State;
153 UINT32 HwAddressSize;
154 UINT32 MediaHeaderSize;
155 UINT32 MaxPacketSize;
156 UINT32 NvRamSize;
157 UINT32 NvRamAccessSize;

--- 7 unchanged lines hidden (view full) ---

165 EFI_MAC_ADDRESS PermanentAddress;
166 UINT8 IfType;
167 BOOLEAN MacAddressChangeable;
168 BOOLEAN MultipleTxSupported;
169 BOOLEAN MediaPresentSupported;
170 BOOLEAN MediaPresent;
171} EFI_SIMPLE_NETWORK_MODE;
172
173///////////////////////////////////////////////////////////////////////////////
174//
175
128typedef
129EFI_STATUS
130(EFIAPI *EFI_SIMPLE_NETWORK_START) (
131 IN struct _EFI_SIMPLE_NETWORK *This
132);
133
176typedef
177EFI_STATUS
178(EFIAPI *EFI_SIMPLE_NETWORK_START) (
179 IN struct _EFI_SIMPLE_NETWORK *This
180);
181
182///////////////////////////////////////////////////////////////////////////////
183//
184
134typedef
135EFI_STATUS
136(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
137 IN struct _EFI_SIMPLE_NETWORK *This
138);
139
185typedef
186EFI_STATUS
187(EFIAPI *EFI_SIMPLE_NETWORK_STOP) (
188 IN struct _EFI_SIMPLE_NETWORK *This
189);
190
191///////////////////////////////////////////////////////////////////////////////
192//
193
140typedef
141EFI_STATUS
142(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
143 IN struct _EFI_SIMPLE_NETWORK *This,
144 IN UINTN ExtraRxBufferSize OPTIONAL,
145 IN UINTN ExtraTxBufferSize OPTIONAL
146);
147
194typedef
195EFI_STATUS
196(EFIAPI *EFI_SIMPLE_NETWORK_INITIALIZE) (
197 IN struct _EFI_SIMPLE_NETWORK *This,
198 IN UINTN ExtraRxBufferSize OPTIONAL,
199 IN UINTN ExtraTxBufferSize OPTIONAL
200);
201
202///////////////////////////////////////////////////////////////////////////////
203//
204
148typedef
149EFI_STATUS
150(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
151 IN struct _EFI_SIMPLE_NETWORK *This,
152 IN BOOLEAN ExtendedVerification
153);
154
205typedef
206EFI_STATUS
207(EFIAPI *EFI_SIMPLE_NETWORK_RESET) (
208 IN struct _EFI_SIMPLE_NETWORK *This,
209 IN BOOLEAN ExtendedVerification
210);
211
212///////////////////////////////////////////////////////////////////////////////
213//
214
155typedef
156EFI_STATUS
157(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
158 IN struct _EFI_SIMPLE_NETWORK *This
159);
160
215typedef
216EFI_STATUS
217(EFIAPI *EFI_SIMPLE_NETWORK_SHUTDOWN) (
218 IN struct _EFI_SIMPLE_NETWORK *This
219);
220
221///////////////////////////////////////////////////////////////////////////////
222//
223
161typedef
162EFI_STATUS
163(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
164 IN struct _EFI_SIMPLE_NETWORK *This,
165 IN UINT32 Enable,
166 IN UINT32 Disable,
167 IN BOOLEAN ResetMCastFilter,
168 IN UINTN MCastFilterCnt OPTIONAL,
169 IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
170);
171
224typedef
225EFI_STATUS
226(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE_FILTERS) (
227 IN struct _EFI_SIMPLE_NETWORK *This,
228 IN UINT32 Enable,
229 IN UINT32 Disable,
230 IN BOOLEAN ResetMCastFilter,
231 IN UINTN MCastFilterCnt OPTIONAL,
232 IN EFI_MAC_ADDRESS *MCastFilter OPTIONAL
233);
234
235///////////////////////////////////////////////////////////////////////////////
236//
237
172typedef
173EFI_STATUS
174(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
175 IN struct _EFI_SIMPLE_NETWORK *This,
176 IN BOOLEAN Reset,
177 IN EFI_MAC_ADDRESS *New OPTIONAL
178);
179
238typedef
239EFI_STATUS
240(EFIAPI *EFI_SIMPLE_NETWORK_STATION_ADDRESS) (
241 IN struct _EFI_SIMPLE_NETWORK *This,
242 IN BOOLEAN Reset,
243 IN EFI_MAC_ADDRESS *New OPTIONAL
244);
245
246///////////////////////////////////////////////////////////////////////////////
247//
248
180typedef
181EFI_STATUS
182(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
183 IN struct _EFI_SIMPLE_NETWORK *This,
184 IN BOOLEAN Reset,
185 IN OUT UINTN *StatisticsSize OPTIONAL,
186 OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
187);
188
249typedef
250EFI_STATUS
251(EFIAPI *EFI_SIMPLE_NETWORK_STATISTICS) (
252 IN struct _EFI_SIMPLE_NETWORK *This,
253 IN BOOLEAN Reset,
254 IN OUT UINTN *StatisticsSize OPTIONAL,
255 OUT EFI_NETWORK_STATISTICS *StatisticsTable OPTIONAL
256);
257
258///////////////////////////////////////////////////////////////////////////////
259//
260
189typedef
190EFI_STATUS
191(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
192 IN struct _EFI_SIMPLE_NETWORK *This,
193 IN BOOLEAN IPv6,
194 IN EFI_IP_ADDRESS *IP,
195 OUT EFI_MAC_ADDRESS *MAC
196);
197
261typedef
262EFI_STATUS
263(EFIAPI *EFI_SIMPLE_NETWORK_MCAST_IP_TO_MAC) (
264 IN struct _EFI_SIMPLE_NETWORK *This,
265 IN BOOLEAN IPv6,
266 IN EFI_IP_ADDRESS *IP,
267 OUT EFI_MAC_ADDRESS *MAC
268);
269
270///////////////////////////////////////////////////////////////////////////////
271//
272
198typedef
199EFI_STATUS
200(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
201 IN struct _EFI_SIMPLE_NETWORK *This,
202 IN BOOLEAN ReadWrite,
203 IN UINTN Offset,
204 IN UINTN BufferSize,
205 IN OUT VOID *Buffer
206);
207
273typedef
274EFI_STATUS
275(EFIAPI *EFI_SIMPLE_NETWORK_NVDATA) (
276 IN struct _EFI_SIMPLE_NETWORK *This,
277 IN BOOLEAN ReadWrite,
278 IN UINTN Offset,
279 IN UINTN BufferSize,
280 IN OUT VOID *Buffer
281);
282
283///////////////////////////////////////////////////////////////////////////////
284//
285
208typedef
209EFI_STATUS
210(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
211 IN struct _EFI_SIMPLE_NETWORK *This,
212 OUT UINT32 *InterruptStatus OPTIONAL,
213 OUT VOID **TxBuf OPTIONAL
214);
215
286typedef
287EFI_STATUS
288(EFIAPI *EFI_SIMPLE_NETWORK_GET_STATUS) (
289 IN struct _EFI_SIMPLE_NETWORK *This,
290 OUT UINT32 *InterruptStatus OPTIONAL,
291 OUT VOID **TxBuf OPTIONAL
292);
293
294///////////////////////////////////////////////////////////////////////////////
295//
296
216typedef
217EFI_STATUS
218(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
219 IN struct _EFI_SIMPLE_NETWORK *This,
220 IN UINTN HeaderSize,
221 IN UINTN BufferSize,
222 IN VOID *Buffer,
223 IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
224 IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
225 IN UINT16 *Protocol OPTIONAL
226);
227
297typedef
298EFI_STATUS
299(EFIAPI *EFI_SIMPLE_NETWORK_TRANSMIT) (
300 IN struct _EFI_SIMPLE_NETWORK *This,
301 IN UINTN HeaderSize,
302 IN UINTN BufferSize,
303 IN VOID *Buffer,
304 IN EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
305 IN EFI_MAC_ADDRESS *DestAddr OPTIONAL,
306 IN UINT16 *Protocol OPTIONAL
307);
308
309///////////////////////////////////////////////////////////////////////////////
310//
311
228typedef
229EFI_STATUS
230(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
231 IN struct _EFI_SIMPLE_NETWORK *This,
232 OUT UINTN *HeaderSize OPTIONAL,
233 IN OUT UINTN *BufferSize,
234 OUT VOID *Buffer,
235 OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
236 OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
237 OUT UINT16 *Protocol OPTIONAL
238);
239
312typedef
313EFI_STATUS
314(EFIAPI *EFI_SIMPLE_NETWORK_RECEIVE) (
315 IN struct _EFI_SIMPLE_NETWORK *This,
316 OUT UINTN *HeaderSize OPTIONAL,
317 IN OUT UINTN *BufferSize,
318 OUT VOID *Buffer,
319 OUT EFI_MAC_ADDRESS *SrcAddr OPTIONAL,
320 OUT EFI_MAC_ADDRESS *DestAddr OPTIONAL,
321 OUT UINT16 *Protocol OPTIONAL
322);
323
324///////////////////////////////////////////////////////////////////////////////
325//
326
240#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION 0x00010000
241
242typedef struct _EFI_SIMPLE_NETWORK {
243 UINT64 Revision;
244 EFI_SIMPLE_NETWORK_START Start;
245 EFI_SIMPLE_NETWORK_STOP Stop;
246 EFI_SIMPLE_NETWORK_INITIALIZE Initialize;
247 EFI_SIMPLE_NETWORK_RESET Reset;

--- 14 unchanged lines hidden ---
327#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION 0x00010000
328
329typedef struct _EFI_SIMPLE_NETWORK {
330 UINT64 Revision;
331 EFI_SIMPLE_NETWORK_START Start;
332 EFI_SIMPLE_NETWORK_STOP Stop;
333 EFI_SIMPLE_NETWORK_INITIALIZE Initialize;
334 EFI_SIMPLE_NETWORK_RESET Reset;

--- 14 unchanged lines hidden ---