DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
API compatibility

Sockets compatibility notes

accept source compatibility notes

In SCO OpenServer, the *addrlen parameter is an int. In SCO UnixWare 2.1.X and UnixWare 7, it is declared as size_t.

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


EWOULDBLOCK
The socket is marked as non-blocking and no connections are present to be accepted.

EPROTO
A protocol error has occurred; for example, the STREAMS protocol stack has not been initialized.

ENODEV
The protocol family and type corresponding to s could not be found in the netconfig file.

ENOMEM
There was insufficient user memory available to complete the operation.

ENOSR
There were insufficient STREAMS resources available to complete the operation.

SCO OpenServer can return EFAULT (the addr parameter is not in a writable part of the user address space), which is not returned by UnixWare 7 and SCO UnixWare 2.1.X.

bind source compatibility notes

In SCO OpenServer, the *namelen parameter is an int. In SCO UnixWare 2.1.X and UnixWare 7, it is declared as size_t.

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


EINVAL
namelen is not the size of a valid address for the specified address family.

ENOSR
There were insufficient STREAMS resources for the operation to complete.

EAFNOSUPPORT
The specified address is not a valid address for the address family of the specified socket.

EOPNOTSUPP
The socket type of the specified socket does not support binding to an address.

EISCONN
The socket is already connected.

ENAMETOOLONG
Pathname resolution of a symbolic link produced an intermediate result whose length exceeds PATH_MAX.

ENOBUFS
Insufficient resources were available to complete the call.

ENOTDIR
A component of the path prefix of the pathname in name is not a directory.

ENOENT
A component of the path prefix of the pathname in name does not exist, or the pathname is an empty string.

EACCES
Search permission is denied for a component of the path prefix of the pathname in name, or the requested name requires writing in a directory with a mode that denies write permission.

ELOOP
Too many symbolic links were encountered in translating the pathname in name.

ENAMETOOLONG
A component of the pathname exceeded NAME_MAX characters, or an entire pathname exceeded PATH_MAX characters.

EIO
An I/O error occurred while making the directory entry or allocating the inode.

EROFS
The inode would reside on a read-only file system.

EISDIR
A null pathname was specified.

SCO OpenServer can return EFAULT (the name parameter is not in a valid part of the user address space), which is not returned by UnixWare 7 and SCO UnixWare 2.1.X.

connect source compatibility notes

In SCO OpenServer, the third parameter is called *namelen and is an int. In SCO UnixWare 2.1.X and UnixWare 7, it is called *address_len and is declared as size_t. The parameters have the same use (i.e., they contain the length of the previous calling parameter).

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


EALREADY
A connection request is already in progress for the specified socket.

EINPROGRESS
The socket is non-blocking and the connection cannot be completed immediately; the connection will be established asynchronously.

EINTR
The connection attempt was interrupted before any data arrived by the delivery of a signal. The connection will be established asynchronously.

EPROTOTYPE
The file referred to by address is a socket of a type other than the socket bound to the specified peer address.

ECONNRESET
The remote host reset the connection request.

EINVAL
address_len is not the size of a valid address for the specified address family, or invalid address family in sockaddr structure.

ENAMETOOLONG
Pathname resolution of a symbolic link produced an intermediate result whose length exceeds PATH_MAX.

ENETDOWN
The local interface used to reach the destination is down.

ENOBUFS
No buffer space is available.

ENOSR
There were insufficient STREAMS resources available to complete the operation.

ENOTDIR
A component of the path prefix of the pathname in address is not a directory.

ENAMETOOLONG
A component of a pathname exceeded NAME_MAX characters or an entire pathname exceeded PATH_MAX.

EACCES
Search permission is denied for a component of the path prefix or write access to the named socket is denied.

EIO
An I/O error occurred while reading from or writing to the file system.

ELOOP
Too many symbolic links were encountered in translating the pathname in address.

ENOENT
A component of the pathname does not name an existing file or the pathname is an empty string.

ether_aton source compatibility notes

This returns an ether_addr_t (unsigned char) on UnixWare 7 and SCO UnixWare 2.1.X, while it returns an ether_addr structure (which has one member of type ether_addr_t) on SCO OpenServer.

ether_hostton source compatibility notes

This function takes an ether_addr_t (unsigned char) parameter on UnixWare 7 and SCO UnixWare 2.1.X, while it takes an ether_addr structure (which has one member of type ether_addr_t) on SCO OpenServer.

ether_line source compatibility notes

This function takes an ether_addr_t (unsigned char) parameter on UnixWare 7 and SCO UnixWare 2.1.X, while it takes an ether_addr structure (which has one member of type ether_addr_t) on SCO OpenServer.

ether_ntoa source compatibility notes

This function takes an ether_addr_t (unsigned char) parameter on UnixWare 7 and SCO UnixWare 2.1.X, while it takes an ether_addr structure (which has one member of type ether_addr_t) on SCO OpenServer.

ether_ntohost source compatibility notes

