sockaddr

This structure is the generic address structure for all address families used in Windows socket communication.

struct sockaddr {
 unsigned short sa_family;
 char sa_data[14];};

Parameters

  • sa_family
    Address family.
  • sa_data
    Up to 14 bytes of direct address.

Remarks

The actual structure is interpreted differently in the context of different address families. The only requirements are that the first u_short is the address family and the total size of the memory buffer in bytes is namelen**.**

The structure below is used with TCP/IP. Other protocols use similar structures.

struct sockaddr_in {
 short sin_family;
 u_short sin_port;
 struct in_addr sin_addr;
 char sin_zero[8];
};

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winsock.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

SOCKADDR_IN

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.