Expand Minimize
This topic has not yet been rated - Rate this topic

ntohd function

The ntohd inline function converts an unsigned __int64 from TCP/IP network order to host byte order (which is little-endian on Intel processors) and returns a double.

Syntax


double __inline ntohd(
  unsigned __int64 value
);

Parameters

value

An unsigned __int64 number in TCP/IP network byte order.

Return value

The ntohd function returns the value supplied in the value parameter with the byte order reversed. If value is already in host byte order, then this function will reverse it. It is up to the application to determine if the byte order must be reversed.

Remarks

The ntohd inline function takes an unsigned __int64 that contains number in TCP/IP network byte order (the AF_INET or AF_INET6 address family) and returns a double that contains a number in host byte order.

The ntohd function can be used to convert an IPv4 address in network byte order to the IPv4 address in host byte order. This function does not do any checking to determine if the value parameter is a valid IPv4 address.

The ntohd function does not require that the Winsock DLL has previously been loaded with a successful call to the WSAStartup function.

(Windows Store apps): This API is supported.

See also

htond
htonf
htonl
htonll
htons
inet_addr
inet_ntoa
InetNtop
InetPton
ntohl
ntohll
ntohs
WSAHtonl
WSAHtons
WSANtohl
WSANtohs

 

 

Send comments about this topic to Microsoft

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.