OpenDNSSEC-signer  1.4.7
Data Structures | Macros | Typedefs | Functions
listener.h File Reference
#include "config.h"
#include "shared/allocator.h"
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <unistd.h>
Include dependency graph for listener.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  acl_addr_storage
 
struct  interface_struct
 
struct  listener_struct
 

Macros

#define DNS_PORT_STRING   "53"
 
#define INBUF_SIZE   4096 /* max size for incoming queries */
 
#define MAX_INTERFACES   32
 

Typedefs

typedef struct interface_struct interface_type
 
typedef struct listener_struct listener_type
 

Functions

listener_typelistener_create (allocator_type *allocator)
 
interface_typelistener_push (listener_type *list, char *address, int family, char *port)
 
void listener_print (FILE *fd, listener_type *listener)
 
void listener_log (listener_type *listener)
 
void interface_cleanup (interface_type *i)
 
void listener_cleanup (listener_type *listener)
 

Macro Definition Documentation

#define DNS_PORT_STRING   "53"

Listener.

Definition at line 51 of file listener.h.

Referenced by sock_listen(), and xfrd_acl_sockaddr_to().

#define INBUF_SIZE   4096 /* max size for incoming queries */

Definition at line 52 of file listener.h.

#define MAX_INTERFACES   32

Definition at line 53 of file listener.h.

Referenced by sock_listen().

Typedef Documentation

Interface.

Definition at line 68 of file listener.h.

Listener.

Definition at line 80 of file listener.h.

Function Documentation

void interface_cleanup ( interface_type i)

Clean up interface.

Parameters
[in]iinterface

Clean up interface.

Definition at line 207 of file listener.c.

References interface_struct::address, and interface_struct::port.

Referenced by listener_cleanup().

void listener_cleanup ( listener_type listener)

Clean up listener.

Parameters
[in]listenerlistener to clean up

Clean up listener.

Definition at line 223 of file listener.c.

References listener_struct::allocator, allocator_deallocate(), listener_struct::count, interface_cleanup(), and listener_struct::interfaces.

Referenced by engine_config_cleanup().

listener_type* listener_create ( allocator_type allocator)

Create listener.

Parameters
[in]allocatormemory allocator
Returns
listener_type* listener

Create listener.

Definition at line 44 of file listener.c.

References listener_struct::allocator, allocator_alloc(), listener_struct::count, listener_struct::interfaces, and ods_log_error().

Referenced by parse_conf_listener().

void listener_log ( listener_type listener)

Log listener.

Parameters
[in]listenerlistener

Log listener.

Definition at line 189 of file listener.c.

References listener_struct::count, and listener_struct::interfaces.

void listener_print ( FILE *  fd,
listener_type listener 
)

Print listener.

Parameters
[in]fdfile descriptor
[in]listenerlistener to print

Print listener.

Definition at line 151 of file listener.c.

References listener_struct::count, and listener_struct::interfaces.

interface_type* listener_push ( listener_type listener,
char *  address,
int  family,
char *  port 
)

Push an interface to the listener.

Parameters
[in]listenerlistener
[in]addressIP address
[in]familyaddress family
[in]portport or NULL
Returns
interface_type* added interface

Push an interface to the listener.

Definition at line 69 of file listener.c.

References interface_struct::addr, acl_addr_storage::addr, acl_addr_storage::addr6, interface_struct::address, listener_struct::allocator, allocator_alloc(), allocator_deallocate(), allocator_strdup(), listener_struct::count, interface_struct::family, listener_struct::interfaces, ods_fatal_exit(), ods_log_assert, ods_log_error(), and interface_struct::port.

Referenced by parse_conf_listener().