About This Guide


Note: For an overview of the changes to the software and docs, see ``What's new in TCP/IP 4.25'' below.

The Programmer's Guide is intended for developers who wish to use the socket programming interface to create TCP/IP-based applications on QNX.


Note: Throughout this guide, we assume that the QNX TCP/IP Development Toolkit has been installed on your system.

This guide contains the following chapters:

You'll also find an appendix describing the client side of the SOCKS firewall package.

You should note that the socket-programming functions described in these chapters are implementations of traditional UNIX-style network IPC developed by the University of California, Berkeley. This socket-programming interface provides an alternative to the IPC native to QNX.


Note: If your application doesn't require TCP/IP (e.g. it runs within the QNX LAN environment and portability isn't an issue), you should consider using the native QNX IPC facilities. The QNX IPC facilities use less overhead in your application, so your program will run faster. To learn more about QNX IPC, see the QNX System Architecture book.

Credits

The tutorial chapters in this guide are adapted from the following:

Stuart Sechrest,
An Introductory Socket Communication Tutorial,
Computer Science Research Group Computer Science Division,
Department of Electrical Engineering and Computer Science,
University of California, Berkeley

S.J. Leffler, R.S. Fabry, W.N. Joy, P. Lapsley, S. Miller, & C. Torek, 1986,
An Advanced 4.3 BSD Interprocess Communication Tutorial,
Computer Systems Research Group,
Department of Electrical Engineering and Computer Science,
University of California, Berkeley

Recommended reading

W. Richard Stevens,
Unix Network Programming: Networking APIs: Sockets and XTI,
2nd ed., Vol. 1,
Prentice Hall,
ISBN 0-13-490012-X.

This book describes both the XTI (streams) API and the Socket API. QNX implements the Socket API. Note that some of the features mentioned in the Stevens book aren't supported in the QNX 4.25 TCP/IP stack. These include Unix Domain Sockets, multicast support, and some of the advanced API.

What's new in TCP/IP 4.25

New functionality

New content in the docs

What's new online (as of December 02, 1998)

Corrections

A Socket-based IPC Tutorial
The tut4.c, tut5.c, and tut6.c examples have been corrected. You can find the source for the examples in the /usr/demo/src/socket directory.
Remote Procedure Call Programming
RPC programs must be compiled with the -Wc,ei option to cc (or the -ei option to wcc386).
gethostname()
Include <unix.h> to use this function.
rcmd()
The prototype has been corrected. Include <unix.h> to use this function.
res_query()
This function returns the length of a reply message, in bytes, or -1 if an error occurs.
res_search()
This function returns the length of a reply message, in bytes, or -1 if an error occurs.
rresvport()
Include <resolv.h> to use this function.
sethostname()
Include <unix.h> to use this function.
socketpair()
The list of errors has been corrected.
SOCKSinit()
This function returns 1 (not -1) if an error occurs.

The prototype has been corrected for the following functions: