WinSock 2 Information

Note: Some of the information contained in this document was culled from the readme file that accompanies the Windows Sockets 2 documentation.

[Go to top]


WinSock 2 Overview

Windows Sockets Version 2.0 is the successor to version 1.1, which has been the standard since its release in January of 1993. WinSock version 1.1 has met, if not exceeded, its authors' original intent to provide a powerful and flexible API for creating universal TCP/IP applications. You can create any type of client or server TCP/IP application with an implementation of Windows Sockets based on the version 1.1 Windows Sockets specification. You can port Berkeley Sockets applications and take advantage of the message-based Microsoft Windows programming environment and paradigm. But that's not to say that WinSock cannot provide more.

The authors of Windows Sockets version 1.1 intentionally limited its scope to expedite the process and ensure its success. WinSock 1.1 deals primarily with TCP/IP because the software vendors involved sold TCP/IP network software, but it also conveniently allowed them to ignore the difficult issue of how to provide a single API for multiple vendors simultaneously. This focus on TCP/IP did not preclude the possibility that WinSock--like its Berkeley Sockets Model--could support other protocol suites at some point in the future. The future is now.

Windows Sockets version 2.0 (WinSock 2) formalizes the API for a number of other protocol suites-- DecNet, IPX/SPX, and OSI--and allows them to coexist simultaneously. WinSock 2 also adds substantial new functionality. Most importantly, it does all this and still retains full backward compatibility with the existing 1.1--some of which is clarified further--so all existing WinSock applications can continue to run without modification.

WinSock 2 goes beyond simply allowing the coexistence of multiple protocol stacks; it also allows the creation of applications that are network-protocol independent. A WinSock 2 application can transparently select a protocol based on its service needs. The application can adapt to differences in network names and addresses using the mechanisms WinSock 2 provides.

WinSock 2 also clarifies existing ambiguities in the 1.1 WinSock specification and adds new extensions that take advantage of operating-system features and enhance application performance and efficiency. Finally, WinSock 2 includes a number of new protocol-specific extensions. These extensions--such as the multicast socket options described in Chapter 16, are relegated to a separate annex, since the main WinSock 2 protocol specification is protocol-independent.

Ideally, the intermediate layer is virtually transparent and does little more than maintain the registry of service providers.


WinSock 2 Architecture

As we mentioned earlier, the authors of WinSock version 1.1 deliberately limited its scope in the name of expediency. One result of this is the simple architecture of WinSock 1.1. A single WINSOCK.DLL (or WSOCK32.DLL) provides the WinSock API, and this DLL "talks" to the underlying protocol stack via a proprietary programming interface. This works fairly well since v1.1 WinSock only supports one protocol suite--TCP/IP--and most computers running Windows have only a single network interface.

However, this architecture limits a system to only one WinSock DLL active in the system path at a time. As a result, it is not easy to have more than one WinSock implementation on a machine at one time. There are legitimate reasons to want multiple WinSock implementations. For example, one might want a protocol stack from one vendor over the Ethernet connection and a different vendor's stack over the Serial Line.

WinSock 2 has an all-new architecture that provides much more flexibility. The new WinSock 2 architecture allows for simultaneous support of multiple protocol stacks, interfaces, and service providers. There is still one DLL on top, but there is another layer below, and a standard service provider interface, both of which add flexibility.

