source: Daodan/MinGW/include/ddk/ndiswan.h@ 1098

Last change on this file since 1098 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 7.9 KB
Line 
1/*
2 * ndiswan.h
3 *
4 * Definitions for NDIS WAN miniport drivers
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
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.
20 *
21 */
22
23#ifndef __NDISWAN_H
24#define __NDISWAN_H
25
26#if __GNUC__ >=3
27#pragma GCC system_header
28#endif
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#include "ndis.h"
35
36#define NDIS_USE_WAN_WRAPPER 0x00000001
37
38#define NDIS_STATUS_TAPI_INDICATION ((NDIS_STATUS)0x40010080L)
39
40/* NDIS_WAN_INFO.FramingBits constants */
41#define RAS_FRAMING 0x00000001
42#define RAS_COMPRESSION 0x00000002
43
44#define ARAP_V1_FRAMING 0x00000004
45#define ARAP_V2_FRAMING 0x00000008
46#define ARAP_FRAMING (ARAP_V1_FRAMING | ARAP_V2_FRAMING)
47
48#define PPP_MULTILINK_FRAMING 0x00000010
49#define PPP_SHORT_SEQUENCE_HDR_FORMAT 0x00000020
50#define PPP_MC_MULTILINK_FRAMING 0x00000040
51
52#define PPP_FRAMING 0x00000100
53#define PPP_COMPRESS_ADDRESS_CONTROL 0x00000200
54#define PPP_COMPRESS_PROTOCOL_FIELD 0x00000400
55#define PPP_ACCM_SUPPORTED 0x00000800
56
57#define SLIP_FRAMING 0x00001000
58#define SLIP_VJ_COMPRESSION 0x00002000
59#define SLIP_VJ_AUTODETECT 0x00004000
60
61#define MEDIA_NRZ_ENCODING 0x00010000
62#define MEDIA_NRZI_ENCODING 0x00020000
63#define MEDIA_NLPID 0x00040000
64
65#define RFC_1356_FRAMING 0x00100000
66#define RFC_1483_FRAMING 0x00200000
67#define RFC_1490_FRAMING 0x00400000
68#define LLC_ENCAPSULATION 0x00800000
69
70#define SHIVA_FRAMING 0x01000000
71#define NBF_PRESERVE_MAC_ADDRESS 0x01000000
72
73#define PASS_THROUGH_MODE 0x10000000
74#define RAW_PASS_THROUGH_MODE 0x20000000
75
76#define TAPI_PROVIDER 0x80000000
77
78typedef struct _NDIS_WAN_INFO {
79 /*OUT*/ ULONG MaxFrameSize;
80 /*OUT*/ ULONG MaxTransmit;
81 /*OUT*/ ULONG HeaderPadding;
82 /*OUT*/ ULONG TailPadding;
83 /*OUT*/ ULONG Endpoints;
84 /*OUT*/ UINT MemoryFlags;
85 /*OUT*/ NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress;
86 /*OUT*/ ULONG FramingBits;
87 /*OUT*/ ULONG DesiredACCM;
88} NDIS_WAN_INFO, *PNDIS_WAN_INFO;
89
90typedef struct _NDIS_WAN_GET_LINK_INFO {
91 /*IN*/ NDIS_HANDLE NdisLinkHandle;
92 /*OUT*/ ULONG MaxSendFrameSize;
93 /*OUT*/ ULONG MaxRecvFrameSize;
94 /*OUT*/ ULONG HeaderPadding;
95 /*OUT*/ ULONG TailPadding;
96 /*OUT*/ ULONG SendFramingBits;
97 /*OUT*/ ULONG RecvFramingBits;
98 /*OUT*/ ULONG SendCompressionBits;
99 /*OUT*/ ULONG RecvCompressionBits;
100 /*OUT*/ ULONG SendACCM;
101 /*OUT*/ ULONG RecvACCM;
102} NDIS_WAN_GET_LINK_INFO, *PNDIS_WAN_GET_LINK_INFO;
103
104typedef struct _NDIS_WAN_SET_LINK_INFO {
105 /*IN*/ NDIS_HANDLE NdisLinkHandle;
106 /*IN*/ ULONG MaxSendFrameSize;
107 /*IN*/ ULONG MaxRecvFrameSize;
108 /*IN*/ ULONG HeaderPadding;
109 /*IN*/ ULONG TailPadding;
110 /*IN*/ ULONG SendFramingBits;
111 /*IN*/ ULONG RecvFramingBits;
112 /*IN*/ ULONG SendCompressionBits;
113 /*IN*/ ULONG RecvCompressionBits;
114 /*IN*/ ULONG SendACCM;
115 /*IN*/ ULONG RecvACCM;
116} NDIS_WAN_SET_LINK_INFO, *PNDIS_WAN_SET_LINK_INFO;
117
118/* NDIS_WAN_COMPRESS_INFO.MSCompType constants */
119#define NDISWAN_COMPRESSION 0x00000001
120#define NDISWAN_ENCRYPTION 0x00000010
121#define NDISWAN_40_ENCRYPTION 0x00000020
122#define NDISWAN_128_ENCRYPTION 0x00000040
123#define NDISWAN_56_ENCRYPTION 0x00000080
124#define NDISWAN_HISTORY_LESS 0x01000000
125
126/* NDIS_WAN_COMPRESS_INFO.CompType constants */
127#define COMPTYPE_OUI 0
128#define COMPTYPE_NT31RAS 254
129#define COMPTYPE_NONE 255
130
131typedef struct _NDIS_WAN_COMPRESS_INFO {
132 UCHAR SessionKey[8];
133 ULONG MSCompType;
134 UCHAR CompType;
135 USHORT CompLength;
136 _ANONYMOUS_UNION union {
137 struct {
138 UCHAR CompOUI[3];
139 UCHAR CompSubType;
140 UCHAR CompValues[32];
141 } Proprietary;
142 struct {
143 UCHAR CompValues[32];
144 } Public;
145 } DUMMYUNIONNAME;
146} NDIS_WAN_COMPRESS_INFO;
147
148typedef NDIS_WAN_COMPRESS_INFO *PNDIS_WAN_COMPRESS_INFO;
149
150typedef struct _NDIS_WAN_GET_COMP_INFO {
151 /*IN*/ NDIS_HANDLE NdisLinkHandle;
152 /*OUT*/ NDIS_WAN_COMPRESS_INFO SendCapabilities;
153 /*OUT*/ NDIS_WAN_COMPRESS_INFO RecvCapabilities;
154} NDIS_WAN_GET_COMP_INFO, *PNDIS_WAN_GET_COMP_INFO;
155
156typedef struct _NDIS_WAN_SET_COMP_INFO {
157 /*IN*/ NDIS_HANDLE NdisLinkHandle;
158 /*IN*/ NDIS_WAN_COMPRESS_INFO SendCapabilities;
159 /*IN*/ NDIS_WAN_COMPRESS_INFO RecvCapabilities;
160} NDIS_WAN_SET_COMP_INFO, *PNDIS_WAN_SET_COMP_INFO;
161
162typedef struct _NDIS_WAN_GET_STATS_INFO {
163 /*IN*/ NDIS_HANDLE NdisLinkHandle;
164 /*OUT*/ ULONG BytesSent;
165 /*OUT*/ ULONG BytesRcvd;
166 /*OUT*/ ULONG FramesSent;
167 /*OUT*/ ULONG FramesRcvd;
168 /*OUT*/ ULONG CRCErrors;
169 /*OUT*/ ULONG TimeoutErrors;
170 /*OUT*/ ULONG AlignmentErrors;
171 /*OUT*/ ULONG SerialOverrunErrors;
172 /*OUT*/ ULONG FramingErrors;
173 /*OUT*/ ULONG BufferOverrunErrors;
174 /*OUT*/ ULONG BytesTransmittedUncompressed;
175 /*OUT*/ ULONG BytesReceivedUncompressed;
176 /*OUT*/ ULONG BytesTransmittedCompressed;
177 /*OUT*/ ULONG BytesReceivedCompressed;
178} NDIS_WAN_GET_STATS_INFO, *PNDIS_WAN_GET_STATS_INFO;
179
180#define NdisMWanInitializeWrapper(NdisWrapperHandle, \
181 SystemSpecific1, \
182 SystemSpecific2, \
183 SystemSpecific3) \
184{ \
185 NdisMInitializeWrapper(NdisWrapperHandle, \
186 SystemSpecific1, \
187 SystemSpecific2, \
188 SystemSpecific3); \
189}
190
191typedef struct _NDIS_WAN_CO_INFO {
192 /*OUT*/ ULONG MaxFrameSize;
193 /*OUT*/ ULONG MaxSendWindow;
194 /*OUT*/ ULONG FramingBits;
195 /*OUT*/ ULONG DesiredACCM;
196} NDIS_WAN_CO_INFO, *PNDIS_WAN_CO_INFO;
197
198typedef struct _NDIS_WAN_CO_GET_LINK_INFO {
199 /*OUT*/ ULONG MaxSendFrameSize;
200 /*OUT*/ ULONG MaxRecvFrameSize;
201 /*OUT*/ ULONG SendFramingBits;
202 /*OUT*/ ULONG RecvFramingBits;
203 /*OUT*/ ULONG SendCompressionBits;
204 /*OUT*/ ULONG RecvCompressionBits;
205 /*OUT*/ ULONG SendACCM;
206 /*OUT*/ ULONG RecvACCM;
207} NDIS_WAN_CO_GET_LINK_INFO, *PNDIS_WAN_CO_GET_LINK_INFO;
208
209typedef struct _NDIS_WAN_CO_SET_LINK_INFO {
210 /*IN*/ ULONG MaxSendFrameSize;
211 /*IN*/ ULONG MaxRecvFrameSize;
212 /*IN*/ ULONG SendFramingBits;
213 /*IN*/ ULONG RecvFramingBits;
214 /*IN*/ ULONG SendCompressionBits;
215 /*IN*/ ULONG RecvCompressionBits;
216 /*IN*/ ULONG SendACCM;
217 /*IN*/ ULONG RecvACCM;
218} NDIS_WAN_CO_SET_LINK_INFO, *PNDIS_WAN_CO_SET_LINK_INFO;
219
220typedef struct _NDIS_WAN_CO_GET_COMP_INFO {
221 /*OUT*/ NDIS_WAN_COMPRESS_INFO SendCapabilities;
222 /*OUT*/ NDIS_WAN_COMPRESS_INFO RecvCapabilities;
223} NDIS_WAN_CO_GET_COMP_INFO, *PNDIS_WAN_CO_GET_COMP_INFO;
224
225typedef struct _NDIS_WAN_CO_SET_COMP_INFO {
226 /*IN*/ NDIS_WAN_COMPRESS_INFO SendCapabilities;
227 /*IN*/ NDIS_WAN_COMPRESS_INFO RecvCapabilities;
228} NDIS_WAN_CO_SET_COMP_INFO, *PNDIS_WAN_CO_SET_COMP_INFO;
229
230typedef struct _NDIS_WAN_CO_GET_STATS_INFO {
231 /*OUT*/ ULONG BytesSent;
232 /*OUT*/ ULONG BytesRcvd;
233 /*OUT*/ ULONG FramesSent;
234 /*OUT*/ ULONG FramesRcvd;
235 /*OUT*/ ULONG CRCErrors;
236 /*OUT*/ ULONG TimeoutErrors;
237 /*OUT*/ ULONG AlignmentErrors;
238 /*OUT*/ ULONG SerialOverrunErrors;
239 /*OUT*/ ULONG FramingErrors;
240 /*OUT*/ ULONG BufferOverrunErrors;
241 /*OUT*/ ULONG BytesTransmittedUncompressed;
242 /*OUT*/ ULONG BytesReceivedUncompressed;
243 /*OUT*/ ULONG BytesTransmittedCompressed;
244 /*OUT*/ ULONG BytesReceivedCompressed;
245} NDIS_WAN_CO_GET_STATS_INFO, *PNDIS_WAN_CO_GET_STATS_INFO;
246
247#ifdef __cplusplus
248}
249#endif
250
251#endif /* __NDISWAN_H */
Note: See TracBrowser for help on using the repository browser.