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.
27 #pragma GCC system_header
36 #define NDIS_USE_WAN_WRAPPER 0x00000001
38 #define NDIS_STATUS_TAPI_INDICATION ((NDIS_STATUS)0x40010080L)
40 /* NDIS_WAN_INFO.FramingBits constants */
41 #define RAS_FRAMING 0x00000001
42 #define RAS_COMPRESSION 0x00000002
44 #define ARAP_V1_FRAMING 0x00000004
45 #define ARAP_V2_FRAMING 0x00000008
46 #define ARAP_FRAMING (ARAP_V1_FRAMING | ARAP_V2_FRAMING)
48 #define PPP_MULTILINK_FRAMING 0x00000010
49 #define PPP_SHORT_SEQUENCE_HDR_FORMAT 0x00000020
50 #define PPP_MC_MULTILINK_FRAMING 0x00000040
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
57 #define SLIP_FRAMING 0x00001000
58 #define SLIP_VJ_COMPRESSION 0x00002000
59 #define SLIP_VJ_AUTODETECT 0x00004000
61 #define MEDIA_NRZ_ENCODING 0x00010000
62 #define MEDIA_NRZI_ENCODING 0x00020000
63 #define MEDIA_NLPID 0x00040000
65 #define RFC_1356_FRAMING 0x00100000
66 #define RFC_1483_FRAMING 0x00200000
67 #define RFC_1490_FRAMING 0x00400000
68 #define LLC_ENCAPSULATION 0x00800000
70 #define SHIVA_FRAMING 0x01000000
71 #define NBF_PRESERVE_MAC_ADDRESS 0x01000000
73 #define PASS_THROUGH_MODE 0x10000000
74 #define RAW_PASS_THROUGH_MODE 0x20000000
76 #define TAPI_PROVIDER 0x80000000
78 typedef 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
;
90 typedef 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
;
104 typedef 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
;
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
126 /* NDIS_WAN_COMPRESS_INFO.CompType constants */
127 #define COMPTYPE_OUI 0
128 #define COMPTYPE_NT31RAS 254
129 #define COMPTYPE_NONE 255
131 typedef struct _NDIS_WAN_COMPRESS_INFO
{
136 _ANONYMOUS_UNION
union {
140 UCHAR CompValues
[32];
143 UCHAR CompValues
[32];
146 } NDIS_WAN_COMPRESS_INFO
;
148 typedef NDIS_WAN_COMPRESS_INFO
*PNDIS_WAN_COMPRESS_INFO
;
150 typedef 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
;
156 typedef 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
;
162 typedef 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
;
180 #define NdisMWanInitializeWrapper(NdisWrapperHandle, \
185 NdisMInitializeWrapper(NdisWrapperHandle, \
191 typedef 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
;
198 typedef 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
;
209 typedef 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
;
220 typedef 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
;
225 typedef 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
;
230 typedef 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
;
251 #endif /* __NDISWAN_H */