|
Electroneum
|
#include "util/module.h"
Go to the source code of this file.
Functions | |
| int | storeQueryInCache (struct module_qstate *qstate, struct query_info *qinfo, struct reply_info *msgrep, int is_referral) |
| void | invalidateQueryInCache (struct module_qstate *qstate, struct query_info *qinfo) |
| int | createResponse (struct module_qstate *qstate, sldns_buffer *pkt) |
| void | reply_addr2str (struct comm_reply *reply, char *dest, int maxlen) |
| void | delegpt_addr_addr2str (struct delegpt_addr *target, char *dest, int maxlen) |
Utility functions for the python module that perform stores and loads and conversions.
Definition in file pythonmod_utils.h.
| int createResponse | ( | struct module_qstate * | qstate, |
| sldns_buffer * | pkt | ||
| ) |
Create response according to the ldns packet content
This function fills qstate.return_msg up with data of a given packet
| qstate | module environment |
| pkt | a sldns_buffer which contains sldns_packet data |
| void delegpt_addr_addr2str | ( | struct delegpt_addr * | target, |
| char * | dest, | ||
| int | maxlen | ||
| ) |
| void invalidateQueryInCache | ( | struct module_qstate * | qstate, |
| struct query_info * | qinfo | ||
| ) |
Invalidate the message associated with query_info stored in message cache.
This function invalidates the record in message cache associated with the given query only if such a record exists.
| qstate | module environment |
| qinfo | query info, the query for which answer is stored. |
| void reply_addr2str | ( | struct comm_reply * | reply, |
| char * | dest, | ||
| int | maxlen | ||
| ) |
Convert reply->addr to string
| reply | comm reply with address in it. |
| dest | destination string. |
| maxlen | length of string buffer. |
| int storeQueryInCache | ( | struct module_qstate * | qstate, |
| struct query_info * | qinfo, | ||
| struct reply_info * | msgrep, | ||
| int | is_referral | ||
| ) |
Store the reply_info and query_info pair in message cache (qstate->msg_cache)
| qstate | module environment |
| qinfo | query info, the query for which answer is stored. |
| msgrep | reply in dns_msg |
| is_referral | If true, then the given message to be stored is a referral. The cache implementation may use this as a hint. It will store only the RRsets, not the message. |