|
|
PCAUSA Sample NDIS Intermediate Driver (PCASIM)
|
V3.05.06.16 - June 15, 2003 |
| 1.) New source code
directory layout
1.1) WAS: \PCADev\NDISIM\... IS : \PCADev\NDISIM\nnnn\... Where nnnn is the "Build Number", constructed from teh last two bytes of the Version Number. For example, the Build Number for V3.05.06.16 is 616. 1.2) Reorganized applications and drivers into common folder. For example, TDIEcho application and driver are now inder one folder: Application: \PCADev\NDISIM\513\PktRedir\App Driver: \PCADev\NDISIM\513\PktRedir\Driver 2.) Fixed Bug Check 0xC9 in PCASIM_DeviceClose. Call to NdisReleaseSpinLock was conditional; should be unconditional. 3.) In UTIL_htonl and UTIL_htons functions now use RtlUlongByteSwap and RtlUshortByteSwap system functions instead of private code. 4.) Added PCASIM_GetAdapterVendorDescription() function to PCAImApi DLL. Supports ANSI and UNICODE character sets. 5.) Revised Packet Redirector sample applications. 5.1) Some applications now have simple console-based adapter chooser instead of using hard-coded MAC addreses. 5.2) More extensive use of opening adapter by name (PCASIM_OpenXYZAdapter) instead of by Link Address (PCASIM_OpenXYZAdapterByLinkAddress). 5.3) User-Mode Rx Loop Test (UMRxLoop) replaces previous PRTest5. 6.) Created new Network Driver Helper (NDH) export library. NDHelper.lib encapsulates some functions of broad interest in the development of any type of network driver that is not limited to exclusive use of NDIS library. Example functions moved to NDHelper library include: NDH_htonl NDH_ntohl NDH_htons NDH_ntohs NDH_in_cksum NDH_ChecksumPacket NDH_ReadOnPacket 7.) Updated PnP code (PnP.c) for NDIS 5.1. Note that the differences in PnP are sufficient to REQUIRE a separate driver for NDIS 5.0 (Windows 2000) and NDIS 5.1 (Windows XP and higher). Also note that the PCAUSA samples do not use packet stacking. Because of this there are some differences between the PCAUSA and Microsoft PnP handlers. 8.) Changed design to use separate packet pool for send and receives. The prior single-pool design has been satisfactory if appropriate packet re-initialization is done. However, best to follow Microsoft guidelines. As part of this modification use of SList to cache packets for re-use was removed. 9.) Updated W32NDIS.h to include 802.11 OID definitions and associated structures. 10.) Fixed or identified problems using NDIS Tester V4.03.0030 from HCT Test Kit 11.2: 10.1) PerformanceBlast test stopped abnormally because a number of send packets were not returned within required 10.5 second interval. The cause of this problem was that the driver did not handle resource allocation failure (context allocation in UTIL_RepackagePacketForSend) in the send path. An interium fix was made in IMFilter_HandlePacketToSend so send packets are silently dropped when required resources are not available. This is NOT a complete fix. A more complete fix would include: 1.) Growing the driver's context pool when necessary (it is currently fixed size). 2.) Queuing packets passed to MPSendPackets if resources are not available. 11.) Made improvements in driver for handling OID_PCASIM_ENUMERATE_BINDINGS. Although no problems have been reported with this facility, code examination in parallel with other work showed that there was a possibility that the list-termination NULL would not be present in some situations. This, of course, would cause a fault in the user mode application. See the OID_PCASIM_ENUMERATE_BINDINGS case in the PCASIM_QueryPrivateInformation routine in the devmjfcs.c module. 12.) Made some tests with both PCASIM and the Microsoft PassThru sample concurrently installed on Windows XP SP1. No problem observed in quick test using primarily ping. May run NDIS Tester on this configuration later. 13.) Very minor changes to .INF files. Checked with Chkinf. There are errors. HOWEVER, the errors reported do not make much sense AND the same errors are reported for the PassThru .INFs. 14.) Fixed memory leak in _PCASIM_OpenAdapter routine in PCAImApi DLL. Temporary structure used to pass adapter name to driver was never freed. Leak would be observed if adapter _PCASIM_OpenAdapter was called frequently. (This routine does the work for PCASIM_OpenVirtualAdapter and PCASIM_OpenLowerAdapter...) 15.) Made modifications to driver UTIL_FindAdapterByVirtualAdapterName and UTIL_FindAdapterByAdapterName routines in util.c. 15.1) Now hold AdapterListLock while searching adapter list. 15.2) Now use length check and NdisEqualMemory for name comparison. This match is now case-sensitive, but it can be safely performed at IRQL == DISPATCH_LEVEL. Previously NdisEqualString was used... 16.) Fixed bug in sanity check in CLRequestComplete function in driver ndisreq.c module. Sanity check is intended to handle some observed cases where a miniport query may return a value of BytesWritten that is larger then the actual InformationBufferLength. The bug was that the check was inadvertantly performed on both both queries and on set information requests. Revised check now operates only on NdisRequestQueryInformation. 17.) Added reference counting to driver's ADAPTER and W32N_OPEN_CONTEXT memory. Calls to NdisRequest now ref/deref these counters. 18.) Replaced some calls to NdisAllocateMemory with NdisAllocateMemoryWithTag. 19.) Fixed logic bug in driver MPSendPackets routine in send.c. The packet list processing code SendAction == SEND_FILTER_ACTION_DROP_PACKET was faulty. When this SendAction was returned the rest of the packets in the list were not processes. Fix was to replace a return call with continue.
|
V2.04.05.15 - March 22, 2002 |
| 1.) Reworked LOOPBACK locic.
The logic faults prevented UDP broadcasts to the
local host from being properly looped back and also
could present confusing LOOPBACK data to higher level protocols (such
as a network monitor). 1.1) PassThru Sample A.) NDIS_MAC_OPTION_NO_LOOPBACK is removed from the NDIS IM driver's miniport MacOptions. This prevents NDIS from doing software loopback of packets passed to the NDIS IM driver's send handlers. B.) Do _NOT_ set NDIS_FLAGS_DONT_LOOPBACK in packets that we send on the lower miniport. The net effect is that of PassThru the LOOPBACK is performed only once by the lower miniport driver. This is _NOT_ appropriate for all NDIS IM's, however. 2.) Certain adapter/miniport/Windows version combinations have been reported to have problems with the NDIS IM sample drivers. The one reported most often is: SMC EtherEZ 8416 (Realtek-based, ISA, Combo card) Windows 2000 SP1 Driver V3.12.0.0 dated 10/19/1999 (From Windows 2000 CD) The most serious problem observed with this specific adapter/miniport/version combination is that it does not correctly set the BytesWritten field in the NDIS_REQUEST structure when queries are completed. In some cases the BytesWritten field may be larger then the InformationBufferSize. If this case, if BytesWritten is used without sanity checking then a page fault can occur when accessing the information buffer. 2.1) Added sanity checks to CLRequestComplete() in NDISREQ.C to force BytesWritten to be less than or equal InformationBufferSize before passing the query information on for further processing. This eliminated some page faults when making queries for strings - like OID_GEN_VENDOR_DESCRIPTION. Also added similar sanity check in PCAImApi DLL. The PCASIM_DoMakeRequest() routine in REQUEST.C was modified. 2.2) Change 1.1) eliminated most page faults when operating with this adapter. However, the NDIS IM was still not cimpletely functional. One problem was that when querying for OID_GEN_CURRENT_ADDRESS the BytesWritten field was still not correct. For example, the BytesWritten value was reported to be eight(8) when it should have been six(6). This prevented the PCASIM_OpenXXXAdapterByLinkAddress() routines from finding a match on the Ethernet address because the PCASIM_GetAdapterCurrentAddress() fetched a bogus 8-byte address that was later compared to a 6-byte address with no joy. Modified PCASIM_GetAdapterCurrentAddress() to ignore BytesWritten - at least for Ethernet. Now ImUtil and LANRxMon work OK with this flakey adapter/driver/version combination. 3.) Another fix for Reaktek/SMC receive bug. Modified CLReceiveIndication() to test lower adapter NDIS_MAC_OPTION_TRANSFERS_NOT_PEND bit. If bit set, ignore LookAheadBufferSize and assume full packet is actually present. Use PacketSize instead of LookAheadBufferSize, and do _NOT_ call NdisTransferData. NOTE: This fix has been reported to help some users, but may not actually be valid. This will be tested further *** 4.) At least one NDIS protocol (Nortel VPN Client V4.10) has been observed to call ProtocolBindAdapter with a NULL pointer for return Status. Added self-protection in the drivers CLBindAdapterHandler() in the adapter.c module. 5.) Code in CLRequestComplete() which monitored and modified some OIDs did not account for the possibility of of being given a NULL pointer for InformationBuffer for some OIDs that ALWAYS have predefined length of ULONG. These included: OID_GEN_MAXIMUM_SEND_PACKETS OID_GEN_MAC_OPTIONS Customer feedback reports that WHQL NDIS Tester does this. Added code to properly handle this possibility. |
V1.00.01.06 - August 11, 1999 |
| 1.) In ARUtil.c, now
properly test for presence of additional command-line arguments before making call to
strcmpi for "/wait? option. Previously, could get error whan strcmpi was called with pointer to NULL string. 2.) In the ipfilter.c module of the PCASIM IPPass version, the filter's per-adapter context was not inserted into the adapter context list in the IPFilter_OnAddAdapter routine. This caused IPFilter_FindFiltAdptContext to fail to find the adapter context. 3.) Incorrect check for packet status after calling NdisMIndicateReceivePacket. Several places: 4.) In MPSendPackets, did not handle case where NumberOfPackets was greater than MAX_LOCAL_PACKET_ARRAY. 5.) Added code suggested by Microsoft to deal with case MPReturnPacket possibly being called before NdisMindicateReceivePacket returns. |
V1.00.01.07 - March 10, 2000 |
| 1.) This
release fixes an ASSERT was generated when PCASIM is started under CHECKED
build. The ASSERT was caused when NdisEqualString is called at IRQL
DISPATCH_LEVEL because it was within a SpinLock; the function should only
be called at IRQL PASSIVE_LEVEL.
2.) Fixed bug in receive handling for legacy adapters such as the 3Com 3C509. The bug was associated with an incorrect call to NdisTransferData when a legacy adapter did not indicate a complete packet to the receive handler. |
|
PCAUSA Home ·
Privacy Statement ·
Products ·
Ordering ·
Support ·
Utilities ·
Resources
|