Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
sendmsg(2) OSS System Calls Reference Manual
• Link the application to the zputdll library (/G/system/zdllnnn/zputdll).
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use
this function with 32-bit or 64-bit OSS applications.
To use this function in a 32-bit threaded application that uses the POSIX User Thread Model
library on systems running H06.24 or later RVUs or J06.13 or later RVUs, perform the same
tasks (described above) used to enable the function on systems running H06.21/J06.10 or later
RVUs.
To use this function in a 64-bit threaded application that uses the POSIX User Thread Model
library on systems running H06.24 or later RVUs or J06.13 or later RVUs, you must perform all
of the following tasks:
• Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
• Compile the application using the -Wlp64 compiler command option.
• Link the application to the yputdll library (/G/system/zdllnnn/yputdll).
For detailed information about writing multi-threaded and 64-bit applications for the Open Sys-
tem Services environment, see the Open System Services Programmer’s Guide.
RETURN VALUES
Upon successful completion, the sendmsg() function returns the number of normal bytes sent.
Ancillary data, if present, is not counted in the total number of bytes sent.
If the sendmsg() function call fails, the value -1 is returned, and errno is set to indicate the error.
ERRORS
If any of these conditions occurs, the sendmsg() function sets errno to the corresponding value:
[EACCES] The socket is in the AF_UNIX domain and either search permission is denied for
a component of the pathname in the msghdr structure or write access to the
specified socket is denied.
[EAFNOSUPPORT]
Addresses in the specified address family cannot be used with this socket.
[EBADF] One of these conditions exists:
• The socket parameter is not a valid file descriptor.
• The socket is in the AF_UNIX domain, and one or more of the file
descriptors being passed is invalid.
This error is also returned if the sendmsg() function is thread-aware and the
socket becomes invalid (is closed by another thread).
[ECONNRESET]
One of these conditions occurred:
• The transport-provider process for this socket is no longer available.
• The TCP/IP subsystem for this socket is no longer available.
• The connection was forcibly closed by the peer socket.
The socket can only be closed.
7−36 Hewlett-Packard Company 527186-023