libUPnP 1.14.19
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 <ws2tcpip.h>
21
22 #define UpnpCloseSocket closesocket
23
24 #if (_WIN32_WINNT < 0x0600)
25typedef short sa_family_t;
26 #else
27typedef ADDRESS_FAMILY sa_family_t;
28 #endif
29
30#else /* _WIN32 */
31 #include <sys/param.h>
32 #if defined(__sun)
33 #include <fcntl.h>
34 #include <sys/sockio.h>
35 #elif (defined(BSD) && BSD >= 199306) || defined(__FreeBSD_kernel__)
36 #include <ifaddrs.h>
37 /* Do not move or remove the include below for "sys/socket"!
38 * Will break FreeBSD builds. */
39 #include <sys/socket.h>
40 #endif
41 #include <arpa/inet.h> /* for inet_pton() */
42 #include <net/if.h>
43 #include <netinet/in.h>
44
48typedef int SOCKET;
49
51 #define INVALID_SOCKET (-1)
52
54 #define SOCKET_ERROR (-1)
55
57 #define UpnpCloseSocket close
58#endif /* _WIN32 */
59
60/* @} Sock */
61
62#endif /* UPNPINET_H */
int SOCKET
Definition UpnpInet.h:48