sock(7sock)


sock -- socket interface driver

Description

The socket driver is used to provide socket emulation to applications. Sockets provide an alternative to TLI as an entry point into transport providers, such as tcp(7tcp). The socket driver is a character device that acts as an alternate stream head, augmenting the functions of the standard stream head. It also provides support for miscellaneous functions such as select(3C).

The behavior of sockets in handling asynchronous events and errors was changed in UnixWare® 7 release 7.1.1. Compatibity with behavior in earlier releases of UnixWare 7 may be obtained using the SI_U7COMPAT ioctl(2) command on the socket file descriptor:

   #include <sys/sockmod.h>
   ...
   int err, fd, x;
   ...
   /* Create a socket */
   fd = socket(domain, type, protocol);
   ...
   /* Select new behavior */
   x = 0;
   err = ioctl(fd, SI_UW7COMPAT, &x);
   ...
   /* Select old behavior */
   x = 1;
   err = ioctl(fd, SI_UW7COMPAT, &x);
In the above examples, the value passed in by the argument x controls the behavior of the socket as follows:

0
Select new behavior:

1
Select old behavior:
Default socket behavior is controlled by the value of the inconfig(1Mtcp) ss_uw7_compat parameter.

Files


/dev/socksys
device interface to the socket driver

References

Intro(7tcp), ifconfig(1Mtcp), inconfig(1Mtcp), inet(7tcp), slattach(1Mtcp) socket(7tcp), sockio(7sock), unix(7sock), usock(7sock),
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004