[Index of Books][Next Chapter]

TCP/IP for DOS Socket Library Reference

Chapter l. Introduction

The TCP/IP for DOS Toolkit provides facilities to develop applications suitable for TCP/IP-based networks. The toolkit includes the TCP/IP for DOS C language header files and runtime socket libraries for the DOS and Windows environments.

Using this toolkit, you can develop applications for DOS workstations connected to any network type supported by a network board with a Multi-Link Interface Device (MLID) driver conforming to the Novell Open Datalink Interface (ODI) specification. These applications can then communicate with other TCP/IP-based systems. You can also communicate with other TCP/IP-based networks that are connected to your network through IP routers. You can develop applications that run either in a DOS runtime environment or in a Microsoft Windows v3.0 or v3.1 environment.

To use the toolkit, you need a PC, a PS/2, or a compatible system that is running DOS. To run programs developed using the toolkit, your PC workstation needs to be connected to a network. You also need v5.1, v6.0, or v7.0 of the Microsoft C Optimizing Compiler, or v3.0 or later of the Borland C++ compiler.

If you are developing applications to run under Microsoft Windowsv3.0 or v3. l, you also need the Microsoft Windows Software Development Kit for your version of Windows.

NOTE: In this manual, the term workstation refers to personal computers or PCs running DOS. Supported models include PC ATs, Compaqs, IBM PSl2s, and compatible systems.

Overview

This toolkit has been designed for programmers who are developing network application software. The toolkit uses the TCP/IP for DOS TCP/IP Transport software, a part of the TCP/IP for DOS product.

NOTE: The TCP/IP Transport software is not included on the NetWare Communication Services disk. It is installed on your workstation when you install the separate TCP/IP for DOS product. See the TCP/IP for DOS Configuration Guide or the LAN WorkGroup Configuration Guide for this procedure.

The TCP/IP TCP/IP Transport uses the following standard protocols:

The applications you develop can communicate with all network nodes that use standard TCP/IP transport software. For more information about the TCP/IP Transport software refer to the TCP/IP for DOS Administrator's Guide.

When you use this toolkit, you are not tied to a particular network board or network medium. The transport software is hardware independent. It supports the Novell ODI specification. Because many popular network boards have an ODI driver conforming to this specification, users of your application have their choice of board and network medium, including Ethernet (IEEE 802.3), ARCnet, and token ring.

When your program sends or receives data over the network, it makes function calls to the socket library provided in this software. The socket library interface, based on the socket programming style popularized by the 4.3BSD version of the UNIX operating system, has been tailored to the DOS environment. The socket libraries provided in this toolkit include both traditional synchronous socket functions and asynchronous socket functions, which allow for parallel processing within applications.

The DOS socket functions are provided for programs designed for the DOS environment. The Windows socket functions are provided for programs designed for the Microsoft Windows 3.0 or 3.1 environment. The Windows socket library functions are compatible only with Microsoft Windows v3.0 and v3.1. Additional socket library routines are provided to obtain transport-related system and network configuration information, such as name-address mapping.

A set of sample application programs is also included in the toolkit (\NET\SAMPLE directory). These samples illustrate the details of socket usage. You can refer to these sample applications as examples of how the toolkit functions are used and include segments of code from them in your application programs. Listings of the sample programs are provided in Appendix D.

Toolkit Contents

The TCP/IP for DOS Toolkit includes the following software components:

Directory \NET\BIN

Contains WLIBSOCK.DLL: the Windows v3.0 and v3.1 dynamic link library with Windows library functions.

NOTE: WLIBSOCK.DLL is installed as part of the TCP/IP for DOS product, and is not included on the toolkit disk. This dynamic link library (DLL) is required to run Windows applications that use sockets.

Directory \NET\TOOLKIT\LIB

Contains the following Microsoft C static link library modules:

Contains the following Borland C++ static link library modules:

Directory \NET\TOOLKIT\INCLUDE

Contains the C-language header files that must be included by application programs using the socket library.

NOTE: To access the include files and libraries when you compile and link your applications, you must set the INCLUDE and LIB environment variables (Microsoft C) or configure the TURBOC.CFG file (Borland C++) to add these directories to your compile and link paths, or copy the files to an included directory. See the section "Configuring the Software" in Chapter 2 and your compiler manuals for more information.

Directory \NET\TOOLKIT\SAMPLE

Contains C-language example application programs and makefiles demonstrating the use of socket library functions.