unbound  0.1
Data Structures | Macros | Enumerations | Functions
module.h File Reference

This file contains the interface for DNS handling modules. More...

#include "util/storage/lruhash.h"
#include "util/data/msgreply.h"
#include "util/data/msgparse.h"

Data Structures

struct  module_env
 Module environment. More...
struct  sock_list
 Linked list of sockaddrs May be allocated such that only 'len' bytes of addr exist for the structure. More...
struct  module_qstate
 Module state, per query. More...
struct  module_func_block
 Module functionality block. More...

Macros

#define MAX_MODULE   5
 Maximum number of modules in operation.

Enumerations

enum  module_ext_state {
  module_state_initial = 0, module_wait_reply, module_wait_module, module_restart_next,
  module_wait_subquery, module_error, module_finished
}
 External visible states of the module state machine Modules may also have an internal state. More...
enum  module_ev {
  module_event_new = 0, module_event_pass, module_event_reply, module_event_noreply,
  module_event_capsfail, module_event_moddone, module_event_error
}
 Events that happen to modules, that start or wakeup modules. More...

Functions

const char * strextstate (enum module_ext_state s)
 Debug utility: module external qstate to string.
const char * strmodulevent (enum module_ev e)
 Debug utility: module event to string.

Detailed Description

This file contains the interface for DNS handling modules.

Enumeration Type Documentation

External visible states of the module state machine Modules may also have an internal state.

Modules are supposed to run to completion or until blocked.

Enumerator:
module_state_initial 

initial state - new query

module_wait_reply 

waiting for reply to outgoing network query

module_wait_module 

module is waiting for another module

module_restart_next 

module is waiting for another module; that other is restarted

module_wait_subquery 

module is waiting for sub-query

module_error 

module could not finish the query

module_finished 

module is finished with query

enum module_ev

Events that happen to modules, that start or wakeup modules.

Enumerator:
module_event_new 

new query

module_event_pass 

query passed by other module

module_event_reply 

reply inbound from server

module_event_noreply 

no reply, timeout or other error

module_event_capsfail 

reply is there, but capitalisation check failed

module_event_moddone 

next module is done, and its reply is awaiting you

module_event_error 

error

Function Documentation

const char* strextstate ( enum module_ext_state  s)

Debug utility: module external qstate to string.

Parameters
s,:the state value.
Returns
descriptive string.

References module_error, module_finished, module_restart_next, module_state_initial, module_wait_module, module_wait_reply, and module_wait_subquery.

Referenced by get_mesh_status(), iter_operate(), mesh_run(), and val_operate().

const char* strmodulevent ( enum module_ev  e)

Debug utility: module event to string.

Parameters
e,:the module event value.
Returns
descriptive string.

References module_event_capsfail, module_event_error, module_event_moddone, module_event_new, module_event_noreply, module_event_pass, and module_event_reply.

Referenced by iter_operate(), and val_operate().