IPX/SPX Programming Manual
Library Routines
HP NonStop IPX/SPX Programming Manual—528022-001
5-59
socket_get_info
socket_get_info
The socket_get_info function returns the sockaddr data structure and the
sockaddr length received after a recvfrom_nw call.
error
is the return value. If the call is successful, the size of the sockaddr data structure
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
is an input parameter: the socket specified in the prior recvfrom_nw call.
sockaddr_buffer
is a character pointer to the sockaddr_in or sockaddr_nv data structure
returned by the call.
buflen
as an input parameter, is the size of sockaddr_in_buffer or
sockaddr_nv_buffer in bytes. Maximum value is 80 bytes.
Example
See Example on page 5-39 for recvfrom_nw.
C Synopsis
#include <socket.h>
#include <nv.h>
#include <if.h>
#include <netdb.h>
error = socket_get_info(socket, sockaddr_buffer, buflen);
int error, socket, buflen;
char *sockaddr_buffer;
TAL Synopsis
?NOLIST, SOURCE SOCKDEFT
?NOLIST, SOURCE SOCKPROC
error := socket_get_info(socket, sockaddr_buffer, buflen);
INT error, socket, buflen;
STRING .EXT sockaddr_buffer;