UpnpInet.h
Go to the documentation of this file.
#ifndef UPNPINET_H
#define UPNPINET_H
#include "UpnpUniStd.h" /* for close() */ // IWYU pragma: keep
#ifdef _WIN32
#include <stdarg.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#define UpnpCloseSocket closesocket
#if (_WIN32_WINNT < 0x0600)
typedef short sa_family_t;
#else
typedef ADDRESS_FAMILY sa_family_t;
#endif
#define OPTION_VALUE_CAST const char *
#else /* _WIN32 */
#include <sys/param.h>
#if defined(__sun)
#include <fcntl.h>
#include <sys/sockio.h>
#elif (defined(BSD) && BSD >= 199306) || defined(__FreeBSD_kernel__)
#include <ifaddrs.h>
/* Do not move or remove the include below for "sys/socket"!
* Will break FreeBSD builds. */
#include <sys/socket.h>
#endif
#include <arpa/inet.h> /* for inet_pton() */
#include <net/if.h>
#include <netinet/in.h>
typedef int SOCKET;
#define INVALID_SOCKET (-1)
#define SOCKET_ERROR (-1)
#define UpnpCloseSocket close
#define OPTION_VALUE_CAST const void *
#endif /* _WIN32 */
/* @} Sock */
#endif /* UPNPINET_H */
SOCKET
int SOCKET
Definition UpnpInet.h:50