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
159 * A mesh query state
185 /** number of activations for the mesh state */
209 /** the mesh state */
229 /** qname from this query. len same as mesh qinfo. */
270 * Allocate mesh, to empty.
273 * @return mesh: the new mesh or NULL on error.
279 * Delete mesh, and all query states and replies in it.
280 * @param mesh: the mesh to delete.
282 void mesh_delete(struct mesh_area* mesh);
287 * Will run the mesh area queries to process if a new query state is created.
289 * @param mesh: the mesh.
300 void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
307 * Will run the mesh area queries to process if a new query state is created.
309 * @param mesh: the mesh.
319 int mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo,
325 * Will run the mesh area queries to process if a new query state is created.
327 * @param mesh: the mesh.
332 void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
340 * @param mesh: the query mesh.
345 void mesh_report_reply(struct mesh_area* mesh, struct outbound_entry* e,
355 * @param qstate: used to find mesh state.
373 * @param qstate: the state to find mesh state, and that wants to receive
400 * @param qstate: the state to find mesh state, and that wants to receive
408 * @param sub: The added mesh state, created if it did not exist already.
424 * @param mstate: mesh state that is done. return_rcode and return_msg
440 * @param mesh: mesh area to add newly runnable modules to.
441 * @param mstate: the state that has results, used to find mesh state.
443 void mesh_walk_supers(struct mesh_area* mesh, struct mesh_state* mstate);
446 * Delete mesh state, cleanup and also rbtrees and so on.
452 /* ------------------- Functions for mesh -------------------- */
455 * Create and initialize a new mesh state and its query state
456 * Does not put the mesh state into rbtrees and so on.
458 * @param qinfo: query info that the mesh is for.
461 * @param prime: if true, it is a priming query, set is_priming on mesh state.
463 * is_valrec on the mesh state.
464 * @return: new mesh state or NULL on allocation error.
471 * Check if the mesh state is unique.
472 * A unique mesh state uses it's unique member to point to itself, else NULL.
473 * @param mstate: mesh state to check.
474 * @return true if the mesh state is unique, false otherwise.
479 * Make a mesh state unique.
480 * A unique mesh state uses it's unique member to point to itself.
481 * @param mstate: mesh state to check.
486 * Cleanup a mesh state and its query state. Does not do rbtree or
488 * @param mstate: mesh state to cleanup. Its pointer may no longer be used
494 * Delete all mesh states from the mesh.
495 * @param mesh: the mesh area to clear
497 void mesh_delete_all(struct mesh_area* mesh);
500 * Find a mesh state in the mesh area. Pass relevant flags.
502 * @param mesh: the mesh area to look in.
509 * @return: mesh state or NULL if not found.
511 struct mesh_state* mesh_area_find(struct mesh_area* mesh,
516 * Setup attachment super/sub relation between super and sub mesh state.
526 * Create new reply structure and attach it to a mesh state.
527 * Does not update stat items in mesh area.
528 * @param s: the mesh state.
541 * Create new callback structure and attach it to a mesh state.
542 * Does not update stat items in mesh area.
543 * @param s: the mesh state.
557 * Run the mesh. Run all runnable mesh states. Which can create new
558 * runnable mesh states. Until completion. Automatically called by
560 * @param mesh: mesh area.
561 * @param mstate: first mesh state to run.
565 void mesh_run(struct mesh_area* mesh, struct mesh_state* mstate,
569 * Print some stats about the mesh to the log.
570 * @param mesh: the mesh to print it for.
573 void mesh_stats(struct mesh_area* mesh, const char* str);
576 * Clear the stats that the mesh keeps (number of queries serviced)
577 * @param mesh: the mesh
579 void mesh_stats_clear(struct mesh_area* mesh);
582 * Print all the states in the mesh to the log.
583 * @param mesh: the mesh to print all states of.
585 void mesh_log_list(struct mesh_area* mesh);
588 * Calculate memory size in use by mesh and all queries inside it.
589 * @param mesh: the mesh to examine.
592 size_t mesh_get_mem(struct mesh_area* mesh);
595 * Find cycle; see if the given mesh is in the targets sub, or sub-sub, ...
598 * @param qstate: given mesh querystate.
603 * @return true if the name,type,class exists and the given qstate mesh exists
614 /** compare two mesh references */
618 * Make space for another recursion state for a reply in the mesh
619 * @param mesh: mesh area
629 int mesh_make_new_space(struct mesh_area* mesh, struct sldns_buffer* qbuf);
632 * Insert mesh state into a double linked list. Inserted at end.
633 * @param m: mesh state.
641 * Remove mesh state from a double linked list. Remove from any position.
642 * @param m: mesh state.
650 * Remove mesh reply entry from the reply entry list. Searches for
652 * @param mesh: to update the counters.
653 * @param m: the mesh state.
656 void mesh_state_remove_reply(struct mesh_area* mesh, struct mesh_state* m,