Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
evloop.h File Reference
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <glib.h>
Include dependency graph for evloop.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  evloop
 
struct  evloop_fdinfo
 

Macros

#define EVLOOP_FDTYPE_A   0
 
#define EVLOOP_FDTYPE_R   1
 
#define EVLOOP_FDTYPE_W   2
 
#define EVLOOP_FDTYPE_X   3
 
#define EVLOOP_HRET_BADERROR   -2
 
#define EVLOOP_HRET_ERROR   -1
 
#define EVLOOP_HRET_SUCCESS   0
 
#define EVLOOP_HRET_REMOVETYPE   1
 
#define EVLOOP_HRET_REMOVEALLTYPES   2
 
#define EVLOOP_HRET_DONE_SUCCESS   3
 
#define EVLOOP_HRET_DONE_FAILURE   4
 

Typedefs

typedef int(* evloop_handler_t )(int fd, int fdtype, void *state)
 
typedef int(* evloop_error_handler_t )(int errortype, int fd, int fdtype, struct evloop_fdinfo *error_fdinfo)
 

Enumerations

enum  evloop_flags_t { EVLOOP_RETONINT = 1 << 0 }
 

Functions

struct evloopevloop_create (evloop_error_handler_t ehandler)
 
int evloop_maxsize (struct evloop *evloop)
 
int evloop_set_fd (struct evloop *evloop, int fd, int fdtype, evloop_handler_t handler, void *state)
 
int evloop_unset_fd (struct evloop *evloop, int fd, int fdtype)
 
int evloop_run (struct evloop *evloop, evloop_flags_t flags, struct timeval *timeout, struct evloop_fdinfo **error_fdinfo)
 
int evloop_handleone (struct evloop *evloop, evloop_flags_t flags, struct timeval *timeout, struct evloop_fdinfo **handled_fdinfo, int *handled_fdtype, int *handled_hrc)
 
void evloop_free (struct evloop *evloop)
 

Macro Definition Documentation

#define EVLOOP_FDTYPE_A   0

Definition at line 29 of file evloop.h.

#define EVLOOP_FDTYPE_R   1

Definition at line 30 of file evloop.h.

#define EVLOOP_FDTYPE_W   2

Definition at line 31 of file evloop.h.

#define EVLOOP_FDTYPE_X   3

Definition at line 32 of file evloop.h.

#define EVLOOP_HRET_BADERROR   -2

Definition at line 34 of file evloop.h.

#define EVLOOP_HRET_DONE_FAILURE   4

Definition at line 40 of file evloop.h.

#define EVLOOP_HRET_DONE_SUCCESS   3

Definition at line 39 of file evloop.h.

#define EVLOOP_HRET_ERROR   -1

Definition at line 35 of file evloop.h.

#define EVLOOP_HRET_REMOVEALLTYPES   2

Definition at line 38 of file evloop.h.

#define EVLOOP_HRET_REMOVETYPE   1

Definition at line 37 of file evloop.h.

#define EVLOOP_HRET_SUCCESS   0

Definition at line 36 of file evloop.h.

Typedef Documentation

typedef int(* evloop_error_handler_t)(int errortype, int fd, int fdtype, struct evloop_fdinfo *error_fdinfo)

Definition at line 63 of file evloop.h.

typedef int(* evloop_handler_t)(int fd, int fdtype, void *state)

Definition at line 62 of file evloop.h.

Enumeration Type Documentation

Enumerator
EVLOOP_RETONINT 

Definition at line 45 of file evloop.h.

Function Documentation

struct evloop* evloop_create ( evloop_error_handler_t  ehandler)

Definition at line 33 of file evloop.c.

void evloop_free ( struct evloop evloop)

Definition at line 652 of file evloop.c.

int evloop_handleone ( struct evloop evloop,
evloop_flags_t  flags,
struct timeval *  timeout,
struct evloop_fdinfo **  handled_fdinfo,
int *  handled_fdtype,
int *  handled_hrc 
)

Definition at line 434 of file evloop.c.

int evloop_maxsize ( struct evloop evloop)

Definition at line 191 of file evloop.c.

int evloop_run ( struct evloop evloop,
evloop_flags_t  flags,
struct timeval *  timeout,
struct evloop_fdinfo **  error_fdinfo 
)

Definition at line 195 of file evloop.c.

int evloop_set_fd ( struct evloop evloop,
int  fd,
int  fdtype,
evloop_handler_t  handler,
void *  state 
)

Definition at line 48 of file evloop.c.

int evloop_unset_fd ( struct evloop evloop,
int  fd,
int  fdtype 
)

Definition at line 165 of file evloop.c.