OpenDNSSEC-signer  1.4.1
Macros | Functions
netio.c File Reference
#include <config.h>
#include <assert.h>
#include <errno.h>
#include <sys/time.h>
#include <string.h>
#include <stdlib.h>
#include "shared/log.h"
#include "wire/netio.h"
Include dependency graph for netio.c:

Go to the source code of this file.

Macros

#define NANOSECONDS_PER_SECOND   1000000000L
 

Functions

int pselect (int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timespec *timeout, const sigset_t *sigmask)
 
netio_typenetio_create (allocator_type *allocator)
 
void netio_add_handler (netio_type *netio, netio_handler_type *handler)
 
void netio_remove_handler (netio_type *netio, netio_handler_type *handler)
 
void timespec_add (struct timespec *left, const struct timespec *right)
 
struct timespec * netio_current_time (netio_type *netio)
 
int netio_dispatch (netio_type *netio, const struct timespec *timeout, const sigset_t *sigmask)
 
void netio_cleanup (netio_type *netio)
 

Macro Definition Documentation

#define NANOSECONDS_PER_SECOND   1000000000L

Definition at line 30 of file netio.c.

Referenced by timespec_add().

Function Documentation

void netio_add_handler ( netio_type netio,
netio_handler_type handler 
)
void netio_cleanup ( netio_type netio)

Clean up netio instance

Definition at line 354 of file netio.c.

References netio_struct::allocator, allocator_deallocate(), netio_struct::deallocated, and netio_struct::handlers.

Referenced by dnshandler_cleanup(), and xfrhandler_cleanup().

netio_type* netio_create ( allocator_type allocator)
struct timespec* netio_current_time ( netio_type netio)
int netio_dispatch ( netio_type netio,
const struct timespec *  timeout,
const sigset_t *  sigmask 
)
void netio_remove_handler ( netio_type netio,
netio_handler_type handler 
)
int pselect ( int  n,
fd_set *  readfds,
fd_set *  writefds,
fd_set *  exceptfds,
const struct timespec *  timeout,
const sigset_t *  sigmask 
)

Referenced by netio_dispatch().

void timespec_add ( struct timespec *  left,
const struct timespec *  right 
)

Add timespecs.

Definition at line 147 of file netio.c.

References NANOSECONDS_PER_SECOND.

Referenced by sock_handle_tcp_accept(), sock_handle_tcp_read(), and sock_handle_tcp_write().