Home Up Search PCAUSA HomeTDI Client 9X/NT

Win32 NDIS TDI Client 9X/NT Protocol Filter 95/98 Redirector 95/98 FAQ License & Warranty

 

Application Help
Release Notes
Downloads

This paragraph contains a brief description of the product ...

TDI Client Samples For Windows 95 And Windows NT

The TDIClient Sample demonstrates how to use the Windows Transport Data Interface (TDI) in both the Windows 95 VxD environment and the Windows NT kernel-mode driver environment.

Samples which illustrate kernel-mode access to network protocols are important in the development of a variety of system components such as file system redirectors. Having sources to a simple, working TDI client is also of use during the development of TDI drivers for the Windows 95 environment.

The TDIClient sample includes both a Windows 95 VxD driver and a Windows NT kernel-mode driver. Each implement a fully-functional TCP Echo Server, as described by RFC 862.

 

About The Transport Data Interface (TDI)

The Windows Transport Data Interface (TDI) is a networking API used extensively in the Windows NT environment as the upper-edge of network protocol drivers such as TCP/IP. The Windows NT DDK provides extensive documentation of the TDI API, a sample TDI driver and guidelines for modifying the sample TDI driver.

The TDI interface is also used in the Windows 95 environment at the upper-edge API for the Microsoft TCP/IP protocol stack. However, the Windows 95 implementation of TDI is only sparsely documented in the VXDTDI.ZIP file provided by Microsoft leave-site.gif (117 bytes).

Microsoft does not provide samples which illustrate the use of the TDI interface except in the NTIFSKIT, which is licensed separately from the Microsoft MSDN and illustrates use of the NETBIOS protocol on the Windows NT platform only.

 

Functional Description Of The Samples

The TDIClient sample implements a TCP Echo Server, as described by RFC 862, which operates autonomously at kernel-mode after it is installed.

The implementation of a Echo Server at the kernel level illustrates most of the TDI functions associated with the connection-oriented TCP protocol. This includes the mechanisms to open and associate an IP address, how to listen for connection attempts, how to accept a new connection and the process of receiving and sending TCP packets and orderly disconnection.

The TDIClient sample implements the TCP Echo Server as a VxD in the Windows 95 environment and as a kernel-mode driver in the Windows NT environment. Drivers for both environments are dynamically loaded and unloaded.

The code for both environments closely parallels each other. To emphasize the similarity, PCA introduces VxDTdiBuildXxxx macros for Windows 95, which are similar to the TdiBuildXxxx macros commonly used for Windows NT. Although this approach is not perfect, it is useful.

Wherever practical, the use of callbacks and asynchronous event handlers is illustrated.

 

The TDIClient sample demonstrates the use of the following TDI API functions:

TDI_CONNECT
TDI_ACCEPT
TDI_SEND
TDI_RECEIVE
TDI_DISCONNECT
TDI_DISASSOCIATE_ADDRESS
TDI_SET_EVENT_HANDLER
Opening An Address Object
Opening A Connection Object

The TDIClient sample makes extensive use of the TDI callback mechanism, including these specific callbacks:

AssociateAddressCallback
ClientEventConnect
ConnectedCallback
SendCallback
TransferDataCompleteCallback
ClientEventReceive
DisconnectCallback
SetEventCallback

 

The TDIClient illustrates the use of these NDIS functions for list, packet and buffer management:

IsListEmpty
RemoveHeadList
InsertTailList
NdisQueryPacket
NdisUnchainBufferAtFront
NdisFreeBuffer
NdisReinitializePacket
NdisFreePacket
RemoveEntryList
InitializeListHead
CONTAINING_RECORD
NdisAdjustBufferLength
NdisAllocatePacket
NdisAllocateBuffer
NdisAllocatePacketPool
NdisAllocateBufferPool
 

Dynamic Device Driver Loaders

TDIClient includes a Win32 application which dynamically loads, controls and unloads the TDI Echo Server drivers. In the Windows 95 environment the application uses the CreateFile mechanism to dynamically load and unload the TDIECHO VxD. In the Windows NT environment the application uses the NT Service Control Manager to load and unload the TDIECHO.SYS kernel-mode driver.

 

Testing The Echo Server Sample

In order to test a TCP Echo Server you must have a companion TCP Echo Client application. PCA used the SIMPLTST32 Echo Client sample WinSock application from the book Windows Sockets Network Programming leave-site.gif (117 bytes)by Bob Quinn, and Dave Shute. Many of the samples from their book can be downloaded from http://www.sockets.com/sample.htm leave-site.gif (117 bytes).

By permission of the authors, the SIMPLTST32 Echo Client application is included with the TDIClient sample executables to allow you to test the Echo Server.

 

TDI Sample Executable Installation

warning.gif (151 bytes)Before testing the TDI Echo Server you must install the Microsoft TCP/IP protocol. The TCIClient installer does not do this for you. You should also confirm that MSTCP is working properly using Microsoft-provided utility such as PING.

TDIClient demonstration executables are distributed as a self-extracting file which includes a standard Windows application installer. Simply double-click on the ASETUPEX.EXE file after downloading to install TDIClient in either the Windows 95 or Windows NT 4.0 environment.

TDIClient includes a Win32 application which dynamically loads, controls and unloads the TDI Echo Server drivers. You do not use the Windows Network Control Panel to install any of the TDIClient components.

 

Development Environment

The TDI Client Sample project is built under Microsoft Visual C/C++ V4.2 using the Microsoft Device Driver Development Kit (DDK) in the Windows NT 4.0 environment.

warning.gif (151 bytes) In order to compile the TDI Client Sample for Windows 95 VxD sources you must use the VtoolsD VxD development framework from Vireo Software. Vireo Software can be contacted at http://www.vireo.com leave-site.gif (117 bytes).

Compilation for the TDI Client Sample for Windows NT protocol driver requires the Windows NT Device Driver Kit (DDK) from Microsoft.

 

Pricing

SKU DESCRIPTION PRICE
TDICLIENT-95/NT-007 TDI Client Sample For
Windows 95 & Windows NT
$395.00

 

 

 

WinDis 32 is a trademark of Printing Communications Assoc., Inc.
Microsoft, MS, Windows, Windows 95, Windows 98, and Win32 are registered trademarks and Visual C++ and Windows NT are trademarks of the Microsoft Corporation.
Send mail to webmaster@pcausa.com with questions or comments about this web site.
Copyright © 1996-1999 Printing Communications Assoc., Inc.
Last modified: May 17, 1999