WinSock 2 adopts the Windows Open Systems Architecture (WOSA) model, which separates the API from the protocol service provider. In this model the WinSock DLL provides the standard API, and each vendor installs its own service provider layer underneath. The API layer "talks" to a service provider via a standardized Service Provider Interface (SPI), and it is capable of multiplexing between multiple service providers simultaneously. The following sketch illustrates the WinSock 2 architecture.

     +---------------+        +----------------+
     |   WinSock 2   |        |   WinSock 1.1  |
     |  Application  |        |   Application  |
     +---------------+        +----------------+
             |                        |
             |            +----------------------+ -- WinSock
             |            | WINSOCK.DLL (16-bit) |    1.1 API
             |            | WSOCK32.DLL (32-bit) |
             |            +----------------------+
             |                        |
    +---------------------------------------------+ -- WinSock
    |            WS2-32.DLL (32-bit) --           |    2.0 API
    +---------------------------------------------+
                           |
    +---------------------------------------------+ -- WinSock
    |+-----------+ +--------------+ +------------+|    2.0 SPI
    ||  TCP/IP   | | TCP/IP-based | | additional ||
    || transport | |   namespace  | |   service  ||
    ||  service  | | service pro- | |  providers ||
    ||  provider | | vider (DNS)  | | (SPX, etc.)||  
    |+-----------+ +--------------+ +------------+|
    +---------------------------------------------+
Note that the WinSock 2 specification has two distinct parts: the API for application developers, and the SPI for protocol stack and namespace service providers. Notice also that the intermediate DLL layers are independent of both the application developers and service providers. These DLLs are provided and maintained by Microsoft and Intel.


WinSock Version 2 Specifications

The specification for WinSock 2 is actually made up of several seperate documents. Each of these documents are available in the 3 different formats: MS Word for Windows (.doc), Text (.txt) and Postscript (.ps). They are BIG (250+ pages each), so you are encouraged to print double-sided, if possible.


Web & FTP Sites for WinSock 2 Specifications

You can retrieve copies of the current provisional specifications for the WinSock 2 API, Protocol Specific Annex, and WinSock 2 SPI from the following World Wide Web sites.

...or from the following FTP Sites:

The current draft version of the Name Resolution Extensions specification is available via FTP from:


Status Report - December 15, 1995

At present, WinSock 2 is essentially only on paper as a specification. There are no WinSock 2 compliant implementations available yet. The intermediate layer--the WS2-32.DLL--is not yet available. This DLL constitues the major component in the WinSock 2 Software Development Kit (SDK). Once the SDK becomes available, Service Providers can finish their work, and when they make their offerings available, the wider WinSock application development community can do their development over the API.

Here is the latest status report from Martin Hall, the WinSock 2 working group chairman.

Date: Fri, 15 Dec 1995
To: winsock-2@mailbag.jf.intel.com
From: Martin Hall 
Subject: WinSock 2 Status Update

--------------------------
 WinSock Version 2 Update                        December 15, 1995
--------------------------

On behalf of everyone continuing to work on the WinSock 2 project, 
I have several information items to pass on.

1. WinSock 2 will be in the forthcoming beta of Windows NT    
which is often referred to as the "Shell Update Release" (SUR) or  
Windows NT Version 4. Although we don't have an exact date for that 
release, it is expected to be available no later than Q1 '96.

2. Because of the immininence of the first WinSock 2 "bakeoff" which 
was originally scheduled for February 1996, we'd like to reschedule the 
first bakeoff to the week beginning March 25 1996.

3. In order to accelerate the availability of WinSock 2 Service 
Providers, Intel will be making available pre-beta development 
components for service provider developers.  These components will 
not be useful to WinSock 2 application developers. Please contact 
Dan Ohlemacher at Intel Architecture Labs for more details by 
sending email to Dan_Ohlemacher@ccm.jf.intel.com

regards,
Martin Hall (for and on behalf of everyone working on WinSock 2)

----------------------- Previous Update -----------------------            
Date: Wed, 1 Nov 1995
To: winsock-2@mailbag.intel.com
From: Martin Hall 
Subject: * WinSock 2 Update *


------------------------
WinSock Version 2 Update                      November 1, 1995
------------------------
I'm sending this on behalf of many people who continue
to invest large amounts of time in the WinSock effort.
Intel & Microsoft have been working especially hard
over the last few months developing the infrastructure
software components.

This is an important update on the status and availability
of the WinSock 2 runtime environment, SDK and specs. It also
includes details of several planned events.

