Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

ndiswan.h

Go to the documentation of this file.
00001 /*++ BUILD Version: 0000 // Increment this if a change has global effects 00002 00003 Copyright (c) 1994 Microsoft Corporation 00004 00005 Module Name: 00006 00007 ndiswan.h 00008 00009 Abstract: 00010 00011 Main header file for the wan wrapper 00012 00013 Author: 00014 00015 Thomas J. Dimitri (TommyD) 20-Feb-1994 00016 00017 Revision History: 00018 00019 --*/ 00020 00021 00022 #ifndef _NDIS_WAN_ 00023 #define _NDIS_WAN_ 00024 00025 // 00026 // Begin definitions for WANs 00027 // 00028 00029 // 00030 // Bit field set int he Reserved field for 00031 // NdisRegisterMiniport or passed in NdisRegisterSpecial 00032 // 00033 00034 #define NDIS_USE_WAN_WRAPPER 0x00000001 00035 00036 #define NDIS_STATUS_TAPI_INDICATION ((NDIS_STATUS)0x40010080L) 00037 00038 00039 // 00040 // NDIS WAN Framing bits 00041 // 00042 #define RAS_FRAMING 0x00000001 00043 #define RAS_COMPRESSION 0x00000002 00044 00045 #define ARAP_V1_FRAMING 0x00000004 00046 #define ARAP_V2_FRAMING 0x00000008 00047 #define ARAP_FRAMING (ARAP_V1_FRAMING | ARAP_V2_FRAMING) 00048 00049 #define PPP_MULTILINK_FRAMING 0x00000010 00050 #define PPP_SHORT_SEQUENCE_HDR_FORMAT 0x00000020 00051 #define PPP_MC_MULTILINK_FRAMING 0x00000040 00052 00053 #define PPP_FRAMING 0x00000100 00054 #define PPP_COMPRESS_ADDRESS_CONTROL 0x00000200 00055 #define PPP_COMPRESS_PROTOCOL_FIELD 0x00000400 00056 #define PPP_ACCM_SUPPORTED 0x00000800 00057 00058 #define SLIP_FRAMING 0x00001000 00059 #define SLIP_VJ_COMPRESSION 0x00002000 00060 #define SLIP_VJ_AUTODETECT 0x00004000 00061 00062 #define MEDIA_NRZ_ENCODING 0x00010000 00063 #define MEDIA_NRZI_ENCODING 0x00020000 00064 #define MEDIA_NLPID 0x00040000 00065 00066 #define RFC_1356_FRAMING 0x00100000 00067 #define RFC_1483_FRAMING 0x00200000 00068 #define RFC_1490_FRAMING 0x00400000 00069 #define LLC_ENCAPSULATION 0x00800000 00070 00071 #define SHIVA_FRAMING 0x01000000 00072 #define NBF_PRESERVE_MAC_ADDRESS 0x01000000 00073 00074 #ifndef _WAN50_ 00075 #define PASS_THROUGH_MODE 0x10000000 00076 #define RAW_PASS_THROUGH_MODE 0x20000000 00077 #endif 00078 00079 #define TAPI_PROVIDER 0x80000000 00080 00081 // 00082 // NDIS WAN Information structures used 00083 // by NDIS 3.1 Wan Miniport drivers 00084 // 00085 typedef struct _NDIS_WAN_INFO 00086 { 00087 OUT ULONG MaxFrameSize; 00088 OUT ULONG MaxTransmit; 00089 OUT ULONG HeaderPadding; 00090 OUT ULONG TailPadding; 00091 OUT ULONG Endpoints; 00092 OUT UINT MemoryFlags; 00093 OUT NDIS_PHYSICAL_ADDRESS HighestAcceptableAddress; 00094 OUT ULONG FramingBits; 00095 OUT ULONG DesiredACCM; 00096 } NDIS_WAN_INFO, *PNDIS_WAN_INFO; 00097 00098 typedef struct _NDIS_WAN_SET_LINK_INFO 00099 { 00100 IN NDIS_HANDLE NdisLinkHandle; 00101 IN ULONG MaxSendFrameSize; 00102 IN ULONG MaxRecvFrameSize; 00103 ULONG HeaderPadding; 00104 ULONG TailPadding; 00105 IN ULONG SendFramingBits; 00106 IN ULONG RecvFramingBits; 00107 IN ULONG SendCompressionBits; 00108 IN ULONG RecvCompressionBits; 00109 IN ULONG SendACCM; 00110 IN ULONG RecvACCM; 00111 } NDIS_WAN_SET_LINK_INFO, *PNDIS_WAN_SET_LINK_INFO; 00112 00113 typedef struct _NDIS_WAN_GET_LINK_INFO { 00114 IN NDIS_HANDLE NdisLinkHandle; 00115 OUT ULONG MaxSendFrameSize; 00116 OUT ULONG MaxRecvFrameSize; 00117 OUT ULONG HeaderPadding; 00118 OUT ULONG TailPadding; 00119 OUT ULONG SendFramingBits; 00120 OUT ULONG RecvFramingBits; 00121 OUT ULONG SendCompressionBits; 00122 OUT ULONG RecvCompressionBits; 00123 OUT ULONG SendACCM; 00124 OUT ULONG RecvACCM; 00125 } NDIS_WAN_GET_LINK_INFO, *PNDIS_WAN_GET_LINK_INFO; 00126 00127 // 00128 // NDIS WAN Bridging Options 00129 // 00130 #define BRIDGING_FLAG_LANFCS 0x00000001 00131 #define BRIDGING_FLAG_LANID 0x00000002 00132 #define BRIDGING_FLAG_PADDING 0x00000004 00133 00134 // 00135 // NDIS WAN Bridging Capabilities 00136 // 00137 #define BRIDGING_TINYGRAM 0x00000001 00138 #define BRIDGING_LANID 0x00000002 00139 #define BRIDGING_NO_SPANNING_TREE 0x00000004 00140 #define BRIDGING_8021D_SPANNING_TREE 0x00000008 00141 #define BRIDGING_8021G_SPANNING_TREE 0x00000010 00142 #define BRIDGING_SOURCE_ROUTING 0x00000020 00143 #define BRIDGING_DEC_LANBRIDGE 0x00000040 00144 00145 // 00146 // NDIS WAN Bridging Type 00147 // 00148 #define BRIDGING_TYPE_RESERVED 0x00000001 00149 #define BRIDGING_TYPE_8023_CANON 0x00000002 00150 #define BRIDGING_TYPE_8024_NO_CANON 0x00000004 00151 #define BRIDGING_TYPE_8025_NO_CANON 0x00000008 00152 #define BRIDGING_TYPE_FDDI_NO_CANON 0x00000010 00153 #define BRIDGING_TYPE_8024_CANON 0x00000400 00154 #define BRIDGING_TYPE_8025_CANON 0x00000800 00155 #define BRIDGING_TYPE_FDDI_CANON 0x00001000 00156 00157 typedef struct _NDIS_WAN_GET_BRIDGE_INFO 00158 { 00159 IN NDIS_HANDLE NdisLinkHandle; 00160 OUT USHORT LanSegmentNumber; 00161 OUT UCHAR BridgeNumber; 00162 OUT UCHAR BridgingOptions; 00163 OUT ULONG BridgingCapabilities; 00164 OUT UCHAR BridgingType; 00165 OUT UCHAR MacBytes[6]; 00166 } NDIS_WAN_GET_BRIDGE_INFO, *PNDIS_WAN_GET_BRIDGE_INFO; 00167 00168 typedef struct _NDIS_WAN_SET_BRIDGE_INFO 00169 { 00170 IN NDIS_HANDLE NdisLinkHandle; 00171 IN USHORT LanSegmentNumber; 00172 IN UCHAR BridgeNumber; 00173 IN UCHAR BridgingOptions; 00174 IN ULONG BridgingCapabilities; 00175 IN UCHAR BridgingType; 00176 IN UCHAR MacBytes[6]; 00177 } NDIS_WAN_SET_BRIDGE_INFO, *PNDIS_WAN_SET_BRIDGE_INFO; 00178 00179 // 00180 // NDIS WAN Compression Information 00181 // 00182 00183 // 00184 // Define MSCompType bit field, 0 disables all 00185 // 00186 #define NDISWAN_COMPRESSION 0x00000001 00187 #define NDISWAN_ENCRYPTION 0x00000010 00188 #define NDISWAN_40_ENCRYPTION 0x00000020 00189 #define NDISWAN_128_ENCRYPTION 0x00000040 00190 #define NDISWAN_56_ENCRYPTION 0x00000080 00191 #define NDISWAN_HISTORY_LESS 0x01000000 00192 00193 // 00194 // Define CompType codes 00195 // 00196 #define COMPTYPE_OUI 0 00197 #define COMPTYPE_NT31RAS 254 00198 #define COMPTYPE_NONE 255 00199 00200 00201 typedef struct _NDIS_WAN_COMPRESS_INFO 00202 { 00203 UCHAR SessionKey[8]; 00204 ULONG MSCompType; 00205 00206 // Fields above indicate NDISWAN capabilities. 00207 // Fields below indicate MAC-specific capabilities. 00208 00209 UCHAR CompType; 00210 USHORT CompLength; 00211 00212 union 00213 { 00214 struct 00215 { 00216 UCHAR CompOUI[3]; 00217 UCHAR CompSubType; 00218 UCHAR CompValues[32]; 00219 } Proprietary; 00220 00221 struct 00222 { 00223 UCHAR CompValues[32]; 00224 } Public; 00225 }; 00226 } NDIS_WAN_COMPRESS_INFO; 00227 00228 typedef NDIS_WAN_COMPRESS_INFO UNALIGNED *PNDIS_WAN_COMPRESS_INFO; 00229 00230 typedef struct _NDIS_WAN_GET_COMP_INFO 00231 { 00232 IN NDIS_HANDLE NdisLinkHandle; 00233 OUT NDIS_WAN_COMPRESS_INFO SendCapabilities; 00234 OUT NDIS_WAN_COMPRESS_INFO RecvCapabilities; 00235 } NDIS_WAN_GET_COMP_INFO, *PNDIS_WAN_GET_COMP_INFO; 00236 00237 typedef struct _NDIS_WAN_SET_COMP_INFO 00238 { 00239 IN NDIS_HANDLE NdisLinkHandle; 00240 IN NDIS_WAN_COMPRESS_INFO SendCapabilities; 00241 IN NDIS_WAN_COMPRESS_INFO RecvCapabilities; 00242 } NDIS_WAN_SET_COMP_INFO, *PNDIS_WAN_SET_COMP_INFO; 00243 00244 // 00245 // NDIS WAN Statistics Information 00246 // 00247 00248 typedef struct _NDIS_WAN_GET_STATS_INFO 00249 { 00250 IN NDIS_HANDLE NdisLinkHandle; 00251 OUT ULONG BytesSent; 00252 OUT ULONG BytesRcvd; 00253 OUT ULONG FramesSent; 00254 OUT ULONG FramesRcvd; 00255 OUT ULONG CRCErrors; // Serial-like info only 00256 OUT ULONG TimeoutErrors; // Serial-like info only 00257 OUT ULONG AlignmentErrors; // Serial-like info only 00258 OUT ULONG SerialOverrunErrors; // Serial-like info only 00259 OUT ULONG FramingErrors; // Serial-like info only 00260 OUT ULONG BufferOverrunErrors; // Serial-like info only 00261 OUT ULONG BytesTransmittedUncompressed; // Compression info only 00262 OUT ULONG BytesReceivedUncompressed; // Compression info only 00263 OUT ULONG BytesTransmittedCompressed; // Compression info only 00264 OUT ULONG BytesReceivedCompressed; // Compression info only 00265 } NDIS_WAN_GET_STATS_INFO, *PNDIS_WAN_GET_STATS_INFO; 00266 00267 #define NdisMWanInitializeWrapper(NdisWrapperHandle, \ 00268 SystemSpecific1, \ 00269 SystemSpecific2, \ 00270 SystemSpecific3) \ 00271 { \ 00272 NdisMInitializeWrapper(NdisWrapperHandle, \ 00273 SystemSpecific1, \ 00274 SystemSpecific2, \ 00275 SystemSpecific3); \ 00276 } 00277 00278 typedef struct _NDIS_MAC_LINE_UP 00279 { 00280 IN ULONG LinkSpeed; 00281 IN NDIS_WAN_QUALITY Quality; 00282 IN USHORT SendWindow; 00283 IN NDIS_HANDLE ConnectionWrapperID; 00284 IN NDIS_HANDLE NdisLinkHandle; 00285 OUT NDIS_HANDLE NdisLinkContext; 00286 } NDIS_MAC_LINE_UP, *PNDIS_MAC_LINE_UP; 00287 00288 00289 typedef struct _NDIS_MAC_LINE_DOWN 00290 { 00291 IN NDIS_HANDLE NdisLinkContext; 00292 } NDIS_MAC_LINE_DOWN, *PNDIS_MAC_LINE_DOWN; 00293 00294 00295 // 00296 // These are the error values that can be indicated by the driver. 00297 // This bit field is set when calling NdisIndicateStatus. 00298 // 00299 #define WAN_ERROR_CRC ((ULONG)0x00000001) 00300 #define WAN_ERROR_FRAMING ((ULONG)0x00000002) 00301 #define WAN_ERROR_HARDWAREOVERRUN ((ULONG)0x00000004) 00302 #define WAN_ERROR_BUFFEROVERRUN ((ULONG)0x00000008) 00303 #define WAN_ERROR_TIMEOUT ((ULONG)0x00000010) 00304 #define WAN_ERROR_ALIGNMENT ((ULONG)0x00000020) 00305 00306 typedef struct _NDIS_MAC_FRAGMENT 00307 { 00308 IN NDIS_HANDLE NdisLinkContext; 00309 IN ULONG Errors; 00310 } NDIS_MAC_FRAGMENT, *PNDIS_MAC_FRAGMENT; 00311 00312 // 00313 // NDIS WAN Information structures used 00314 // by NDIS 5.0 Miniport drivers 00315 // 00316 00317 // 00318 // Defines for the individual fields are the 00319 // same as for NDIS 3.x/4.x Wan miniports. 00320 // 00321 // See the DDK. 00322 // 00323 00324 // 00325 // Information that applies to all VC's on 00326 // this adapter. 00327 // 00328 // OID: OID_WAN_CO_GET_INFO 00329 // 00330 typedef struct _NDIS_WAN_CO_INFO { 00331 OUT ULONG MaxFrameSize; 00332 OUT ULONG MaxSendWindow; 00333 OUT ULONG FramingBits; 00334 OUT ULONG DesiredACCM; 00335 } NDIS_WAN_CO_INFO, *PNDIS_WAN_CO_INFO; 00336 00337 // 00338 // Set VC specific PPP framing information. 00339 // 00340 // OID: OID_WAN_CO_SET_LINK_INFO 00341 // 00342 typedef struct _NDIS_WAN_CO_SET_LINK_INFO { 00343 IN ULONG MaxSendFrameSize; 00344 IN ULONG MaxRecvFrameSize; 00345 IN ULONG SendFramingBits; 00346 IN ULONG RecvFramingBits; 00347 IN ULONG SendCompressionBits; 00348 IN ULONG RecvCompressionBits; 00349 IN ULONG SendACCM; 00350 IN ULONG RecvACCM; 00351 } NDIS_WAN_CO_SET_LINK_INFO, *PNDIS_WAN_CO_SET_LINK_INFO; 00352 00353 // 00354 // Get VC specific PPP framing information. 00355 // 00356 // OID: OID_WAN_CO_GET_LINK_INFO 00357 // 00358 typedef struct _NDIS_WAN_CO_GET_LINK_INFO { 00359 OUT ULONG MaxSendFrameSize; 00360 OUT ULONG MaxRecvFrameSize; 00361 OUT ULONG SendFramingBits; 00362 OUT ULONG RecvFramingBits; 00363 OUT ULONG SendCompressionBits; 00364 OUT ULONG RecvCompressionBits; 00365 OUT ULONG SendACCM; 00366 OUT ULONG RecvACCM; 00367 } NDIS_WAN_CO_GET_LINK_INFO, *PNDIS_WAN_CO_GET_LINK_INFO; 00368 00369 // 00370 // Get VC specific PPP compression information 00371 // 00372 // OID: OID_WAN_CO_GET_COMP_INFO 00373 // 00374 typedef struct _NDIS_WAN_CO_GET_COMP_INFO { 00375 OUT NDIS_WAN_COMPRESS_INFO SendCapabilities; 00376 OUT NDIS_WAN_COMPRESS_INFO RecvCapabilities; 00377 } NDIS_WAN_CO_GET_COMP_INFO, *PNDIS_WAN_CO_GET_COMP_INFO; 00378 00379 00380 // 00381 // Set VC specific PPP compression information 00382 // 00383 // OID: OID_WAN_CO_SET_COMP_INFO 00384 // 00385 typedef struct _NDIS_WAN_CO_SET_COMP_INFO { 00386 IN NDIS_WAN_COMPRESS_INFO SendCapabilities; 00387 IN NDIS_WAN_COMPRESS_INFO RecvCapabilities; 00388 } NDIS_WAN_CO_SET_COMP_INFO, *PNDIS_WAN_CO_SET_COMP_INFO; 00389 00390 00391 // 00392 // Get VC specific statistics 00393 // 00394 // OID: OID_WAN_CO_GET_STATS_INFO 00395 // 00396 typedef struct _NDIS_WAN_CO_GET_STATS_INFO { 00397 OUT ULONG BytesSent; 00398 OUT ULONG BytesRcvd; 00399 OUT ULONG FramesSent; 00400 OUT ULONG FramesRcvd; 00401 OUT ULONG CRCErrors; // Serial-like info only 00402 OUT ULONG TimeoutErrors; // Serial-like info only 00403 OUT ULONG AlignmentErrors; // Serial-like info only 00404 OUT ULONG SerialOverrunErrors; // Serial-like info only 00405 OUT ULONG FramingErrors; // Serial-like info only 00406 OUT ULONG BufferOverrunErrors; // Serial-like info only 00407 OUT ULONG BytesTransmittedUncompressed; // Compression info only 00408 OUT ULONG BytesReceivedUncompressed; // Compression info only 00409 OUT ULONG BytesTransmittedCompressed; // Compression info only 00410 OUT ULONG BytesReceivedCompressed; // Compression info only 00411 } NDIS_WAN_CO_GET_STATS_INFO, *PNDIS_WAN_CO_GET_STATS_INFO; 00412 00413 // 00414 // Used to notify NdisWan of Errors. See error 00415 // bit mask in ndiswan.h 00416 // 00417 // NDIS_STATUS: NDIS_STATUS_WAN_CO_FRAGMENT 00418 // 00419 typedef struct _NDIS_WAN_CO_FRAGMENT { 00420 IN ULONG Errors; 00421 } NDIS_WAN_CO_FRAGMENT, *PNDIS_WAN_CO_FRAGMENT; 00422 00423 // 00424 // Used to notify NdisWan of changes in link speed and 00425 // send window. Can be given at any time. NdisWan will honor 00426 // any send window (even zero). NdisWan will default zero 00427 // TransmitSpeed/ReceiveSpeed settings to 28.8Kbs. 00428 // 00429 // NDIS_STATUS: NDIS_STATUS_WAN_CO_LINKPARAMS 00430 // 00431 typedef struct _WAN_CO_LINKPARAMS { 00432 ULONG TransmitSpeed; // Transmit speed of the VC in Bytes/sec 00433 ULONG ReceiveSpeed; // Receive speed of the VC in Bytes/sec 00434 ULONG SendWindow; // Current send window for the VC 00435 } WAN_CO_LINKPARAMS, *PWAN_CO_LINKPARAMS; 00436 00437 #endif // _NDIS_WAN

Generated on Sat May 15 19:40:56 2004 for test by doxygen 1.3.7