Lines Matching refs:mesh
2 * services/mesh.h - deal with mesh of query states and handle events for that.
39 * This file contains functions to assist in dealing with a mesh of
40 * query states. This mesh is supposed to be thread-specific.
67 * Maximum number of mesh state activations. Any more is likely an
172 * A mesh query state
198 /** number of activations for the mesh state */
222 /** the mesh state */
242 /** qname from this query. len same as mesh qinfo. */
283 * Allocate mesh, to empty.
286 * @return mesh: the new mesh or NULL on error.
292 * Delete mesh, and all query states and replies in it.
293 * @param mesh: the mesh to delete.
295 void mesh_delete(struct mesh_area* mesh);
300 * Will run the mesh area queries to process if a new query state is created.
302 * @param mesh: the mesh.
315 void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
323 * Will run the mesh area queries to process if a new query state is created.
325 * @param mesh: the mesh.
337 int mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo,
343 * Will run the mesh area queries to process if a new query state is created.
345 * @param mesh: the mesh.
355 void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
364 * @param mesh: the query mesh.
369 void mesh_report_reply(struct mesh_area* mesh, struct outbound_entry* e,
379 * @param qstate: used to find mesh state.
397 * @param qstate: the state to find mesh state, and that wants to receive
424 * @param qstate: the state to find mesh state, and that wants to receive
432 * @param sub: The added mesh state, created if it did not exist already.
448 * @param mstate: mesh state that is done. return_rcode and return_msg
464 * @param mesh: mesh area to add newly runnable modules to.
465 * @param mstate: the state that has results, used to find mesh state.
467 void mesh_walk_supers(struct mesh_area* mesh, struct mesh_state* mstate);
470 * Delete mesh state, cleanup and also rbtrees and so on.
476 /* ------------------- Functions for mesh -------------------- */
479 * Create and initialize a new mesh state and its query state
480 * Does not put the mesh state into rbtrees and so on.
482 * @param qinfo: query info that the mesh is for.
485 * @param prime: if true, it is a priming query, set is_priming on mesh state.
487 * is_valrec on the mesh state.
488 * @return: new mesh state or NULL on allocation error.
495 * Make a mesh state unique.
496 * A unique mesh state uses it's unique member to point to itself.
497 * @param mstate: mesh state to check.
502 * Cleanup a mesh state and its query state. Does not do rbtree or
504 * @param mstate: mesh state to cleanup. Its pointer may no longer be used
510 * Delete all mesh states from the mesh.
511 * @param mesh: the mesh area to clear
513 void mesh_delete_all(struct mesh_area* mesh);
516 * Find a mesh state in the mesh area. Pass relevant flags.
518 * @param mesh: the mesh area to look in.
525 * @return: mesh state or NULL if not found.
527 struct mesh_state* mesh_area_find(struct mesh_area* mesh,
532 * Setup attachment super/sub relation between super and sub mesh state.
542 * Create new reply structure and attach it to a mesh state.
543 * Does not update stat items in mesh area.
544 * @param s: the mesh state.
557 * Create new callback structure and attach it to a mesh state.
558 * Does not update stat items in mesh area.
559 * @param s: the mesh state.
573 * Run the mesh. Run all runnable mesh states. Which can create new
574 * runnable mesh states. Until completion. Automatically called by
576 * @param mesh: mesh area.
577 * @param mstate: first mesh state to run.
581 void mesh_run(struct mesh_area* mesh, struct mesh_state* mstate,
585 * Print some stats about the mesh to the log.
586 * @param mesh: the mesh to print it for.
589 void mesh_stats(struct mesh_area* mesh, const char* str);
592 * Clear the stats that the mesh keeps (number of queries serviced)
593 * @param mesh: the mesh
595 void mesh_stats_clear(struct mesh_area* mesh);
598 * Print all the states in the mesh to the log.
599 * @param mesh: the mesh to print all states of.
601 void mesh_log_list(struct mesh_area* mesh);
604 * Calculate memory size in use by mesh and all queries inside it.
605 * @param mesh: the mesh to examine.
608 size_t mesh_get_mem(struct mesh_area* mesh);
611 * Find cycle; see if the given mesh is in the targets sub, or sub-sub, ...
614 * @param qstate: given mesh querystate.
619 * @return true if the name,type,class exists and the given qstate mesh exists
630 /** compare two mesh references */
634 * Make space for another recursion state for a reply in the mesh
635 * @param mesh: mesh area
645 int mesh_make_new_space(struct mesh_area* mesh, struct sldns_buffer* qbuf);
648 * Insert mesh state into a double linked list. Inserted at end.
649 * @param m: mesh state.
657 * Remove mesh state from a double linked list. Remove from any position.
658 * @param m: mesh state.
666 * Remove mesh reply entry from the reply entry list. Searches for
668 * @param mesh: to update the counters.
669 * @param m: the mesh state.
672 void mesh_state_remove_reply(struct mesh_area* mesh, struct mesh_state* m,
695 * See if the mesh has space for more queries. You can allocate queries
697 * @param mesh: mesh area.
703 int mesh_jostle_exceeded(struct mesh_area* mesh);
707 * @param mstate: mesh state for query that has serve_expired_data.
712 * Remove callback from mesh. Removes the callback from the state.
715 * @param mesh: the mesh.
721 void mesh_remove_callback(struct mesh_area* mesh, struct query_info* qinfo,