Lines Matching full: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
80 * Mesh of query states
161 * A mesh query state
187 /** number of activations for the mesh state */
211 /** the mesh state */
231 /** qname from this query. len same as mesh qinfo. */
240 * Mesh result callback func.
272 * Allocate mesh, to empty.
275 * @return mesh: the new mesh or NULL on error.
281 * Delete mesh, and all query states and replies in it.
282 * @param mesh: the mesh to delete.
284 void mesh_delete(struct mesh_area* mesh);
289 * Will run the mesh area queries to process if a new query state is created.
291 * @param mesh: the mesh.
304 void mesh_new_client(struct mesh_area* mesh, struct query_info* qinfo,
312 * Will run the mesh area queries to process if a new query state is created.
314 * @param mesh: the mesh.
326 int mesh_new_callback(struct mesh_area* mesh, struct query_info* qinfo,
332 * Will run the mesh area queries to process if a new query state is created.
334 * @param mesh: the mesh.
344 void mesh_new_prefetch(struct mesh_area* mesh, struct query_info* qinfo,
353 * @param mesh: the query mesh.
358 void mesh_report_reply(struct mesh_area* mesh, struct outbound_entry* e,
368 * @param qstate: used to find mesh state.
386 * @param qstate: the state to find mesh state, and that wants to receive
413 * @param qstate: the state to find mesh state, and that wants to receive
421 * @param sub: The added mesh state, created if it did not exist already.
437 * @param mstate: mesh state that is done. return_rcode and return_msg
453 * @param mesh: mesh area to add newly runnable modules to.
454 * @param mstate: the state that has results, used to find mesh state.
456 void mesh_walk_supers(struct mesh_area* mesh, struct mesh_state* mstate);
459 * Delete mesh state, cleanup and also rbtrees and so on.
465 /* ------------------- Functions for mesh -------------------- */
468 * Create and initialize a new mesh state and its query state
469 * Does not put the mesh state into rbtrees and so on.
471 * @param qinfo: query info that the mesh is for.
474 * @param prime: if true, it is a priming query, set is_priming on mesh state.
476 * is_valrec on the mesh state.
477 * @return: new mesh state or NULL on allocation error.
484 * Make a mesh state unique.
485 * A unique mesh state uses it's unique member to point to itself.
486 * @param mstate: mesh state to check.
491 * Cleanup a mesh state and its query state. Does not do rbtree or
493 * @param mstate: mesh state to cleanup. Its pointer may no longer be used
499 * Delete all mesh states from the mesh.
500 * @param mesh: the mesh area to clear
502 void mesh_delete_all(struct mesh_area* mesh);
505 * Find a mesh state in the mesh area. Pass relevant flags.
507 * @param mesh: the mesh area to look in.
514 * @return: mesh state or NULL if not found.
516 struct mesh_state* mesh_area_find(struct mesh_area* mesh,
521 * Setup attachment super/sub relation between super and sub mesh state.
531 * Create new reply structure and attach it to a mesh state.
532 * Does not update stat items in mesh area.
533 * @param s: the mesh state.
546 * Create new callback structure and attach it to a mesh state.
547 * Does not update stat items in mesh area.
548 * @param s: the mesh state.
562 * Run the mesh. Run all runnable mesh states. Which can create new
563 * runnable mesh states. Until completion. Automatically called by
565 * @param mesh: mesh area.
566 * @param mstate: first mesh state to run.
570 void mesh_run(struct mesh_area* mesh, struct mesh_state* mstate,
574 * Print some stats about the mesh to the log.
575 * @param mesh: the mesh to print it for.
578 void mesh_stats(struct mesh_area* mesh, const char* str);
581 * Clear the stats that the mesh keeps (number of queries serviced)
582 * @param mesh: the mesh
584 void mesh_stats_clear(struct mesh_area* mesh);
587 * Print all the states in the mesh to the log.
588 * @param mesh: the mesh to print all states of.
590 void mesh_log_list(struct mesh_area* mesh);
593 * Calculate memory size in use by mesh and all queries inside it.
594 * @param mesh: the mesh to examine.
597 size_t mesh_get_mem(struct mesh_area* mesh);
600 * Find cycle; see if the given mesh is in the targets sub, or sub-sub, ...
603 * @param qstate: given mesh querystate.
608 * @return true if the name,type,class exists and the given qstate mesh exists
619 /** compare two mesh references */
623 * Make space for another recursion state for a reply in the mesh
624 * @param mesh: mesh area
634 int mesh_make_new_space(struct mesh_area* mesh, struct sldns_buffer* qbuf);
637 * Insert mesh state into a double linked list. Inserted at end.
638 * @param m: mesh state.
646 * Remove mesh state from a double linked list. Remove from any position.
647 * @param m: mesh state.
655 * Remove mesh reply entry from the reply entry list. Searches for
657 * @param mesh: to update the counters.
658 * @param m: the mesh state.
661 void mesh_state_remove_reply(struct mesh_area* mesh, struct mesh_state* m,
684 * See if the mesh has space for more queries. You can allocate queries
686 * @param mesh: mesh area.
692 int mesh_jostle_exceeded(struct mesh_area* mesh);
696 * @param mstate: mesh state for query that has serve_expired_data.