/usr/include/Poco/Net/SocketDefs.h is in libpoco-dev 1.3.6p1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | //
// SocketDefs.h
//
// $Id: //poco/1.3/Net/include/Poco/Net/SocketDefs.h#3 $
//
// Library: Net
// Package: NetCore
// Module: SocketDefs
//
// Include platform-specific header files for sockets.
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// Permission is hereby granted, free of charge, to any person or organization
// obtaining a copy of the software and accompanying documentation covered by
// this license (the "Software") to use, reproduce, display, distribute,
// execute, and transmit the Software, and to prepare derivative works of the
// Software, and to permit third-parties to whom the Software is furnished to
// do so, all subject to the following:
//
// The copyright notices in the Software and this entire statement, including
// the above license grant, this restriction and the following disclaimer,
// must be included in all copies of the Software, in whole or in part, and
// all derivative works of the Software, unless such copies or derivative
// works are solely in the form of machine-executable object code generated by
// a source language processor.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
#ifndef Net_SocketDefs_INCLUDED
#define Net_SocketDefs_INCLUDED
#if defined(POCO_OS_FAMILY_WINDOWS)
#include "Poco/UnWindows.h"
#include <winsock2.h>
#include <ws2tcpip.h>
#define POCO_INVALID_SOCKET INVALID_SOCKET
#define poco_socket_t SOCKET
#define poco_socklen_t int
#define poco_closesocket(s) closesocket(s)
#define POCO_EINTR WSAEINTR
#define POCO_EACCES WSAEACCES
#define POCO_EFAULT WSAEFAULT
#define POCO_EINVAL WSAEINVAL
#define POCO_EMFILE WSAEMFILE
#define POCO_EAGAIN WSAEWOULDBLOCK
#define POCO_EWOULDBLOCK WSAEWOULDBLOCK
#define POCO_EINPROGRESS WSAEINPROGRESS
#define POCO_EALREADY WSAEALREADY
#define POCO_ENOTSOCK WSAENOTSOCK
#define POCO_EDESTADDRREQ WSAEDESTADDRREQ
#define POCO_EMSGSIZE WSAEMSGSIZE
#define POCO_EPROTOTYPE WSAEPROTOTYPE
#define POCO_ENOPROTOOPT WSAENOPROTOOPT
#define POCO_EPROTONOSUPPORT WSAEPROTONOSUPPORT
#define POCO_ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
#define POCO_ENOTSUP WSAEOPNOTSUPP
#define POCO_EPFNOSUPPORT WSAEPFNOSUPPORT
#define POCO_EAFNOSUPPORT WSAEAFNOSUPPORT
#define POCO_EADDRINUSE WSAEADDRINUSE
#define POCO_EADDRNOTAVAIL WSAEADDRNOTAVAIL
#define POCO_ENETDOWN WSAENETDOWN
#define POCO_ENETUNREACH WSAENETUNREACH
#define POCO_ENETRESET WSAENETRESET
#define POCO_ECONNABORTED WSAECONNABORTED
#define POCO_ECONNRESET WSAECONNRESET
#define POCO_ENOBUFS WSAENOBUFS
#define POCO_EISCONN WSAEISCONN
#define POCO_ENOTCONN WSAENOTCONN
#define POCO_ESHUTDOWN WSAESHUTDOWN
#define POCO_ETIMEDOUT WSAETIMEDOUT
#define POCO_ECONNREFUSED WSAECONNREFUSED
#define POCO_EHOSTDOWN WSAEHOSTDOWN
#define POCO_EHOSTUNREACH WSAEHOSTUNREACH
#define POCO_ESYSNOTREADY WSASYSNOTREADY
#define POCO_ENOTINIT WSANOTINITIALISED
#define POCO_HOST_NOT_FOUND WSAHOST_NOT_FOUND
#define POCO_TRY_AGAIN WSATRY_AGAIN
#define POCO_NO_RECOVERY WSANO_RECOVERY
#define POCO_NO_DATA WSANO_DATA
#elif defined(POCO_OS_FAMILY_UNIX) || defined(POCO_OS_FAMILY_VMS)
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#if POCO_OS != POCO_OS_HPUX
#include <sys/select.h>
#endif
#include <sys/ioctl.h>
#if defined(POCO_OS_FAMILY_VMS)
#include <inet.h>
#else
#include <arpa/inet.h>
#endif
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#if defined(POCO_OS_FAMILY_UNIX)
#include <net/if.h>
#endif
#if defined(sun) || defined(__APPLE__)
#include <sys/sockio.h>
#include <sys/filio.h>
#endif
#define POCO_INVALID_SOCKET -1
#define poco_socket_t int
#define poco_socklen_t socklen_t
#define poco_closesocket(s) ::close(s)
#define POCO_EINTR EINTR
#define POCO_EACCES EACCES
#define POCO_EFAULT EFAULT
#define POCO_EINVAL EINVAL
#define POCO_EMFILE EMFILE
#define POCO_EAGAIN EAGAIN
#define POCO_EWOULDBLOCK EWOULDBLOCK
#define POCO_EINPROGRESS EINPROGRESS
#define POCO_EALREADY EALREADY
#define POCO_ENOTSOCK ENOTSOCK
#define POCO_EDESTADDRREQ EDESTADDRREQ
#define POCO_EMSGSIZE EMSGSIZE
#define POCO_EPROTOTYPE EPROTOTYPE
#define POCO_ENOPROTOOPT ENOPROTOOPT
#define POCO_EPROTONOSUPPORT EPROTONOSUPPORT
#if defined(ESOCKTNOSUPPORT)
#define POCO_ESOCKTNOSUPPORT ESOCKTNOSUPPORT
#else
#define POCO_ESOCKTNOSUPPORT -1
#endif
#define POCO_ENOTSUP ENOTSUP
#define POCO_EPFNOSUPPORT EPFNOSUPPORT
#define POCO_EAFNOSUPPORT EAFNOSUPPORT
#define POCO_EADDRINUSE EADDRINUSE
#define POCO_EADDRNOTAVAIL EADDRNOTAVAIL
#define POCO_ENETDOWN ENETDOWN
#define POCO_ENETUNREACH ENETUNREACH
#define POCO_ENETRESET ENETRESET
#define POCO_ECONNABORTED ECONNABORTED
#define POCO_ECONNRESET ECONNRESET
#define POCO_ENOBUFS ENOBUFS
#define POCO_EISCONN EISCONN
#define POCO_ENOTCONN ENOTCONN
#if defined(ESHUTDOWN)
#define POCO_ESHUTDOWN ESHUTDOWN
#else
#define POCO_ESHUTDOWN -2
#endif
#define POCO_ETIMEDOUT ETIMEDOUT
#define POCO_ECONNREFUSED ECONNREFUSED
#if defined(EHOSTDOWN)
#define POCO_EHOSTDOWN EHOSTDOWN
#else
#define POCO_EHOSTDOWN -3
#endif
#define POCO_EHOSTUNREACH EHOSTUNREACH
#define POCO_ESYSNOTREADY -4
#define POCO_ENOTINIT -5
#define POCO_HOST_NOT_FOUND HOST_NOT_FOUND
#define POCO_TRY_AGAIN TRY_AGAIN
#define POCO_NO_RECOVERY NO_RECOVERY
#define POCO_NO_DATA NO_DATA
#endif
#if defined(POCO_OS_FAMILY_BSD) || (POCO_OS == POCO_OS_TRU64) || (POCO_OS == POCO_OS_AIX) || (POCO_OS == POCO_OS_IRIX) || (POCO_OS == POCO_OS_QNX) || (POCO_OS == POCO_OS_VXWORKS)
#define POCO_HAVE_SALEN 1
#endif
#if (POCO_OS == POCO_OS_HPUX) || (POCO_OS == POCO_OS_SOLARIS)
#define POCO_BROKEN_TIMEOUTS 1
#endif
#if defined(POCO_HAVE_SALEN)
#define poco_set_sa_len(pSA, len) (pSA)->sa_len = (len)
#define poco_set_sin_len(pSA) (pSA)->sin_len = sizeof(struct sockaddr_in)
#if defined(POCO_HAVE_IPv6)
#define poco_set_sin6_len(pSA) (pSA)->sin6_len = sizeof(struct sockaddr_in6)
#endif
#else
#define poco_set_sa_len(pSA, len) (void) 0
#define poco_set_sin_len(pSA) (void) 0
#define poco_set_sin6_len(pSA) (void) 0
#endif
#ifndef INADDR_NONE
#define INADDR_NONE 0xFFFFFFFF
#endif
#endif // Net_SocketDefs_INCLUDED
|