Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure represents a host by its Internet address.

Syntax

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;
};

Members

S_un_b

Address of the host formatted as four u_chars.

S_un_w

Address of the host formatted as two u_shorts.

S_addr

Address of the host formatted as u_long.

Remarks

s_addr is a #define used to access the S_addr member.

Requirements

Header winsock2.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also