--------------
WINSOCK 2 BETA
--------------
For several months, Intel and Microsoft have been working
jointly to create the WinSock 2 runtime environment and
SDK.

The BETA will include 3 general components:
1. The WinSock 2 runtime system
     WinSock 2 DLL
     WinSock 1.1 compatibility DLL's
     Binaries for Sample Service Providers (both transport
     and name res)

2. The WinSock 2 SDK
     Header files, libraries, help files, sample code
     for both WinSock 2 applications and the included
     sample service providers (transport and name res)

3. WinSock 2 Specs

There are 2 BETA releases of the WinSock 2 SDK planned.
The components in the BETA will be non-redistributable.
i.e. they are intended for developer use only. The
final SDK will include redistributable run-time
components for Win 95.  Redistributable run-time
components for Win NT will not be needed since these
will be integrated into the next retail version of Win NT.

WinSock 2 Beta Release 1
------------------------
Release Date:  Planned to be coincident with the BETA of the 
	         next retail version of Windows NT, often referred to
               as the "Shell Update Release". When the exact
               date is known, we'll publish it to this list
               and on appropriate Web sites.

Availabililty:     All MSDN Level 2 subscribers

Components:    All Components for 32-bit WinSock 2 app and SP development
               on Windows NT. The WinSock 2 DLL for Win 95 will also
               be available so that Win 95 service providers can be
               developed. Updated specs with errata folded in.

WinSock 2 Beta Release 2
------------------------
Release Date:     Availability is currently anticipated in January
                  1996.

Availabililty:     FTP and Web Sites

Components:    Components for 32-bit WinSock 2 app development
               on Windows NT AND Windows 95.
               Setup program for installation of redistributable
               Win 95 runtime components AND 3rd party service providers.

-------------------------
BAKE-OFF'S/WINSOCKATHON'S
-------------------------
Interoperability testing events have been a key part of the
WinSock definition process. Two WinSock 2 Bake'Off's have been
scheduled to facilitate testing of WinSock 2-enabled applications
with the WinSock 2 subsystem and WinSock 2 Service Providers.

WinSock 2 BakeOff Number 1
--------------------------
Date:      March 21-25, 1996     (rescheduled from February 20-23, 1996)
Venue:     Stardust WinSock Labs

WinSock 2 BakeOff Number 2
--------------------------
Date:      March 18-22, 1996
Venue:     TBD

As has always been the case in the past, bakeoffs are open to
all parties at no charge.  It is NOT necessary to be a member
of Stardust's WinSock Labs to participate.

----------------
FINAL SPEC & SDK
----------------
Current Target Completion Date: May/June 1996

--------------
SPRING INTEROP
--------------
Using Interop as the venue to make a WinSock 2 splash
and to showcase early WinSock 2 software makes a lot
of sense given current timelines. Microsoft has expressed
an interest in coordinating several activities to
raise general awareness of WinSock 2.  As things become
firmer, we'll post them to this list.

      ---------------------------------------------------------
      |                      Martin Hall                      |
      |                  martinh@stardust.com                 |    
      |                                                       |   
      |                 STARDUST TECHNOLOGIES                 |
      |  http://www.stardust.com      ftp://ftp.stardust.com  |           
      |                                                       |
      |  Phone: 408 879 8080        1901 S. Bascom Ave, #333  |
      |  Fax:   408 879 8081        Campbell, CA 95008        |
      ---------------------------------------------------------


WinSock 2 Mailing Lists

There is a single mailing list for all suggestions, questions, and comments regarding the WinSock 2 specifications. It is called, appropriately, "winsock-2," and maintained at Intel Research Labs.

To subscribe to winsock-2, send an email message to
majordomo@mailbag.intel.com

Leave the subject blank, place the following line of text in the body:
subscribe winsock-2 [address]

You need only specify [address] if the address you want subscribed is *not* the same as the address from which you are sending the email to majordomo. Majordomo will send mail back to you confirming your subscription.

For information on other commands available from the winsock-2 majordomo send the following line of text in the body:
help