TCP/IP Programming Manual
• To determine the number of bytes transferred as a result of the sendto_nw function, use the
socket_get_len function.
• Declare the sockaddr_ptr variable as struct sockaddr_in6 * for IPv6 use or as
struct sockaddr_storage * for protocol-independent use. In C, when you make the
call, cast the variable to sockaddr *.
See Nowait Call Errors (page 86) for information on error checking.
sendto_nw64_
The sendto_nw64_ function sends data on an unconnected UDP socket or raw socket created
for nowait operations.
C Synopsis
#include <socket.h>
#include <in.h>
#include <in6.h> /* for IPv6 use */
#include <netdb.h>
error = sendto_nw64_ (socket, buffer_ptr64, buffer_length, flags,
sockaddr_ptr64, sockaddr_length, tag);
int error, socket;
char _ptr64 *buffer_ptr64;
int buffer_length, flags;
struct sockaddr *sockaddr_ptr;
intsockaddr_length;
long long tag;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := sendto_nw64_ (socket, buffer_ptr64, buffer_length, flags,
sockaddr_ptr, sockaddr_length, tag);
INT(32) error,
socket;
STRING .EXT64 buffer_ptr64;
INT(32) buffer_length,
flags;
INT .EXT sockaddr_ptr(sockaddr);
INT(32) sockaddr_length;
INT(64) 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 183).
socket
input value; specifies the socket number for the socket, as returned by the call to socket_nw.
buffer_ptr64
input value; points to the data to be sent.
buffer_length
input value; the size of the buffer that buffer_ptr64 points to.
182 Library Routines