tor  0.4.0.1-alpha
Data Structures | Macros | Typedefs | Functions
alertsock.h File Reference
#include "orconfig.h"
#include "lib/net/nettypes.h"
#include "lib/cc/torint.h"

Go to the source code of this file.

Data Structures

struct  alert_sockets_t
 

Macros

#define ASOCKS_NOEVENTFD2   (1u<<0)
 
#define ASOCKS_NOEVENTFD   (1u<<1)
 
#define ASOCKS_NOPIPE2   (1u<<2)
 
#define ASOCKS_NOPIPE   (1u<<3)
 
#define ASOCKS_NOSOCKETPAIR   (1u<<4)
 

Typedefs

typedef struct alert_sockets_t alert_sockets_t
 

Functions

int alert_sockets_create (alert_sockets_t *socks_out, uint32_t flags)
 
void alert_sockets_close (alert_sockets_t *socks)
 

Detailed Description

Header for alertsock.c.

Definition in file alertsock.h.

Typedef Documentation

◆ alert_sockets_t

Helper type used to manage waking up the main thread while it's in the libevent main loop. Used by the work queue code.

Function Documentation

◆ alert_sockets_close()

void alert_sockets_close ( alert_sockets_t socks)

Close the sockets in socks.

Definition at line 283 of file alertsock.c.

References alert_sockets_t::alert_fn, alert_sockets_t::read_fd, sock_alert(), and alert_sockets_t::write_fd.

◆ alert_sockets_create()

int alert_sockets_create ( alert_sockets_t socks_out,
uint32_t  flags 
)

Allocate a new set of alert sockets, and set the appropriate function pointers, in socks_out.

Definition at line 191 of file alertsock.c.

References TOR_INVALID_SOCKET, and tor_socket_t.