OpenDNSSEC-signer  1.4.9
Data Structures | Macros | Typedefs | Enumerations | Functions
netio.h File Reference
#include <signal.h>
#include "config.h"
#include "shared/allocator.h"
Include dependency graph for netio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  netio_handler_list_struct
 
struct  netio_handler_struct
 
struct  netio_struct
 

Macros

#define PF_INET   AF_INET
 
#define PF_INET6   AF_INET6
 

Typedefs

typedef enum netio_events_enum netio_events_type
 
typedef struct netio_struct netio_type
 
typedef struct netio_handler_struct netio_handler_type
 
typedef struct netio_handler_list_struct netio_handler_list_type
 
typedef void(* netio_event_handler_type) (netio_type *netio, netio_handler_type *handler, netio_events_type event_types)
 

Enumerations

enum  netio_events_enum {
  NETIO_EVENT_NONE = 0, NETIO_EVENT_READ = 1, NETIO_EVENT_WRITE = 2, NETIO_EVENT_EXCEPT = 4,
  NETIO_EVENT_TIMEOUT = 8
}
 

Functions

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)
 
const 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)
 
void timespec_add (struct timespec *left, const struct timespec *right)
 

Macro Definition Documentation

#define PF_INET   AF_INET

Network I/O Support.

Definition at line 58 of file netio.h.

Referenced by notify_create(), and xfrd_acl_sockaddr_to().

#define PF_INET6   AF_INET6

Definition at line 61 of file netio.h.

Referenced by notify_create(), and xfrd_acl_sockaddr_to().

Typedef Documentation

typedef void(* netio_event_handler_type) (netio_type *netio, netio_handler_type *handler, netio_events_type event_types)

Network I/O event handler function.

Definition at line 86 of file netio.h.

Definition at line 76 of file netio.h.

Definition at line 80 of file netio.h.

Definition at line 79 of file netio.h.

typedef struct netio_struct netio_type

Definition at line 78 of file netio.h.

Enumeration Type Documentation

Enumerator
NETIO_EVENT_NONE 
NETIO_EVENT_READ 
NETIO_EVENT_WRITE 
NETIO_EVENT_EXCEPT 
NETIO_EVENT_TIMEOUT 

Definition at line 69 of file netio.h.

Function Documentation

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

Clean up netio instance

Parameters
[in]netionetio instance

Clean up netio instance

Definition at line 352 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)
const 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 
)
void timespec_add ( struct timespec *  left,
const struct timespec *  right 
)

Add timespecs.

Parameters
[in]leftleft
[in]rightright

Add timespecs.

Definition at line 145 of file netio.c.

References NANOSECONDS_PER_SECOND.

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