带点字符串与长整型的转换
inet_ntoa Function
The inet_ntoa function converts an (Ipv4) Internet network address into a string in Internet standard dotted-decimal format.
char* FAR inet_ntoa(
__in struct in_addr in
);
/*******************************************************************************/
inet_addr Function
The inet_addr function converts a string containing an (Ipv4) Internet Protocol dotted address into a proper address for the IN_ADDR structure.
unsigned long inet_addr(
__in const char* cp
);
/*******************************************************************************/
主机IP与TCP/IP网络IP的转换
htonl Function
The htonl function converts a u_long from host to TCP/IP network byte order (which is big endian).
u_long htonl(
__in u_long hostlong
);
/*******************************************************************************/
htons Function
The htons function converts a u_short from host to TCP/IP network byte order (which is big-endian).
u_short htons(
__in u_short hostshort
);
3212

被折叠的 条评论
为什么被折叠?



