Electroneum
worker.h File Reference
Include dependency graph for worker.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

struct outbound_entrylibworker_send_query (struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int ssl_upstream, char *tls_auth_name, struct module_qstate *q)
 
int libworker_handle_reply (struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
 
int libworker_handle_service_reply (struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
 
void libworker_handle_control_cmd (struct tube *tube, uint8_t *msg, size_t len, int err, void *arg)
 
void libworker_fg_done_cb (void *arg, int rcode, sldns_buffer *buf, enum sec_status s, char *why_bogus)
 
void libworker_bg_done_cb (void *arg, int rcode, sldns_buffer *buf, enum sec_status s, char *why_bogus)
 
void libworker_event_done_cb (void *arg, int rcode, struct sldns_buffer *buf, enum sec_status s, char *why_bogus)
 
void worker_sighandler (int sig, void *arg)
 
struct outbound_entryworker_send_query (struct query_info *qinfo, uint16_t flags, int dnssec, int want_dnssec, int nocaps, struct sockaddr_storage *addr, socklen_t addrlen, uint8_t *zone, size_t zonelen, int ssl_upstream, char *tls_auth_name, struct module_qstate *q)
 
void worker_handle_control_cmd (struct tube *tube, uint8_t *msg, size_t len, int error, void *arg)
 
int worker_handle_request (struct comm_point *c, void *arg, int error, struct comm_reply *repinfo)
 
int worker_handle_reply (struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
 
int worker_handle_service_reply (struct comm_point *c, void *arg, int error, struct comm_reply *reply_info)
 
void worker_alloc_cleanup (void *arg)
 
void worker_stat_timer_cb (void *arg)
 
void worker_probe_timer_cb (void *arg)
 
void worker_start_accept (void *arg)
 
void worker_stop_accept (void *arg)
 
int remote_accept_callback (struct comm_point *, void *, int, struct comm_reply *)
 
int remote_control_callback (struct comm_point *, void *, int, struct comm_reply *)
 
void remote_get_opt_ssl (char *line, void *arg)
 

Detailed Description

This file declares the methods any worker has to implement.

Definition in file worker.h.

Function Documentation

◆ libworker_bg_done_cb()

void libworker_bg_done_cb ( void *  arg,
int  rcode,
sldns_buffer buf,
enum sec_status  s,
char *  why_bogus 
)

mesh callback with bg results

◆ libworker_event_done_cb()

void libworker_event_done_cb ( void *  arg,
int  rcode,
struct sldns_buffer buf,
enum sec_status  s,
char *  why_bogus 
)

mesh callback with event results

◆ libworker_fg_done_cb()

void libworker_fg_done_cb ( void *  arg,
int  rcode,
sldns_buffer buf,
enum sec_status  s,
char *  why_bogus 
)

mesh callback with fg results

◆ libworker_handle_control_cmd()

void libworker_handle_control_cmd ( struct tube tube,
uint8_t msg,
size_t  len,
int  err,
void *  arg 
)

handle control command coming into server

◆ libworker_handle_reply()

int libworker_handle_reply ( struct comm_point c,
void *  arg,
int  error,
struct comm_reply reply_info 
)

process incoming replies from the network

◆ libworker_handle_service_reply()

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

◆ libworker_send_query()

struct outbound_entry* libworker_send_query ( struct query_info qinfo,
uint16_t  flags,
int  dnssec,
int  want_dnssec,
int  nocaps,
struct sockaddr_storage addr,
socklen_t  addrlen,
uint8_t zone,
size_t  zonelen,
int  ssl_upstream,
char *  tls_auth_name,
struct module_qstate q 
)

Worker service routine to send serviced queries to authoritative servers.

Parameters
qinfoquery info.
flagshost order flags word, with opcode and CD bit.
dnssecif set, EDNS record will have DO bit set.
want_dnssecsignatures needed.
nocapsignore capsforid(if in config), do not perturb qname.
addrwhere to.
addrlenlength of addr.
zonedelegation point name.
zonelenlength of zone name wireformat dname.
ssl_upstreamuse SSL for upstream queries.
tls_auth_nameif ssl_upstream, use this name with TLS authentication.
qwich query state to reactivate upon return.
Returns
: false on failure (memory or socket related). no query was sent.

◆ remote_accept_callback()

int remote_accept_callback ( struct comm_point ,
void *  ,
int  ,
struct comm_reply  
)

handle remote control accept callbacks

◆ remote_control_callback()

int remote_control_callback ( struct comm_point ,
void *  ,
int  ,
struct comm_reply  
)

handle remote control data callbacks

◆ remote_get_opt_ssl()

void remote_get_opt_ssl ( char *  line,
void *  arg 
)

routine to printout option values over SSL

◆ worker_alloc_cleanup()

void worker_alloc_cleanup ( void *  arg)

cleanup the cache to remove all rrset IDs from it, arg is worker

◆ worker_handle_control_cmd()

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.

Parameters
tubetube control message came on.
msgmessage contents. Is freed.
lenlength of message.
errorif error (NETEVENT_*) happened.
arguser argument

◆ worker_handle_reply()

int worker_handle_reply ( struct comm_point c,
void *  arg,
int  error,
struct comm_reply reply_info 
)

process incoming replies from the network

◆ worker_handle_request()

int worker_handle_request ( struct comm_point c,
void *  arg,
int  error,
struct comm_reply repinfo 
)

handles callbacks from listening event interface

◆ worker_handle_service_reply()

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

◆ worker_probe_timer_cb()

void worker_probe_timer_cb ( void *  arg)

probe timer callback handler

◆ worker_send_query()

struct outbound_entry* worker_send_query ( struct query_info qinfo,
uint16_t  flags,
int  dnssec,
int  want_dnssec,
int  nocaps,
struct sockaddr_storage addr,
socklen_t  addrlen,
uint8_t zone,
size_t  zonelen,
int  ssl_upstream,
char *  tls_auth_name,
struct module_qstate q 
)

Worker service routine to send serviced queries to authoritative servers.

Parameters
qinfoquery info.
flagshost order flags word, with opcode and CD bit.
dnssecif set, EDNS record will have DO bit set.
want_dnssecsignatures needed.
nocapsignore capsforid(if in config), do not perturb qname.
addrwhere to.
addrlenlength of addr.
zonewireformat dname of the zone.
zonelenlength of zone name.
ssl_upstreamuse SSL for upstream queries.
tls_auth_nameif ssl_upstream, use this name with TLS authentication.
qwich query state to reactivate upon return.
Returns
: false on failure (memory or socket related). no query was sent.

◆ worker_sighandler()

void worker_sighandler ( int  sig,
void *  arg 
)

Worker signal handler function. User argument is the worker itself.

Parameters
sigsignal number.
argthe worker (main worker) that handles signals.

◆ worker_start_accept()

void worker_start_accept ( void *  arg)

start accept callback handler

◆ worker_stat_timer_cb()

void worker_stat_timer_cb ( void *  arg)

statistics timer callback handler

◆ worker_stop_accept()

void worker_stop_accept ( void *  arg)

stop accept callback handler