TCP/IP Programming Manual

t_sendto_nw64_
The t_sendto_nw64_ function sends data on an unconnected UDP socket or raw socket created
for nowait operations. This routine is replaced by the sendto_nw64_ routine.
C Synopsis
#include <socket.h>
#include <in.h>
#include <netdb.h>
error = t_sendto_nw64_ (socket, r_buffer_ptr64, length, flags, tag);
int error, socket, length, flags;
struct sendto_recvfrom_buf _ptr64 *r_buffer_ptr64;
long long tag;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := t_sendto_nw64_ (socket, r_buffer_ptr64, length, flags, tag);
INT socket,
length,
flags;
INT .EXT64 r_buffer_ptr64(sendto_recvfrom_buf);
INT .EXT64 sockaddr_ptr64(sockaddr);
INT(32) tag;
error
return value; if the call is successful, a zero is returned. If the call is not successful, –1 is returned.
If the call fails, the external variable errno is set as shown in Errors (page 207).
socket
input value; specifies the socket number for the socket, as returned by a socket_nw call.
r_buffer_ptr64
input and return value; points to the remote address and port number to which the data must
be sent, followed by the data. The address of the data is (r_buffer_ptr64 +
sizeof(struct sockaddr_in)). For more information, see the sendto_recvfrom_buf
structure in Data Structures (page 63).
Note that the first two bytes pointed to by r_buffer_ptr64 are the sin_family field of
the sockaddr_in structure. After a call to t_sendto_nw64_, the normal value in the
sin_family field (AF_INET) is replaced by the number of bytes that have been transferred.
length
input value; the size of the buffer pointed to by r_buffer_ptr64.
flags
input value; specifies whether the outgoing data must be sent to the destination if routing is
required, and takes one of the following values:
Send this message only if the destination is located on the local network; do not send
the message through a gateway.
MSG_DONTROUTE
No flag; send the message to the destination, even if the message must be routed.0
tag
input value; the tag parameter to be used for the nowait operation initiated by
t_sendto_nw64_.
206 Library Routines