pre_dns_handle_a
Name
pre_dns_handle_a
Synopsis
#include "hooks/core/pre_dns_handle_a.h"
| int **pre_dns_handle_a** ( | closure, | |
| | mxinfo, | |
| | status, | |
| | abuf, | |
| | alen, | |
| | qdomain); | |
void * <var class="pdparam">closure</var>;
mx_info_closure * <var class="pdparam">mxinfo</var>;
int <var class="pdparam">status</var>;
unsigned char * <var class="pdparam">abuf</var>;
int <var class="pdparam">alen</var>;
const char * <var class="pdparam">qdomain</var>;
| int **has_core_pre_dns_handle_a_hook** ( | ); | |
| void **register_core_pre_dns_handle_a_hook_first** ( | hook, | |
| | closure); | |
ec_hook_core_pre_dns_handle_a_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;
| void **register_core_pre_dns_handle_a_hook_last** ( | hook, | |
| | closure); | |
ec_hook_core_pre_dns_handle_a_func_t <var class="pdparam">hook</var>;
void *<var class="pdparam">closure</var>;
| int **call_core_pre_dns_handle_a_hook** ( | mxinfo, | |
| | status, | |
| | abuf, | |
| | alen, | |
| | qdomain); | |
mx_info_closure * <var class="pdparam">mxinfo</var>;
int <var class="pdparam">status</var>;
unsigned char * <var class="pdparam">abuf</var>;
int <var class="pdparam">alen</var>;
const char * <var class="pdparam">qdomain</var>;
Description
The dns_handle_a is called when DNS query for A record is returned. The pre_dns_handle_a hook is called before the query result is handled. If a hook function returns 0, the remaining hook functions will be called. If all hook functions return 0, the processing of query result will continue. If 1 or 2 is returned from a hook function, the remaining hook functions and the processing of query result within dns_handle_a will be skipped. If 2 is returned by a hook function, that hook function should free mx_info_closure structure. A hook function should not return any value other than 0, 1 and 2.