tor
master
|
Header file for dnsserv.c. More...
Go to the source code of this file.
Functions | |
void | dnsserv_configure_listener (connection_t *conn) |
void | dnsserv_close_listener (connection_t *conn) |
void | dnsserv_resolved (entry_connection_t *conn, int answer_type, size_t answer_len, const char *answer, int ttl) |
void | dnsserv_reject_request (entry_connection_t *conn) |
int | dnsserv_launch_request (const char *name, int is_reverse, control_connection_t *control_conn) |
Header file for dnsserv.c.
void dnsserv_close_listener | ( | connection_t * | conn | ) |
Free the evdns server port for conn, which must be an AP_DNS_LISTENER.
void dnsserv_configure_listener | ( | connection_t * | conn | ) |
Set up the evdns server port for the UDP socket on conn, which must be an AP_DNS_LISTENER
int dnsserv_launch_request | ( | const char * | name, |
int | reverse, | ||
control_connection_t * | control_conn | ||
) |
Helper function: called whenever the client sends a resolve request to our controller. We need to eventually answer the request req. Returns 0 if the controller will be getting (or has gotten) an event in response; -1 if we couldn't launch the request.
void dnsserv_reject_request | ( | entry_connection_t * | conn | ) |
If there is a pending request on conn that's waiting for an answer, send back an error and free the request.
void dnsserv_resolved | ( | entry_connection_t * | conn, |
int | answer_type, | ||
size_t | answer_len, | ||
const char * | answer, | ||
int | ttl | ||
) |
Tell the dns request waiting for an answer on conn that we have an answer of type answer_type (RESOLVE_TYPE_IPV4/IPV6/ERR), of length answer_len, in answer, with TTL ttl. Doesn't do any caching; that's handled elsewhere.