This function takes an ether_addr_t (unsigned char) parameter on UnixWare 7 and SCO UnixWare 2.1.X, while it takes an ether_addr structure (which has one member of type ether_addr_t) on SCO OpenServer.

ftruncate/truncate source compatibility notes

These functions appear as system calls in libc on UnixWare 7, SCO UnixWare 2.1.X, and SCO OpenServer; SCO OpenServer also provides versions of these in the sockets library.

getpeername/setpeername source compatibility notes

In SCO OpenServer, the *namelen parameter is an int. In SCO UnixWare 2.1.X and UnixWare 7, it is declared as size_t.

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


ENOMEM
There was insufficient user memory for the operation to complete.

ENOSR
There were insufficient STREAMS resources available for the operation to complete.

EINVAL
The socket has been shut down.

getsockname/setsockname source compatibility notes

In SCO OpenServer, the *namelen parameter is an int. In SCO UnixWare 2.1.X and UnixWare 7, it is declared as size_t.

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


EOPNOTSUPP
The operation is not supported for this socket's protocol.

ENOMEM
There was insufficient user memory for the operation to complete.

ENOSR
There were insufficient STREAMS resources available for the operation to complete.

EINVAL
The socket has been shut down.

getsockopt/setsockopt source compatibility notes

In SCO OpenServer, the *optlen parameter is an int. In SCO UnixWare 2.1.X and UnixWare 7, it is declared as size_t.

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


ENOMEM
There was insufficient user memory available for the operation to complete.

ENOSR
There were insufficient STREAMS resources available for the operation to complete.

The following options are provided on SCO OpenServer, but are not supported on UnixWare 7 and SCO UnixWare 2.1.X:


SO_REUSEPORT
toggle on/off local port reuse

SO_SNDLOWAT
set low-water mark for output

SO_RCVLOWAT
set low-water mark for input

SO_PROTOTYPE
get/set the protocol number associated with the stream

gettimeofday/settimeofday source compatibility notes

These routines are implemented as system calls in SCO UnixWare 2.1.X and UnixWare 7. On SCO OpenServer, they are implemented as routines in the libsocket library, as well as system calls (in libc).

The syntax of the system call on SCO UnixWare 2.1.X and UnixWare 7 is:

   #include <sys/time.h>
   int gettimeofday(struct timeval *tp, void *reserved);
   int settimeofday(struct timeval *tp, void *reserved);
where the second parameter is required to be NULL.

On SCO OpenServer, the system call syntax is:

   #include <sys/time.h>
   int gettimeofday(struct timeval *tp);
   int settimeofday(struct timeval *tp);

The SCO OpenServer libsocket routine's syntax is:

   #include <sys/time.h>
   int gettimeofday(struct timeval *tp , struct timezone *tpz);
   int settimeofday(struct timeval *tp , struct timezone *tpz);

The timeval structures used are the same on each platform; but the timezone structure is unique to the SCO OpenServer libsocket routines (and any data it contains is ignored on the other platforms):

   struct timezone {
   	int	tz_minuteswest;	/* of Greewich */
   	int	tz_dsttime;	/* type of dst correction to apply */
   };

listen source compatibility notes

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


EINVAL
The socket is already connected or has been shut down.

EDESTADDRREQ
The socket is not bound to a local address, and the protocol does not support listening on an unbound socket.

ENOBUFS
System resources are insufficient to complete the call.

netgroup compatibility notes

The netgroup routines (endnetgrent, getnegrent, setnetgrent, innetgr) on SCO UnixWare 2.1.X and SCO OpenServer require that the Network Information Service (NIS) is running for these routines to return successfully. This is not a requirement on SCO OpenServer, on which these routines also check the file /etc/netgroup for network group information.

recv/recvfrom/recvmsg source compatibility notes

The msghdr structure was changed between SCO UnixWare 2.1 and SCO UnixWare 2.1.X to comply with standards.

On SCO UnixWare 2.1, the msghdr structure (used by recvmsg)) is defined in sys/socket.h as follows:

   caddr_t		 msg_name;          /* optional address */
   int    		 msg_namelen;       /* size of address */
   struct iovec	 *msg_iov;	    /* scatter/gather array */
   int    		 msg_iovlen;        /* # elements in msg_iov */
   caddr_t		 msg_accrights;     /* access rights sent/received */
   int    		 msg_accrightslen;

On UnixWare 7 and SCO UnixWare 2.1.X, the msghdr structure is defined as follows:

   caddr_t		 msg_name;       /* optional address */
   int    		 msg_namelen;    /* size of address */
   struct iovec	 *msg_iov;	 /* scatter/gather array */
   int    		 msg_iovlen;     /* # elements in msg_iov */
   caddr_t		 msg_control;    /* control information sent/received */
   int    		 msg_controllen; /* size of control information */
   int    		 msg_flags;      /* size of control information */

The interfaces for sendmsg and recvmsg were versioned between SCO UnixWare 2.1 and SCO UnixWare 2.1.X to support both structures.

