Tor  0.4.7.0-alpha-dev
Macros | Typedefs
nettypes.h File Reference

Declarations for types used throughout the Tor networking system. More...

#include "orconfig.h"

Go to the source code of this file.

Macros

#define tor_socket_t   int
 
#define TOR_SOCKET_T_FORMAT   "%d"
 
#define SOCKET_OK(s)   ((s) >= 0)
 
#define TOR_INVALID_SOCKET   (-1)
 

Typedefs

typedef int socklen_t
 

Detailed Description

Declarations for types used throughout the Tor networking system.

Definition in file nettypes.h.

Macro Definition Documentation

◆ SOCKET_OK

#define SOCKET_OK (   s)    ((s) >= 0)

Macro: true iff 's' is a possible value for a valid initialized socket.

Definition at line 39 of file nettypes.h.

◆ TOR_INVALID_SOCKET

#define TOR_INVALID_SOCKET   (-1)

Error/uninitialized value for a tor_socket_t.

Definition at line 41 of file nettypes.h.

◆ tor_socket_t

#define tor_socket_t   int

Type used for a network socket.

Definition at line 36 of file nettypes.h.