Bitcoin Core  0.18.99
P2P Digital Currency
Macros | Typedefs | Functions
compat.h File Reference
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <limits.h>
#include <netdb.h>
#include <unistd.h>
#include <errno.h>
Include dependency graph for compat.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WSAGetLastError()   errno
 
#define WSAEINVAL   EINVAL
 
#define WSAEALREADY   EALREADY
 
#define WSAEWOULDBLOCK   EWOULDBLOCK
 
#define WSAEMSGSIZE   EMSGSIZE
 
#define WSAEINTR   EINTR
 
#define WSAEINPROGRESS   EINPROGRESS
 
#define WSAEADDRINUSE   EADDRINUSE
 
#define WSAENOTSOCK   EBADF
 
#define INVALID_SOCKET   (SOCKET)(~0)
 
#define SOCKET_ERROR   -1
 
#define MAX_PATH   1024
 

Typedefs

typedef unsigned int SOCKET
 
typedef void * sockopt_arg_type
 

Functions

size_t strnlen (const char *start, size_t max_len)
 
static bool IsSelectableSocket (const SOCKET &s)
 

Macro Definition Documentation

◆ INVALID_SOCKET

#define INVALID_SOCKET   (SOCKET)(~0)

Definition at line 59 of file compat.h.

◆ MAX_PATH

#define MAX_PATH   1024

Definition at line 69 of file compat.h.

◆ SOCKET_ERROR

#define SOCKET_ERROR   -1

Definition at line 60 of file compat.h.

◆ WSAEADDRINUSE

#define WSAEADDRINUSE   EADDRINUSE

Definition at line 57 of file compat.h.

◆ WSAEALREADY

#define WSAEALREADY   EALREADY

Definition at line 52 of file compat.h.

◆ WSAEINPROGRESS

#define WSAEINPROGRESS   EINPROGRESS

Definition at line 56 of file compat.h.

◆ WSAEINTR

#define WSAEINTR   EINTR

Definition at line 55 of file compat.h.

◆ WSAEINVAL

#define WSAEINVAL   EINVAL

Definition at line 51 of file compat.h.

◆ WSAEMSGSIZE

#define WSAEMSGSIZE   EMSGSIZE

Definition at line 54 of file compat.h.

◆ WSAENOTSOCK

#define WSAENOTSOCK   EBADF

Definition at line 58 of file compat.h.

◆ WSAEWOULDBLOCK

#define WSAEWOULDBLOCK   EWOULDBLOCK

Definition at line 53 of file compat.h.

◆ WSAGetLastError

#define WSAGetLastError ( )    errno

Definition at line 50 of file compat.h.

Typedef Documentation

◆ SOCKET

typedef unsigned int SOCKET

Definition at line 48 of file compat.h.

◆ sockopt_arg_type

typedef void* sockopt_arg_type

Definition at line 86 of file compat.h.

Function Documentation

◆ IsSelectableSocket()

static bool IsSelectableSocket ( const SOCKET s)
inlinestatic

Definition at line 98 of file compat.h.

Here is the caller graph for this function:

◆ strnlen()

size_t strnlen ( const char *  start,
size_t  max_len 
)

Definition at line 12 of file strnlen.cpp.

Here is the caller graph for this function: