in_addr structure
The in_addr structure represents an IPv4 address.
Syntax
typedef struct { 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; } IPAddr;
Members
- S_un
-
- S_un_b
-
The IPv4 address of the host formatted as four u_chars.
- S_un_w
-
The IPv4 address of the host formatted as two u_shorts.
- S_addr
-
Address of the host formatted as a u_long.
Remarks
The IPaddr type definition also represents an IPv4 address and can be cast to an in_addr structure when needed.
On the Microsoft Windows Software Development Kit (SDK) released for Windows Vista and later, the organization of header files has changed and the in_addr structure is defined in the Inaddr.h header file which is automatically included by the Ipexport.h header file. On the Platform Software Development Kit (SDK) released for Windows Server 2003 and Windows XP, the in_addr structure is declared in the Ipexport.h header file.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
See also
- in_addr(Winsock)
- SendARP
- AddIPAddress
- GetBestInterface
- GetRTTAndHopCount
- IcmpSendEcho2
- IcmpSendEcho
- ARP_SEND_REPLY
- ICMP_ECHO_REPLY
- IP_UNIDIRECTIONAL_ADAPTER_ADDRESS