*/
void
-dns_message_logpacket(dns_message_t *message, const char *description,
- const isc_sockaddr_t *address, isc_logcategory_t category,
- isc_logmodule_t module, int level, isc_mem_t *mctx);
+dns_message_logpacketfrom(dns_message_t *message, const char *description,
+ const isc_sockaddr_t *address,
+ isc_logcategory_t category, isc_logmodule_t module,
+ int level, isc_mem_t *mctx);
void
dns_message_logpacketfromto(dns_message_t *message, const char *description,
* Log the provided DNS 'message' using the specified logging parameters,
* prepending it with the given 'description'.
*
- * For dns_message_logpacket(), only the address of the sending socket must be
- * provided (in the 'address' parameter).
+ * For dns_message_logpacketfrom(), only the address of the sending socket must
+ * be provided (in the 'address' parameter).
*
* For dns_message_logpacketfromto(), the addresses of both the sending socket
* ('from') and the receiving socket ('to') must be provided.
* Requires:
* \li 'message' be a valid DNS message.
* \li 'description' to be non-NULL.
- * \li 'address' to be non-NULL (dns_message_logpacket() only).
+ * \li 'address' to be non-NULL (dns_message_logpacketfrom() only).
* \li 'from' and 'to' be non-NULL (dns_message_logpacketfromto() only).
* \li 'category' to be a valid logging category.
* \li 'module' to be a valid logging module.
}
void
-dns_message_logpacket(dns_message_t *message, const char *description,
- const isc_sockaddr_t *address, isc_logcategory_t category,
- isc_logmodule_t module, int level, isc_mem_t *mctx) {
+dns_message_logpacketfrom(dns_message_t *message, const char *description,
+ const isc_sockaddr_t *address,
+ isc_logcategory_t category, isc_logmodule_t module,
+ int level, isc_mem_t *mctx) {
REQUIRE(address != NULL);
logfmtpacket(message, description, address, NULL, category, module,
query->rmessage->rcode == dns_rcode_yxdomain) &&
bad_edns(fctx, &query->addrinfo->sockaddr))
{
- dns_message_logpacket(
+ dns_message_logpacketfrom(
query->rmessage, "received packet (bad edns) from",
&query->addrinfo->sockaddr, DNS_LOGCATEGORY_RESOLVER,
DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), fctx->mctx);
* this should be safe to do for any rcode we limit it
* to NOERROR and NXDOMAIN.
*/
- dns_message_logpacket(
+ dns_message_logpacketfrom(
query->rmessage, "received packet (no opt) from",
&query->addrinfo->sockaddr, DNS_LOGCATEGORY_RESOLVER,
DNS_LOGMODULE_RESOLVER, ISC_LOG_DEBUG(3), fctx->mctx);
result = dns_message_parse(msg, &buffer,
DNS_MESSAGEPARSE_PRESERVEORDER);
if (result == ISC_R_SUCCESS) {
- dns_message_logpacket(
+ dns_message_logpacketfrom(
msg, "received message from", &xfr->primaryaddr,
DNS_LOGCATEGORY_XFER_IN, DNS_LOGMODULE_XFER_IN,
ISC_LOG_DEBUG(10), xfr->mctx);