ReactOS 0.4.16-dev-106-g10b08aa
unix_func.c
Go to the documentation of this file.
1#define WIN32_NO_STATUS
2#define _INC_WINDOWS
3#include <windef.h>
4#include <winsock2.h>
5
6const char *
8inet_ntop (int af,
9 const void *src,
10 char *dst,
11 size_t cnt)
12{
13 struct in_addr in;
14 char *text_addr;
15
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 }
26
27 return 0;
28}
29
char * strncpy(char *DstString, const char *SrcString, ACPI_SIZE Count)
Definition: utclib.c:427
#define AF_INET
Definition: tcpip.h:117
GLenum src
Definition: glext.h:6340
GLuint in
Definition: glext.h:9616
GLenum GLenum dst
Definition: glext.h:6340
#define inet_ntoa(addr)
Definition: inet.h:100
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
Definition: tcpip.h:126
const char *WSAAPI inet_ntop(int af, const void *src, char *dst, size_t cnt)
Definition: unix_func.c:8
#define WSAAPI
Definition: winsock2.h:605