Go to the documentation of this file.
11 #ifndef TOR_NET_TYPES_H
12 #define TOR_NET_TYPES_H
15 #ifdef HAVE_SYS_TYPES_H
16 #include <sys/types.h>
18 #ifdef HAVE_SYS_SOCKET_H
19 #include <sys/socket.h>
22 #if (SIZEOF_SOCKLEN_T == 0)
23 typedef int socklen_t;
30 #define tor_socket_t intptr_t
31 #define TOR_SOCKET_T_FORMAT "%"PRIuPTR
32 #define SOCKET_OK(s) ((SOCKET)(s) != INVALID_SOCKET)
33 #define TOR_INVALID_SOCKET INVALID_SOCKET
36 #define tor_socket_t int
37 #define TOR_SOCKET_T_FORMAT "%d"
39 #define SOCKET_OK(s) ((s) >= 0)
41 #define TOR_INVALID_SOCKET (-1)