Open System Services System Calls Reference Manual (G06.25+, H06.03+)
System Functions (s and S) socket(2)
• If you do assign a base address, do not use any address in the range 0x20000000
through 0x41FFFFFF or any of these flat segment regions:
0x20000000 0x22000000 0x24000000 0x26000000
0x28000000 0x2A000000 0x2C000000 0x2E000000
0x30000000 0x32000000 0x34000000 0x36000000
0x38000000 0x3A000000 0x3C000000 0x3E000000
0x40000000 0x42000000 0x44000000 0x46000000
0x48000000 0x4A000000 0x4C000000 0x4E000000
On some processors, QIO allocates its shared memory region by default starting at 0x20000000,
so a QIO configuration of 544 megabytes uses the flat segment regions listed previously. If you
use a null pointer instead of specifying the base address, the operating system allocates flat seg-
ments for your application starting from the topmost region downward. As a result, OSS socket
applications can safely allocate flat segments in any of the upper regions of memory on that pro-
cessor.
If a memory conflict error still occurs, either you must change the memory allocation for your
application or your system administrator must reconfigure QIO.
For more information on the shmat() function, see the shmat(2) reference page. For more infor-
mation on memory addressing, see the Guardian Programmer’s Guide and the server description
manual appropriate for your system.
RETURN VALUES
Upon successful completion, the socket() function returns the file descriptor for the socket. Oth-
erwise, the value -1 is returned, and errno is set to indicate the error.
ERRORS
If any of these conditions occurs, the socket() function sets errno to the corresponding value:
[EACCES] The process does not have appropriate privileges to create the socket.
[EAFNOSUPPORT]
The specified address family is not supported.
[EDEFINEERR]
The Guardian DEFINE =TCPIPˆPROCESSˆNAME is invalid, and the DEFINE
was used in an attempt to set the transport-provider name.
[EMFILE] No more file descriptors are available for this process.
[ENFILE] The maximum number of file descriptors for this processor are already open.
[ENOBUFS] There was not enough buffer space available to complete the call. A retry at a
later time might succeed.
[ENOENT] One of these configuration errors might have occurred:
• A requested transport provider process is not available.
• An initialization error occurred because of a QIO address conflict.
• An initialization error occurred because of a parallel TCP/IP address
conflict.
The name of an unavailable transport-provider process can be obtained by a call
to the socket_transport_name_get() function.
527186-003 Hewlett-Packard Company 7−73