By default, programs compiled on UnixWare 7 and SCO UnixWare 2.1.X will use the new structure. In order to use the old structure, the program must be compiled with the SVR4 conditional compilation flag defined. Binary compatibility between programs compiled on SCO UnixWare 2.1 is maintained on SCO UnixWare 2.1.X and UnixWare 7.

The use of the cmsghdr structure for control data along with the CMSG macros are supported in SCO OpenServer, SCO UnixWare 2.1.X, and UnixWare 7. These are not supported in SCO UnixWare 2.1.

In SCO OpenServer the cmsghdr structure is defined as:

   int     cmsg_level;     /* originating protocol */
   int     cmsg_type;      /* protocol-specific type */
   u_int   cmsg_len;       /* data byte count, including hdr */

In SCO UnixWare 2.1.X and UnixWare 7 the cmsghdr structure is defined as:

   size_t  cmsg_len;       /* data byte count, including hdr */
   int     cmsg_level;     /* originating protocol */
   int     cmsg_type;      /* protocol-specific type */

Finally, UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (not returned on SCO OpenServer):


ECONNRESET
A connection was forcibly closed by a peer.

ENOTSOCK
socket is a descriptor for a file, not a socket.

EINTR
The operation was interrupted by delivery of a signal before any data was available to be received.

EINVAL
MSG_OOB is set and there is no available out-of-band data.

ENOTCONN
A receive is attempted on a connection-oriented socket that is not connected.

EWOULDBLOCK
The socket is marked non-blocking and the requested operation would block.

EOPNOTSUPP
The specified flags are not supported for this socket type or protocol.

ETIMEDOUT
The connection timed out during connection or because of a transmission timeout on active connection.

EIO
An I/O error occurred while reading to or writing from the file system.

ENOBUFS
System resources were insufficient to perform the operation.

ENOMEM
There was insufficient user memory available for the operation to complete.

ENOSR
There were insufficient STREAMS resources available for the operation to complete.

select source compatibility notes

On SCO OpenServer, the FD_SETSIZE constant is normally defined (in *(f<sys/types.h*(f>) as either 150 or 11000; on UnixWare 7 Release 7.0.0 and SCO UnixWare 2.1.X, it is usually defined (in ``sys/select.h'') as either 20 or 1024. With UnixWare 7 Release 7.0.1, the value of FD_SETSIZE was increased to 4096. See select(3C).

send/sendto source compatibility notes

In SCO OpenServer, the *len and *tolen parameters are ints. In SCO UnixWare 2.1.X and UnixWare 7, they are declared as size_t.

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


EINVAL
*(r<tolen*(r> is not the size of a valid address for the specified address family.

EINTR
The operation was interrupted by delivery of a signal before any data could be buffered to be sent.

EWOULDBLOCK
The socket is marked non-blocking and the requested operation would block.

ENOMEM
There was insufficient user memory available for the operation to complete.

ENOSR
There were insufficient STREAMS resources available for the operation to complete.

See ``recv/recvfrom/recvmsg source compatibility notes'' for a description of platform differences in the msghdr structure.

shutdown source compatibility notes

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


ENOMEM
There was insufficient user memory available for the operation to complete.

ENOBUFS
System resources were insufficient to perform the operation.

ENOSR
There were insufficient STREAMS resources available for the operation to complete.

socket source compatibility notes

UnixWare 7 and SCO UnixWare 2.1.X can return these additional errors (which are not returned by SCO OpenServer):


ENOMEM
Insufficient user memory is available.

SCO OpenServer can return these additional errors (which are not returned by UnixWare 7 or SCO UnixWare 2.1.X):


ENFILE
The system file table is full.

EPROTOTYPE
The protocol is the wrong type for the socket.

The protocol families and types differ between the systems. On UnixWare 7, the AF_INET6 protocol family is supported, in addition to the AF_UNIX and AF_INET protocol families supported on SCO OpenServer and SCO UnixWare 2.1.X.

UnixWare 7 and SCO UnixWare 2.1.X support the SOCK_STREAM, SOCK_DGRAM, SOCK_RAW, SOCK_SEQPACKET, and SOCK_RDM socket types; SCO OpenServer supports only SOCK_STREAM, SOCK_DGRAM, and SOCK_RAW.

openlog source compatibility notes

On SCO OpenServer, /usr/include/sys/syslog.h contains the following facilities definitions:

   #define LOG_CRON        (9<<3)  /* clock daemon */
   #define LOG_AUTHPRIV    (10<<3) /* security/authorization messages (private) */
On UnixWare 7 and SCO UnixWare 2.1.X, the above lines are omitted, and the following appear instead:
   #define LOG_LFMT        (14<<3) /* logalert facility */
   #define LOG_CRON        (15<<3) /* cron/at subsystem */

Next topic: Name resolution (libresolv) library routines
Previous topic: libsocket compatibility table (select - vsyslog)

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004