TCP/IP Programming Manual
sendto_recvfrom_buf
This structure is used by the recvfrom_nw and sendto_nw routines. It is defined in the in.h header
file.
C Declaration
#include <in.h>
struct sendto_recvfrom_buf {
struct sockaddr_in sb_sin;
char sb_data[1];
};
#define sb_sent sb_sin.sin_family
#define SOCKADDR_IN
TAL Declaration
?NOLIST, SOURCE SOCKDEFT
STRUCT sendto_recvfrom_buf (*);
BEGIN
STRUCT sb_sin(sockaddr_in);
STRING sb_data[0:1];
END;
sb_sin
is an address-port number combination based on the structure sockaddr_in.
sb_data
provides a symbolic name that can be used to locate the start of the user data.
sb_sent
is the number of bytes that have been transferred by a call to the t_sendto_nw function
(followed by a call to the AWAITIOX procedure). Check this value after the AWAITIOX call
completes.
servent
This structure is used by the support routines to convert service names to port numbers. It is defined
in the netdb.h header file. Use this structure if you are writing a network service manager similar
to the HP NonStop LISTNER process or the UNIX inetd daemon.
C Declaration
#include <netdb.h>
struct servent {
char *s_name;
char **s_aliases;
int s_port;
char *s_proto;
};
TAL Declaration
?NOLIST, SOURCE SOCKDEFT
STRUCT aliase (*);
BEGIN
STRING .EXT ptrs;
END;
STRUCT sptrs(aliase)[0:3];
STRUCT servent (*);
BEGIN
STRING .EXT s_name;
76 Data Structures