Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Using ancillary data on sendmsg() and recvmsg() z/OS Communications Server: IPv6 Network and Application Design Guide SC27-3663-00 |
|
The sendmsg() API is similar to other socket APIs, such as send() and write() that allow an application to send data, but also provides the capability of specifying ancillary data. Ancillary data allows applications to pass additional option data to the TCP/IP protocol stack along with the normal data that is sent to the IP network. The recvmsg() API is similar to other socket APIs, such as recv() and read(), that allow an application to receive data, but also provides the capability of receiving ancillary data. Ancillary data allows the TCP/IP protocol stack to return additional option data to the application along with the normal data from the IP network. These sendmsg() and recvmsg() API extensions are available only
to applications using the following socket API libraries:
For the sendmsg() and recvmsg() APIs most parameters are passed
in a message header input parameter. The mapping for the message header
is defined in socket.h for C/C++ and in the BPXYMSGH macro for users
of the z/OS UNIX Assembler Callable services.
For simplicity, only the C/C++ version of the data structures is
shown in the following code example:
Notes:
The msg_control parameter points to the ancillary data. This
msg_control pointer points to the following structure (C/C++ example
shown) that describes the ancillary data (also defined in socket.h
and BPXYMSGH):
Guidelines:
|
Copyright IBM Corporation 1990, 2014
|