OpenDNSSEC-signer 2.1.12
Data Structures | Macros | Typedefs | Functions
listener.h File Reference
#include "config.h"
#include "status.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>

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 (void)
 
interface_typelistener_push (listener_type *list, char *address, int family, const char *port)
 
void interface_cleanup (interface_type *i)
 
void listener_cleanup (listener_type *listener)
 

Macro Definition Documentation

◆ DNS_PORT_STRING

#define DNS_PORT_STRING   "53"

Listener.

Definition at line 51 of file listener.h.

◆ INBUF_SIZE

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

Definition at line 52 of file listener.h.

◆ MAX_INTERFACES

#define MAX_INTERFACES   32

Definition at line 53 of file listener.h.

Typedef Documentation

◆ interface_type

Interface.

Definition at line 68 of file listener.h.

◆ listener_type

Listener.

Definition at line 80 of file listener.h.

Function Documentation

◆ interface_cleanup()

void interface_cleanup ( interface_type i)

Clean up interface.

Parameters
[in]iinterface

Clean up interface.

Definition at line 111 of file listener.c.

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

Referenced by listener_cleanup().

◆ listener_cleanup()

void listener_cleanup ( listener_type listener)

Clean up listener.

Parameters
[in]listenerlistener to clean up

Clean up listener.

Definition at line 126 of file listener.c.

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

Referenced by engine_config_cleanup().

◆ listener_create()

listener_type * listener_create ( void  )

Create listener.

Parameters
[in]allocatormemory allocator
Returns
listener_type* listener

Create listener.

Definition at line 45 of file listener.c.

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

◆ listener_push()

interface_type * listener_push ( listener_type listener,
char *  address,
int  family,
const 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 60 of file listener.c.

References interface_struct::addr, acl_addr_storage::addr6, interface_struct::address, listener_struct::count, interface_struct::family, listener_struct::interfaces, and interface_struct::port.