README by tvbi777


									********************************************************************* ServerSplit Sample ********************************************************************* (c)2000 Microsoft Corporation. All rights reserved. The ServerSplit sample filter demonstrates the use of connection emulation for inbound connections. The filter begins by binding a socket for TCP port 3333, and waiting for connections on this port. When a WinSock proxy client requests to bind port 3333 on the proxy, the filter intercepts the request, and requests to emulate the connection. That is, the proxy does not attempt to bind a socket to that port in response to that specific client request, as that attempt would fail if more than one client is trying to bind to the same port. Instead, the proxy reports a successful bind to the client, and the filter then manages the multiplexing of incoming connections on the socket that was already bound by the filter. This technique allows internal servers behind the proxy to share listening ports and receive incoming connections from external clients. When a connection arrives to the proxy on port 3333 the proxy notifies the filter by calling the IAcceptCompletion::CompleteAsyncAccept method. The filter then checks its list of emulated connections. If the list is empty, it sends a short message and terminates the connection. Otherwise, it takes the first connection on the list and calls IConnection::EmulateConnection. The class CDataPump provides the data-pump for this connection. That connection is then moved to the end of the queue. Note: WspCfg.ini The WspCfg.ini file should be modified and placed on the internal server machine, in the directory where the server executable resides. The first line in the file should be modified so that it contains the name of your server application executable file. For more information on WspCfg.ini, see the ISA product documentation. Filter installation requirements are described in the "Filter Setup" topic of the ISA SDK documentation. The following is a summary of what you will find in each of the files that make up this sample: ServerSplit.dsp ServerSplit.dsw Project and workspace files compatible with Visual C++ 6.0 ServerSplit.def Defines the functions that the DLL exports. This file was generated by the ATL COM AppWizard and was not modified.

ServerSplit.rc This is a listing of all the Microsoft Windows resources that the program uses. The file was generated by the ATL COM AppWizard. Some of the REGISTRY entries added by Visual C++ are not required, and were manually removed. ServerSplit.cpp This file was generated by the ATL COM AppWizard. It contains the DLL entry point, DllCanUnloadNow, DllGetClassObject, DllRegisterServer and DllUnregisterServer. All are generated by the wizard. The wizard-generated code was modified to also register the filter class as a firewall filter. ServerSplit.h This file declares the CLSIDs for the objects for this project. DataPump.cpp DataPump.h These files implement a data-filter object - an object that implements IWspDataFilter interface. This data filter pumps data between a socket accepted from the external listening socket and a socket connected to a proxy client. SplitFilter.cpp SplitFilter.h These files implement the filter object class - a class that implements IWspFilter interface. A single instance of this object is generated by the proxy. When the filter object is initializing, it creates an external socket that is listening on SAMPLE_TCP_PORT. Connections accepted on that socket are forwarded to listening proxy clients. SplitFilter.rgs This file is included as a Windows resource by ServerSplit.rc. ATL uses this file to register the filter object class as a COM class. SplitterSessionFilter.cpp SplitterSessionFilter.h These files implement a session filter object - an object that implements ISessionFilter interface. The session filter implemented here is emulating bind requests on SAMPLE_TCP_PORT. This enables multiple proxy clients to bind on the same port. resource.h This is the standard header file, which defines new resource IDs. Visual C++ reads and updates this file. The file was generated by the ATL COM AppWizard StdAfx.cpp StdAfx.h These files are used to build a precompiled header (PCH) file

named ServerSplit.pch and a precompiled types file named StdAfx.obj. The files are generated by the ATL COM AppWizard. WspCfg.ini The purpose of this file is ducumented in ISA documentation. This file should be modified and placed in the internal server machine, in the same directory where the server executable resides. The first line in the file should be modified so that it will contain the actual executable file name of your server application.

To top