IPX/SPX Programming Manual

Data Structures
HP NonStop IPX/SPX Programming Manual528022-001
4-5
sockaddr
Figure 4-1 compares the sockaddr and sockaddr_in data structures that exist for
RVUs before the D30 RVU. Both data structures refer to the address family in the
2 low-order bytes, to the port in the third and fourth bytes, and to the Internet address
in the 4 high-order bytes. However, the sockaddr data structure refers to the port and
Internet address as a pointer to a character string. The sockaddr_in data structure
refers to the address family as a short integer, and refers to the Internet address as a
structure consisting of a long integer.
Figure 4-1. Pre-D30 Comparison of sockaddr and sockaddr_in Data Structures
sockaddr_in {
short sin_family;
short sin_port;
struct in_addr sin_addr;
}
sin_family sin_port struct in_addr
sin_addr
in_addr {
long s_addr;
}
sockaddr {
short sa_family;
char sa_data
[6];
}
sa_family
sa_data [6]
Family Port Internet Address
VST0401.vsd