Lines Matching +full:on +full:- +full:module
2 * util/module.h - DNS handling module interface
30 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
41 * The module interface uses the DNS modules as state machines. The
42 * state machines are activated in sequence to operate on queries. Once
47 * The module provides a number of functions, listed in the module_func_block.
48 * The module is inited and destroyed and memory usage queries, for the
49 * module as a whole, for entire-module state (such as a cache). And per-query
51 * the per-query state.
53 * Most per-query state should simply be allocated in the query region.
56 * The module environment contains services and information and caches
58 * function pointers for module-specific tasks (like sending queries).
60 * *** Example module calls for a normal query
65 * At the start of the program the iterator module is initialised.
66 * The iterator module sets up its global state, such as donotquery lists
70 * starts the resolution process. The validator module is the first
71 * in the list of modules, and it is started on this new query. The
74 * causes the next module in the list to be started.
76 * The next module is the iterator. It is started on the passed query and
82 * When the UDP reply comes back (and on errors and timeouts), the
83 * operate function is called for the query, on the iterator module,
86 * operate call, which causes the previous module to be started.
88 * The previous module, the validator module, is started with the event
89 * that the iterator module is done. The validator decides to validate
94 * There is no previous module from the validator module, and the mesh
98 * If other modules had been waiting (recursively) on the answer to this
100 * routine on all the waiting modules, and once that is done it calls all of
102 * still exists and information can be copied from it (but the module should
103 * not really re-entry codepoints and services). During the operate call
109 * *** Example module calls for recursion
111 * A module is called in operate, and it decides that it wants to perform
112 * recursion. That is, it wants the full state-machine-list to operate on
114 * The routine returns the newly created state, and potentially the module
115 * can edit the module-states for the newly created query (i.e. pass along
116 * some information, like delegation points). The module then suspends,
119 * The mesh meanwhile will have the newly created query (or queries) on
120 * a waiting list, and will call operate() on this query (or queries).
121 * It starts again at the start of the module list for them. The query
123 * done. When they are done the mesh calls inform_super on the module that
124 * wanted the recursion. After that the mesh calls operate() on the module
125 * that wanted to do the recursion, and during this phase the module could,
128 * If the module decides it no longer wants the recursive information
133 * The iterator module will fetch items from the cache, so a recursion
135 * module has to wait for completion or eventual timeout. A recursive query
141 * in out-of-memory conditions. If the rcode member is 0 (NOERROR) then
147 * module towards the leftmost modules and then towards the user.
149 * If you want to avoid recursion-cycles where queries need other queries
215 /* Inplace callback for when EDNS is parsed on a reply received from the
243 /** module id */
253 * qstate: the module state. NULL when calling before the query reaches the
262 * qstate->mesh_info->reply_list.
264 * id: module id.
288 * id: module id.
297 * Inplace callback function called after parsing edns on query reply.
301 * id: module id.
313 * id: module id.
333 * Module environment.
334 * Services and data provided to the module.
337 /* --- data --- */
349 /* --- services --- */
352 * operate() should return with wait_reply. Later on a callback
377 * @return: false on failure (memory or socket related). no query was
379 * This outbound_entry will be used on later module invocations
390 * Detach-subqueries.
391 * Remove all sub-query references from this query state.
392 * Keeps super-references of those sub-queries correct.
406 * o need to initialise the new state (module init; it is a new state).
407 * so that the next run of the query with this module is successful.
418 * @return: false on error, true if success (and init may be needed).
428 * Performs a cycle detection - for double check - and fails if there is
434 * o need to initialise the new state (module init; it is a new state).
435 * so that the next run of the query with this module is successful.
448 * @return: false on error, true if success (and init may be needed).
465 * Detect if adding a dependency for qstate on name,type,class will
474 * if qstate becomes dependent on name,type,class then a
485 /** internal data for daemon - worker thread. */
501 /** is validation required for messages, controls client-facing
506 * and are not primed and ready for validation, but on the bright
512 /** the 5011-probe timer (if any) */
521 * The hints -- these aren't stored in the cache because they don't
527 /** module specific data. indexed by module id. */
543 /** module stack */
554 * External visible states of the module state machine
559 /** initial state - new query */
563 /** module is waiting for another module */
565 /** module is waiting for another module; that other is restarted */
567 /** module is waiting for sub-query */
569 /** module could not finish the query */
571 /** module is finished with query */
581 /** query passed by other module */
589 /** next module is done, and its reply is awaiting you */
619 * Module state, per query.
632 /** the client network address is needed for the client-subnet option
640 /** the reply message, with message for client and calling module */
650 /** failure reason information if val-log-level is high */
652 /** which module is executing */
654 /** module states */
656 /** module specific data for query. indexed by module id. */
679 /** whether to refetch a fresh answer on finishing this state*/
693 * Attributes of clients that share the qstate that may affect IP-based
698 /** Extended result of response-ip action processing, mainly
713 * Module functionality block
716 /** text string name of module */
720 * Set up the module for start. This is called only once at startup.
723 * @param env: module environment.
724 * @param id: module id number.
725 * return: 0 on error
730 * Close down the module for stop. This is called only once before
734 * @param env: module environment.
735 * @param id: module id number.
740 * Initialise the module. Called when restarting or reloading the
743 * @param env: module environment.
744 * @param id: module id number.
745 * return: 0 on error
750 * Deinitialise the module, undo stuff done during init().
752 * @param env: module environment.
753 * @param id: module id number.
758 * accept a new query, or work further on existing query.
759 * Changes the qstate->ext_state to be correct on exit.
760 * @param ev: event that causes the module state machine to
761 * (re-)activate.
767 * @param id: module id number that operate() is called on.
769 * or error on this outbound query.
771 * o wait_module: next module is started. (with pass event).
772 * o error or finished: previous module is resumed.
783 * the one from the current module active in the super querystate.
786 * @param id: module id for this module.
787 * This coincides with the current module for the super qstate.
794 * clear module specific data
799 * How much memory is the module specific data using.
800 * @param env: module environment.
801 * @param id: the module id.
808 * Debug utility: module external qstate to string
815 * Debug utility: module event to string
816 * @param e: the module event value.
861 * @return string or NULL on malloc failure (already logged).
867 * Check the sldns_ede_code of the qstate->errinf.
876 * @return string or NULL on malloc failure (already logged).
883 * @return string or NULL on malloc failure (already logged).
889 * @param env: the module environment.
890 * @return false on failure (no memory).
896 * @param env: the module environment.
907 * @param env: the module environment.
908 * @return true on success, false on failure (registering more options than
920 * @param env: the module environment.
921 * @param id: module id.
922 * @return true on success, false on failure (out of memory or trying to
930 * Delete callback for specified type and module id.
931 * @param env: the module environment.
933 * @param id: module id.
941 * @param env: the module environment.
948 * @param env: the module environment.
958 * @param env: the module environment.
969 * @param env: the module environment.
978 * @param env: the module environment.
987 * @param id: module id.