Export (0) Print
Expand All

in_addr structure

The in_addr structure represents an IPv4 Internet address.

Syntax


typedef struct in_addr {
  union {
    struct {
      u_char s_b1,s_b2,s_b3,s_b4;
    } S_un_b;
    struct {
      u_short s_w1,s_w2;
    } S_un_w;
    u_long S_addr;
  } S_un;
} IN_ADDR, *PIN_ADDR, FAR *LPIN_ADDR;

Members

S_un
S_un_b

An IPv4 address formatted as four u_chars.

S_un_w

An IPv4 address formatted as two u_shorts.

S_addr

An IPv4 address formatted as a u_long.

Remarks

The in_addr structure is used with IPv4 addresses.

The in_addr structure is the IPv4 equivalent of the IPv6-based in6_addr structure.

Note  The IN_ADDR, PIN_ADDR, and LPIN_ADDR derived structures are only defined on the Windows SDK released with Windows Vista and later. The IN_ADDR, PIN_ADDR, and LPIN_ADDR derived structures are defined in the Inaddr.h header file. On earlier versions of the Windows SDK, variables of this type should be declared as struct in_addr.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Inaddr.h;
Winsock2.h on Windows Server 2003, Windows XP, and Windows 2000

See also

in6_addr
inet_addr
inet_ntoa
sockaddr

 

 

Community Additions

ADD
Show:
© 2014 Microsoft