ReactOS  0.4.13-dev-39-g8b6696f
unix_func.c File Reference
#include <windef.h>
#include <winsock2.h>
Include dependency graph for unix_func.c:

Go to the source code of this file.


#define WIN32_NO_STATUS
#define _INC_WINDOWS


const char *WSAAPI inet_ntop (int af, const void *src, char *dst, size_t cnt)

Macro Definition Documentation


#define _INC_WINDOWS

Definition at line 2 of file unix_func.c.


#define WIN32_NO_STATUS

Definition at line 1 of file unix_func.c.

Function Documentation

◆ inet_ntop()

const char* WSAAPI inet_ntop ( int  af,
const void src,
char dst,
size_t  cnt 

Definition at line 8 of file unix_func.c.

12 {
13  struct in_addr in;
14  char *text_addr;
16  if (af == AF_INET)
17  {
18  memcpy(&in.s_addr, src, sizeof(in.s_addr));
19  text_addr = inet_ntoa(in);
20  if (text_addr && dst)
21  {
22  strncpy(dst, text_addr, cnt);
23  return dst;
24  }
25  }
27  return 0;
28 }
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
#define inet_ntoa(addr)
Definition: inet.h:100
Definition: tcpip.h:125
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum src
Definition: glext.h:6340
GLuint in
Definition: glext.h:9616
GLenum GLenum dst
Definition: glext.h:6340
#define AF_INET
Definition: tcpip.h:117

Referenced by __rpc_taddr2uaddr_af(), addr_to_str(), GetAddress(), GetHostByName(), MyInetAddr(), OpenControlConnection(), and rpcrt4_ip_tcp_parse_top_of_tower().