IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-25
getsockname, getsockname_nw
getsockname,
getsockname_nw
The getsockname and getsockname_nw functions get the IPX address data
structure to which a socket is bound.
error
is the return value. If the call is successful, a zero is returned. If the call is not
successful, -1 is returned. If the call failed, the external variable errno is set as
indicated below in “Errors.”
socket
specifies the socket number for the socket, as returned by the call to socket or
socket_nw.
address_ptr
points, on completion, to the IPX address data structure to which the socket is
bound.
C Synopsis
#include <socket.h>
#include <nv.h>
#include <netdb.h>
error = getsockname (socket, address_ptr, address_len_ptr);
error = getsockname_nw (socket, address_ptr,
address_len_ptr, tag);
int error, socket, *address_len_ptr;
struct sockaddr *address_ptr;
long tag;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := getsockname (socket, address_ptr, address_len_ptr);
error := getsockname_nw (socket, address_ptr,
address_len_ptr, tag);
INT socket,
.EXT address_len_ptr;
.EXT address_ptr (sockaddr);
INT(32) tag;