Chapter Contents

Previous

Next
Porting UNIX Socket Applications to the SAS/C Environment

Socket Library Restrictions

While almost every socket-related BSD function is available in the SAS/C Library, not all of the traditional UNIX features of these functions are available. The descriptions in Socket Function Reference, describe the features of each function. This section contains a summary of the most significant restrictions.


Socket Descriptors

With Release 6.00 of the SAS/C Compiler, socket descriptors are assigned from the same range and according to the same rules as UNIX file descriptors. This aids in the porting of socket applications, since many such applications depend on this particular assignment of socket numbers. If USS is installed and running, the maximum number of open sockets and hierarchical file system (HFS) files is set by the site; the default is 64. If USS is not installed or not active, the maximum number of open sockets is 256. Note that programs written for previous releases of SAS/C software, which assume that socket numbers range from 256 to 511, may need to be modified to accommodate UNIX compatible socket number assignment.


Addressing Families

The BSD socket library design supports the use of more than one type of transport mechanism, known as the addressing family. UNIX implementations usually support at least two addressing families: AF_INET and AF_UNIX . AF_INET uses TCP/IP to transport data. AF_UNIX transports the data using the UNIX file system.

With integrated sockets, either AF_INET or AF_UNIX can be used. With non-integrated sockets, only AF_INET can be used. Programs that use AF_UNIX can usually be modified to use AF_INET .


Sockets

Many of the restrictions in the use of UNIX features are caused by the underlying TCP/IP implementation. These restrictions may vary, depending on the TCP/IP vendor and release. Vendor-specific restrictions affect the following:

In addition, there are the following general restrictions:


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.