blob: bde1411936a4004734bb5a9ada8b9fcb0bd62e36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* ISC license */
#include <skalibs/genwrite.h>
#include <s6-dns/s6dns-analyze.h>
#include <s6-dns/s6dns-debug.h>
int s6dns_debug_dumpdt_post_recv (s6dns_engine_t const *dt, void *data)
{
genwrite *gp = data ;
(void)dt ;
if ((*gp->put)(gp->target, "Received a packet:\n", 19) < 19) return 0 ;
if (!s6dns_analyze_packet(gp, dt->sa.s + dt->querylen, dt->sa.len - dt->querylen, 1)) return 0 ;
if ((*gp->put)(gp->target, "\n", 1) < 1) return 0 ;
return (*gp->flush)(gp->target) ;
}
|