4 * Definitions for NDIS WAN miniport drivers
6 * This file is part of the w32api package.
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
32 #define NDIS_USE_WAN_WRAPPER 0x00000001
34 #define NDIS_STATUS_TAPI_INDICATION ((NDIS_STATUS)0x40010080L)
36 /* NDIS_WAN_INFO.FramingBits constants */
37 #define RAS_FRAMING 0x00000001
38 #define RAS_COMPRESSION 0x00000002
40 #define ARAP_V1_FRAMING 0x00000004
41 #define ARAP_V2_FRAMING 0x00000008
42 #define ARAP_FRAMING (ARAP_V1_FRAMING | ARAP_V2_FRAMING)
44 #define PPP_MULTILINK_FRAMING 0x00000010
45 #define PPP_SHORT_SEQUENCE_HDR_FORMAT 0x00000020
46 #define PPP_MC_MULTILINK_FRAMING 0x00000040
48 #define PPP_FRAMING 0x00000100
49 #define PPP_COMPRESS_ADDRESS_CONTROL 0x00000200
50 #define PPP_COMPRESS_PROTOCOL_FIELD 0x00000400
51 #define PPP_ACCM_SUPPORTED 0x00000800
53 #define SLIP_FRAMING 0x00001000
54 #define SLIP_VJ_COMPRESSION 0x00002000
55 #define SLIP_VJ_AUTODETECT 0x00004000
57 #define MEDIA_NRZ_ENCODING 0x00010000
58 #define MEDIA_NRZI_ENCODING 0x00020000
59 #define MEDIA_NLPID 0x00040000
61 #define RFC_1356_FRAMING 0x00100000
62 #define RFC_1483_FRAMING 0x00200000
63 #define RFC_1490_FRAMING 0x00400000
64 #define LLC_ENCAPSULATION 0x00800000
66 #define SHIVA_FRAMING 0x01000000
67 #define NBF_PRESERVE_MAC_ADDRESS 0x01000000
69 #define PASS_THROUGH_MODE 0x10000000
70 #define RAW_PASS_THROUGH_MODE 0x20000000
72 #define TAPI_PROVIDER 0x80000000
74 #define BRIDGING_FLAG_LANFCS 0x00000001
75 #define BRIDGING_FLAG_LANID 0x00000002
76 #define BRIDGING_FLAG_PADDING 0x00000004
78 #define BRIDGING_TINYGRAM 0x00000001
79 #define BRIDGING_LANID 0x00000002
80 #define BRIDGING_NO_SPANNING_TREE 0x00000004
81 #define BRIDGING_8021D_SPANNING_TREE 0x00000008
82 #define BRIDGING_8021G_SPANNING_TREE 0x00000010
83 #define BRIDGING_SOURCE_ROUTING 0x00000020
84 #define BRIDGING_DEC_LANBRIDGE 0x00000040
86 #define BRIDGING_TYPE_RESERVED 0x00000001
87 #define BRIDGING_TYPE_8023_CANON 0x00000002
88 #define BRIDGING_TYPE_8024_NO_CANON 0x00000004
89 #define BRIDGING_TYPE_8025_NO_CANON 0x00000008
90 #define BRIDGING_TYPE_FDDI_NO_CANON 0x00000010
91 #define BRIDGING_TYPE_8024_CANON 0x00000400
92 #define BRIDGING_TYPE_8025_CANON 0x00000800
93 #define BRIDGING_TYPE_FDDI_CANON 0x00001000
95 /* NDIS_WAN_COMPRESS_INFO.MSCompType constants */
96 #define NDISWAN_COMPRESSION 0x00000001
97 #define NDISWAN_ENCRYPTION 0x00000010
98 #define NDISWAN_40_ENCRYPTION 0x00000020
99 #define NDISWAN_128_ENCRYPTION 0x00000040
100 #define NDISWAN_56_ENCRYPTION 0x00000080
101 #define NDISWAN_HISTORY_LESS 0x01000000
103 /* NDIS_WAN_COMPRESS_INFO.CompType constants */
104 #define COMPTYPE_OUI 0
105 #define COMPTYPE_NT31RAS 254
106 #define COMPTYPE_NONE 255
108 #define WAN_ERROR_CRC ((ULONG)0x00000001)
109 #define WAN_ERROR_FRAMING ((ULONG)0x00000002)
110 #define WAN_ERROR_HARDWAREOVERRUN ((ULONG)0x00000004)
111 #define WAN_ERROR_BUFFEROVERRUN ((ULONG)0x00000008)
112 #define WAN_ERROR_TIMEOUT ((ULONG)0x00000010)
113 #define WAN_ERROR_ALIGNMENT ((ULONG)0x00000020)
115 #define NdisMWanInitializeWrapper(NdisWrapperHandle, \
120 NdisMInitializeWrapper(NdisWrapperHandle, \
126 typedef struct _NDIS_WAN_INFO
{
127 _Out_ ULONG MaxFrameSize
;
128 _Out_ ULONG MaxTransmit
;
129 _Out_ ULONG HeaderPadding
;
130 _Out_ ULONG TailPadding
;
131 _Out_ ULONG Endpoints
;
132 _Out_ UINT MemoryFlags
;
133 _Out_ NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress
;
134 _Out_ ULONG FramingBits
;
135 _Out_ ULONG DesiredACCM
;
136 } NDIS_WAN_INFO
, *PNDIS_WAN_INFO
;
138 typedef struct _NDIS_WAN_GET_LINK_INFO
{
139 _In_ NDIS_HANDLE NdisLinkHandle
;
140 _Out_ ULONG MaxSendFrameSize
;
141 _Out_ ULONG MaxRecvFrameSize
;
142 _Out_ ULONG HeaderPadding
;
143 _Out_ ULONG TailPadding
;
144 _Out_ ULONG SendFramingBits
;
145 _Out_ ULONG RecvFramingBits
;
146 _Out_ ULONG SendCompressionBits
;
147 _Out_ ULONG RecvCompressionBits
;
148 _Out_ ULONG SendACCM
;
149 _Out_ ULONG RecvACCM
;
150 } NDIS_WAN_GET_LINK_INFO
, *PNDIS_WAN_GET_LINK_INFO
;
152 typedef struct _NDIS_WAN_SET_LINK_INFO
{
153 _In_ NDIS_HANDLE NdisLinkHandle
;
154 _In_ ULONG MaxSendFrameSize
;
155 _In_ ULONG MaxRecvFrameSize
;
156 _In_ ULONG HeaderPadding
;
157 _In_ ULONG TailPadding
;
158 _In_ ULONG SendFramingBits
;
159 _In_ ULONG RecvFramingBits
;
160 _In_ ULONG SendCompressionBits
;
161 _In_ ULONG RecvCompressionBits
;
164 } NDIS_WAN_SET_LINK_INFO
, *PNDIS_WAN_SET_LINK_INFO
;
166 typedef struct _NDIS_WAN_GET_BRIDGE_INFO
{
167 _In_ NDIS_HANDLE NdisLinkHandle
;
168 _Out_ USHORT LanSegmentNumber
;
169 _Out_ UCHAR BridgeNumber
;
170 _Out_ UCHAR BridgingOptions
;
171 _Out_ ULONG BridgingCapabilities
;
172 _Out_ UCHAR BridgingType
;
173 _Out_ UCHAR MacBytes
[6];
174 } NDIS_WAN_GET_BRIDGE_INFO
, *PNDIS_WAN_GET_BRIDGE_INFO
;
176 typedef struct _NDIS_WAN_SET_BRIDGE_INFO
{
177 _In_ NDIS_HANDLE NdisLinkHandle
;
178 _In_ USHORT LanSegmentNumber
;
179 _In_ UCHAR BridgeNumber
;
180 _In_ UCHAR BridgingOptions
;
181 _In_ ULONG BridgingCapabilities
;
182 _In_ UCHAR BridgingType
;
183 _In_ UCHAR MacBytes
[6];
184 } NDIS_WAN_SET_BRIDGE_INFO
, *PNDIS_WAN_SET_BRIDGE_INFO
;
186 typedef struct _NDIS_WAN_COMPRESS_INFO
{
191 _ANONYMOUS_UNION
union {
195 UCHAR CompValues
[32];
198 UCHAR CompValues
[32];
201 } NDIS_WAN_COMPRESS_INFO
, *PNDIS_WAN_COMPRESS_INFO
;
203 typedef struct _NDIS_WAN_GET_COMP_INFO
{
204 _In_ NDIS_HANDLE NdisLinkHandle
;
205 _Out_ NDIS_WAN_COMPRESS_INFO SendCapabilities
;
206 _Out_ NDIS_WAN_COMPRESS_INFO RecvCapabilities
;
207 } NDIS_WAN_GET_COMP_INFO
, *PNDIS_WAN_GET_COMP_INFO
;
209 typedef struct _NDIS_WAN_SET_COMP_INFO
{
210 _In_ NDIS_HANDLE NdisLinkHandle
;
211 _In_ NDIS_WAN_COMPRESS_INFO SendCapabilities
;
212 _In_ NDIS_WAN_COMPRESS_INFO RecvCapabilities
;
213 } NDIS_WAN_SET_COMP_INFO
, *PNDIS_WAN_SET_COMP_INFO
;
216 * NOTE: As some people may notice, this structure contains three misspelled
217 * fields (the "Tunnel*Recieve*" fields). Their names come from the Windows
218 * Driver Development Kit and thus, blame Microsoft if they do not know how
219 * to write proper English or if they do not re-read what they are writing !!
221 typedef struct _NDIS_WAN_GET_STATS_INFO
{
222 _In_ NDIS_HANDLE NdisLinkHandle
;
223 _Out_ ULONG BytesSent
;
224 _Out_ ULONG BytesRcvd
;
225 _Out_ ULONG FramesSent
;
226 _Out_ ULONG FramesRcvd
;
227 _Out_ ULONG CRCErrors
;
228 _Out_ ULONG TimeoutErrors
;
229 _Out_ ULONG AlignmentErrors
;
230 _Out_ ULONG SerialOverrunErrors
;
231 _Out_ ULONG FramingErrors
;
232 _Out_ ULONG BufferOverrunErrors
;
233 _Out_ ULONG BytesTransmittedUncompressed
;
234 _Out_ ULONG BytesReceivedUncompressed
;
235 _Out_ ULONG BytesTransmittedCompressed
;
236 _Out_ ULONG BytesReceivedCompressed
;
237 _Out_ ULONG TunnelPacketsRecieved
;
238 _Out_ ULONG TunnelRecievePacketsPending
;
239 _Out_ ULONG TunnelPacketsIndicatedUp
;
240 _Out_ ULONG TunnelRecievePacketsRejected
;
241 _Out_ ULONG TunnelPacketsSent
;
242 _Out_ ULONG TunnelPacketsSentComplete
;
243 _Out_ ULONG TunnelTransmitPacketsPending
;
244 _Out_ ULONG TunnelPacketsTransmitError
;
245 _Out_ ULONG TunnelPacketsSentError
;
246 _Out_ ULONG TunnelTransmitPacketsRejected
;
247 _Out_ ULONG TunnelAcksSent
;
248 _Out_ ULONG TunnelAcksSentComplete
;
249 _Out_ ULONG TunnelGeneric1
;
250 _Out_ ULONG TunnelGeneric2
;
251 _Out_ ULONG TunnelGeneric3
;
252 } NDIS_WAN_GET_STATS_INFO
, *PNDIS_WAN_GET_STATS_INFO
;
254 typedef struct _NDIS_MAC_LINE_UP
{
255 _In_ ULONG LinkSpeed
;
256 _In_ NDIS_WAN_QUALITY Quality
;
257 _In_ USHORT SendWindow
;
258 _In_ NDIS_HANDLE ConnectionWrapperID
;
259 _In_ NDIS_HANDLE NdisLinkHandle
;
260 _Out_ NDIS_HANDLE NdisLinkContext
;
261 } NDIS_MAC_LINE_UP
, *PNDIS_MAC_LINE_UP
;
263 typedef struct _NDIS_MAC_LINE_DOWN
{
264 _In_ NDIS_HANDLE NdisLinkContext
;
265 } NDIS_MAC_LINE_DOWN
, *PNDIS_MAC_LINE_DOWN
;
267 typedef struct _NDIS_MAC_FRAGMENT
{
268 _In_ NDIS_HANDLE NdisLinkContext
;
270 } NDIS_MAC_FRAGMENT
, *PNDIS_MAC_FRAGMENT
;
272 typedef struct _NDIS_WAN_CO_INFO
{
273 _Out_ ULONG MaxFrameSize
;
274 _Out_ ULONG MaxSendWindow
;
275 _Out_ ULONG FramingBits
;
276 _Out_ ULONG DesiredACCM
;
277 } NDIS_WAN_CO_INFO
, *PNDIS_WAN_CO_INFO
;
279 typedef struct _NDIS_WAN_CO_GET_LINK_INFO
{
280 _Out_ ULONG MaxSendFrameSize
;
281 _Out_ ULONG MaxRecvFrameSize
;
282 _Out_ ULONG SendFramingBits
;
283 _Out_ ULONG RecvFramingBits
;
284 _Out_ ULONG SendCompressionBits
;
285 _Out_ ULONG RecvCompressionBits
;
286 _Out_ ULONG SendACCM
;
287 _Out_ ULONG RecvACCM
;
288 } NDIS_WAN_CO_GET_LINK_INFO
, *PNDIS_WAN_CO_GET_LINK_INFO
;
290 typedef struct _NDIS_WAN_CO_SET_LINK_INFO
{
291 _In_ ULONG MaxSendFrameSize
;
292 _In_ ULONG MaxRecvFrameSize
;
293 _In_ ULONG SendFramingBits
;
294 _In_ ULONG RecvFramingBits
;
295 _In_ ULONG SendCompressionBits
;
296 _In_ ULONG RecvCompressionBits
;
299 } NDIS_WAN_CO_SET_LINK_INFO
, *PNDIS_WAN_CO_SET_LINK_INFO
;
301 typedef struct _NDIS_WAN_CO_GET_COMP_INFO
{
302 _Out_ NDIS_WAN_COMPRESS_INFO SendCapabilities
;
303 _Out_ NDIS_WAN_COMPRESS_INFO RecvCapabilities
;
304 } NDIS_WAN_CO_GET_COMP_INFO
, *PNDIS_WAN_CO_GET_COMP_INFO
;
306 typedef struct _NDIS_WAN_CO_SET_COMP_INFO
{
307 _In_ NDIS_WAN_COMPRESS_INFO SendCapabilities
;
308 _In_ NDIS_WAN_COMPRESS_INFO RecvCapabilities
;
309 } NDIS_WAN_CO_SET_COMP_INFO
, *PNDIS_WAN_CO_SET_COMP_INFO
;
312 * NOTE: As some people may notice, this structure contains three misspelled
313 * fields (the "Tunnel*Recieve*" fields). Their names come from the Windows
314 * Driver Development Kit and thus, blame Microsoft if they do not know how
315 * to write proper English or if they do not re-read what they are writing !!
317 typedef struct _NDIS_WAN_CO_GET_STATS_INFO
{
318 _Out_ ULONG BytesSent
;
319 _Out_ ULONG BytesRcvd
;
320 _Out_ ULONG FramesSent
;
321 _Out_ ULONG FramesRcvd
;
322 _Out_ ULONG CRCErrors
;
323 _Out_ ULONG TimeoutErrors
;
324 _Out_ ULONG AlignmentErrors
;
325 _Out_ ULONG SerialOverrunErrors
;
326 _Out_ ULONG FramingErrors
;
327 _Out_ ULONG BufferOverrunErrors
;
328 _Out_ ULONG BytesTransmittedUncompressed
;
329 _Out_ ULONG BytesReceivedUncompressed
;
330 _Out_ ULONG BytesTransmittedCompressed
;
331 _Out_ ULONG BytesReceivedCompressed
;
332 _Out_ ULONG TunnelPacketsRecieved
;
333 _Out_ ULONG TunnelRecievePacketsPending
;
334 _Out_ ULONG TunnelPacketsIndicatedUp
;
335 _Out_ ULONG TunnelRecievePacketsRejected
;
336 _Out_ ULONG TunnelPacketsSent
;
337 _Out_ ULONG TunnelPacketsSentComplete
;
338 _Out_ ULONG TunnelTransmitPacketsPending
;
339 _Out_ ULONG TunnelPacketsTransmitError
;
340 _Out_ ULONG TunnelPacketsSentError
;
341 _Out_ ULONG TunnelTransmitPacketsRejected
;
342 _Out_ ULONG TunnelAcksSent
;
343 _Out_ ULONG TunnelAcksSentComplete
;
344 _Out_ ULONG TunnelGeneric1
;
345 _Out_ ULONG TunnelGeneric2
;
346 _Out_ ULONG TunnelGeneric3
;
347 } NDIS_WAN_CO_GET_STATS_INFO
, *PNDIS_WAN_CO_GET_STATS_INFO
;
349 typedef struct _NDIS_WAN_CO_FRAGMENT
{
351 } NDIS_WAN_CO_FRAGMENT
, *PNDIS_WAN_CO_FRAGMENT
;
353 typedef struct _WAN_CO_LINKPARAMS
{
357 } WAN_CO_LINKPARAMS
, *PWAN_CO_LINKPARAMS
;
359 typedef struct _WAN_CO_MTULINKPARAMS
{
365 } WAN_CO_MTULINKPARAMS
, *PWAN_CO_MTULINKPARAMS
;
371 #endif /* _NDIS_WAN_ */