#include "config.h"
#include "util/log.h"
#include "services/mesh.h"
Data Structures | |
struct | order_id |
keep track of lock id in lock-verify application More... | |
Functions | |
void | worker_handle_control_cmd (struct tube *tube, uint8_t *buffer, size_t len, int error, void *arg) |
process control messages from the main thread. | |
int | worker_handle_request (struct comm_point *c, void *arg, int error, struct comm_reply *repinfo) |
handles callbacks from listening event interface | |
int | worker_handle_reply (struct comm_point *c, void *arg, int error, struct comm_reply *reply_info) |
process incoming replies from the network | |
int | worker_handle_service_reply (struct comm_point *c, void *arg, int error, struct comm_reply *reply_info) |
process incoming serviced query replies from the network | |
int | remote_accept_callback (struct comm_point *c, void *arg, int error, struct comm_reply *repinfo) |
handle remote control accept callbacks | |
int | remote_control_callback (struct comm_point *c, void *arg, int error, struct comm_reply *repinfo) |
handle remote control data callbacks | |
void | worker_sighandler (int sig, void *arg) |
Worker signal handler function. | |
int | worker_send_packet (ldns_buffer *pkt, struct sockaddr_storage *addr, socklen_t addrlen, int timeout, struct module_qstate *q, int use_tcp) |
Worker service routine to send udp messages for modules. | |
struct outbound_entry * | worker_send_query (uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec, struct sockaddr_storage *addr, socklen_t addrlen, struct module_qstate *q) |
Worker service routine to send serviced queries to authoritative servers. | |
void | worker_alloc_cleanup (void *arg) |
cleanup the cache to remove all rrset IDs from it, arg is worker | |
int | libworker_send_packet (ldns_buffer *pkt, struct sockaddr_storage *addr, socklen_t addrlen, int timeout, struct module_qstate *q, int use_tcp) |
Worker service routine to send udp messages for modules. | |
struct outbound_entry * | libworker_send_query (uint8_t *qname, size_t qnamelen, uint16_t qtype, uint16_t qclass, uint16_t flags, int dnssec, struct sockaddr_storage *addr, socklen_t addrlen, struct module_qstate *q) |
Worker service routine to send serviced queries to authoritative servers. | |
int | libworker_handle_reply (struct comm_point *c, void *arg, int error, struct comm_reply *reply_info) |
process incoming replies from the network | |
int | libworker_handle_service_reply (struct comm_point *c, void *arg, int error, struct comm_reply *reply_info) |
process incoming serviced query replies from the network | |
void | libworker_handle_control_cmd (struct tube *tube, uint8_t *buffer, size_t len, int error, void *arg) |
handle control command coming into server | |
void | libworker_fg_done_cb (void *arg, int rcode, ldns_buffer *buf, enum sec_status s) |
mesh callback with fg results | |
void | libworker_bg_done_cb (void *arg, int rcode, ldns_buffer *buf, enum sec_status s) |
mesh callback with bg results | |
int | context_query_cmp (const void *a, const void *b) |
compare two ctx_query elements | |
void | worker_stat_timer_cb (void *arg) |
statistics timer callback handler | |
int | order_lock_cmp (const void *e1, const void *e2) |
Due to module breakage by fptr wlist, these test app declarations are presented here. | |
int | codeline_cmp (const void *a, const void *b) |
compare two codeline structs for rbtree from memstats test app |
void worker_handle_control_cmd | ( | struct tube * | tube, | |
uint8_t * | msg, | |||
size_t | len, | |||
int | error, | |||
void * | arg | |||
) |
process control messages from the main thread.
Frees the control command message.
tube,: | tube control message came on. | |
msg,: | message contents. Is freed. | |
len,: | length of message. | |
error,: | if error (NETEVENT_*) happened. | |
arg,: | user argument |
References worker::base, worker::cmd, comm_base_exit(), daemon_remote_exec(), fatal_exit(), log_assert, log_err(), log_info(), NETEVENT_CLOSED, NETEVENT_NOERROR, server_stats_reply(), VERB_ALGO, verbose(), worker_cmd_quit, worker_cmd_remote, worker_cmd_stats, and worker_cmd_stats_noreset.
void worker_sighandler | ( | int | sig, | |
void * | arg | |||
) |
Worker signal handler function.
User argument is the worker itself.
References worker::base, comm_base_exit(), log_assert, log_err(), worker::need_to_exit, VERB_QUERY, and verbose().
int worker_send_packet | ( | ldns_buffer * | pkt, | |
struct sockaddr_storage * | addr, | |||
socklen_t | addrlen, | |||
int | timeout, | |||
struct module_qstate * | q, | |||
int | use_tcp | |||
) |
Worker service routine to send udp messages for modules.
pkt,: | packet to send. | |
addr,: | where to. | |
addrlen,: | length of addr. | |
timeout,: | seconds to wait until timeout. | |
q,: | wich query state to reactivate upon return. | |
use_tcp,: | true to use TCP, false for UDP. |
References worker::back, module_qstate::env, log_assert, pending_tcp_query(), pending_udp_query(), module_env::worker, and worker_handle_reply().
struct outbound_entry* worker_send_query | ( | uint8_t * | qname, | |
size_t | qnamelen, | |||
uint16_t | qtype, | |||
uint16_t | qclass, | |||
uint16_t | flags, | |||
int | dnssec, | |||
struct sockaddr_storage * | addr, | |||
socklen_t | addrlen, | |||
struct module_qstate * | q | |||
) | [read] |
Worker service routine to send serviced queries to authoritative servers.
qname,: | query name. (host order) | |
qnamelen,: | length in bytes of qname, including trailing 0. | |
qtype,: | query type. (host order) | |
qclass,: | query class. (host order) | |
flags,: | host order flags word, with opcode and CD bit. | |
dnssec,: | if set, EDNS record will have DO bit set. | |
addr,: | where to. | |
addrlen,: | length of addr. | |
q,: | wich query state to reactivate upon return. |
References worker::back, module_qstate::env, log_assert, outbound_entry_compare(), outnet_serviced_query(), outbound_entry::qsent, outbound_entry::qstate, module_qstate::region, regional_alloc(), outside_network::udp_buff, module_env::worker, and worker_handle_service_reply().
int libworker_send_packet | ( | ldns_buffer * | pkt, | |
struct sockaddr_storage * | addr, | |||
socklen_t | addrlen, | |||
int | timeout, | |||
struct module_qstate * | q, | |||
int | use_tcp | |||
) |
Worker service routine to send udp messages for modules.
pkt,: | packet to send. | |
addr,: | where to. | |
addrlen,: | length of addr. | |
timeout,: | seconds to wait until timeout. | |
q,: | wich query state to reactivate upon return. | |
use_tcp,: | true to use TCP, false for UDP. |
References log_assert.
struct outbound_entry* libworker_send_query | ( | uint8_t * | qname, | |
size_t | qnamelen, | |||
uint16_t | qtype, | |||
uint16_t | qclass, | |||
uint16_t | flags, | |||
int | dnssec, | |||
struct sockaddr_storage * | addr, | |||
socklen_t | addrlen, | |||
struct module_qstate * | q | |||
) | [read] |
Worker service routine to send serviced queries to authoritative servers.
qname,: | query name. (host order) | |
qnamelen,: | length in bytes of qname, including trailing 0. | |
qtype,: | query type. (host order) | |
qclass,: | query class. (host order) | |
flags,: | host order flags word, with opcode and CD bit. | |
dnssec,: | if set, EDNS record will have DO bit set. | |
addr,: | where to. | |
addrlen,: | length of addr. | |
q,: | wich query state to reactivate upon return. |
References log_assert.
int order_lock_cmp | ( | const void * | e1, | |
const void * | e2 | |||
) |
Due to module breakage by fptr wlist, these test app declarations are presented here.
compare two order_ids from lock-verify test app
References order_id::instance, log_assert, and order_id::thr.
int codeline_cmp | ( | const void * | a, | |
const void * | b | |||
) |
compare two codeline structs for rbtree from memstats test app
References log_assert.