libUPnP 1.14.17
UpnpInet.h
Go to the documentation of this file.
1#ifndef UPNPINET_H
2#define UPNPINET_H
3
15#include "UpnpUniStd.h" /* for close() */
16
17#ifdef _WIN32
18 #include <stdarg.h>
19 #include <winsock2.h>
20 #include <iphlpapi.h>
21 #include <ws2tcpip.h>
22
23 #define UpnpCloseSocket closesocket
24
25 #if (_WIN32_WINNT < 0x0600)
26typedef short sa_family_t;
27 #else
28typedef ADDRESS_FAMILY sa_family_t;
29 #endif
30
31#else /* _WIN32 */
32 #include <sys/param.h>
33 #if defined(__sun)
34 #include <fcntl.h>
35 #include <sys/sockio.h>
36 #elif (defined(BSD) && BSD >= 199306) || defined(__FreeBSD_kernel__)
37 #include <ifaddrs.h>
38 /* Do not move or remove the include below for "sys/socket"!
39 * Will break FreeBSD builds. */
40 #include <sys/socket.h>
41 #endif
42 #include <arpa/inet.h> /* for inet_pton() */
43 #include <net/if.h>
44 #include <netinet/in.h>
45
49typedef int SOCKET;
50
52 #define INVALID_SOCKET (-1)
53
55 #define SOCKET_ERROR (-1)
56
58 #define UpnpCloseSocket close
59#endif /* _WIN32 */
60
61/* @} Sock */
62
63#endif /* UPNPINET_H */
int SOCKET
Definition: UpnpInet.h:49