IPX/SPX Programming Manual

Library Routines
HP NonStop IPX/SPX Programming Manual528022-001
5-17
bind, bind_nw
bind,
bind_nw
The bind and bind_nw functions associate a socket with a specific local IPX address
data structure.
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 to the IPX address data structure to which the socket is to be bound.
C Synopsis
#include <socket.h>
#include <nv.h>
#include <netdb.h>
error = bind (socket, address_ptr, address_len);
error = bind_nw (socket, address_ptr, address_len, tag);
int error, socket, address_len;
struct sockaddr *address_ptr;
long tag;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := bind (socket, address_ptr, address_len);
error := bind_nw (socket, address_ptr, address_len, tag);
INT socket,
address_len;
INT .EXT address_ptr(sockaddr);
INT(32) tag;