#include <dns/name.h>
#include <dns/result.h>
+#include <protobuf-c/protobuf-c.h>
+#include "lib/dns/dnstap.pb-c.h"
+
isc_mem_t *mctx = NULL;
bool memrecord = false;
bool printmessage = false;
DBLATEX
PDFLATEX
LATEX
-DNSTAP_PB_C_H
DNSTAPTARGETS
DNSTAPOBJS
DNSTAPSRCS
DNSTAPSRCS=
DNSTAPOBJS=
DNSTAPTARGETS=
-DNSTAP_PB_C_H=
if test "x$use_dnstap" != "xno"; then
# Check whether --with-protobuf-c was given.
DNSTAPSRCS='${DNSTAPSRCS}'
DNSTAPOBJS='${DNSTAPOBJS}'
DNSTAPTARGETS='${DNSTAPTARGETS}'
- DNSTAP_PB_C_H="dnstap.pb-c.h"
fi
-
#
# The following sets up how non-blocking i/o is established.
# cygwin and solaris 2.x (x<5) require special handling.
DNSTAPSRCS=
DNSTAPOBJS=
DNSTAPTARGETS=
-DNSTAP_PB_C_H=
if test "x$use_dnstap" != "xno"; then
AC_ARG_WITH([protobuf-c],
AS_HELP_STRING([--with-protobuf-c=path],
DNSTAPSRCS='${DNSTAPSRCS}'
DNSTAPOBJS='${DNSTAPOBJS}'
DNSTAPTARGETS='${DNSTAPTARGETS}'
- DNSTAP_PB_C_H="dnstap.pb-c.h"
fi
AC_SUBST(DNSTAP)
AC_SUBST(DNSTAPSRCS)
AC_SUBST(DNSTAPOBJS)
AC_SUBST(DNSTAPTARGETS)
-AC_SUBST(DNSTAP_PB_C_H)
#
# The following sets up how non-blocking i/o is established.
rm -f libdns.@A@ timestamp
rm -f gen code.h include/dns/enumtype.h include/dns/enumclass.h
rm -f include/dns/rdatastruct.h
- rm -f dnstap.pb-c.c dnstap.pb-c.h include/dns/dnstap.pb-c.h
+ rm -f dnstap.pb-c.c dnstap.pb-c.h
newrr::
rm -f code.h include/dns/enumtype.h include/dns/enumclass.h
# dnstap
dnstap.@O@: dnstap.c dnstap.pb-c.c
-dnstap.pb-c.c dnstap.pb-c.h include/dns/dnstap.pb-c.h: dnstap.proto
+dnstap.pb-c.c dnstap.pb-c.h: dnstap.proto
$(PROTOC_C) --c_out=. --proto_path ${srcdir} dnstap.proto
- cp -f dnstap.pb-c.h include/dns
dnstap.pb-c.@O@: dnstap.pb-c.c
#include <dns/types.h>
#include <dns/view.h>
-#include <dns/dnstap.pb-c.h>
#include <protobuf-c/protobuf-c.h>
+#include "dnstap.pb-c.h"
#define DTENV_MAGIC ISC_MAGIC('D', 't', 'n', 'v')
#define VALID_DTENV(env) ISC_MAGIC_VALID(env, DTENV_MAGIC)
isc_result_t
dns_dt_parse(isc_mem_t *mctx, isc_region_t *src, dns_dtdata_t **destp) {
isc_result_t result;
+ Dnstap__Dnstap *frame;
Dnstap__Message *m;
dns_dtdata_t *d = NULL;
isc_buffer_t b;
if (d->frame == NULL)
CHECK(ISC_R_NOMEMORY);
- if (d->frame->type != DNSTAP__DNSTAP__TYPE__MESSAGE)
+ frame = (Dnstap__Dnstap *)d->frame;
+
+ if (frame->type != DNSTAP__DNSTAP__TYPE__MESSAGE)
CHECK(DNS_R_BADDNSTAP);
- m = d->frame->message;
+ m = frame->message;
/* Message type */
switch (m->type) {
update.h validator.h version.h view.h xfrin.h \
zone.h zonekey.h zoneverify.h zt.h
-GENHEADERS = @DNSTAP_PB_C_H@ enumclass.h enumtype.h rdatastruct.h
+GENHEADERS = enumclass.h enumtype.h rdatastruct.h
SUBDIRS =
TARGETS =
#ifdef HAVE_DNSTAP
#include <fstrm.h>
#include <protobuf-c/protobuf-c.h>
-#include <dns/dnstap.pb-c.h>
#else
struct fstrm_iothr_options;
#endif /* HAVE_DNSTAP */
struct dns_dtdata {
isc_mem_t *mctx;
- Dnstap__Dnstap *frame;
+ void *frame;
bool query;
bool tcp;
#include "dnstest.h"
#ifdef HAVE_DNSTAP
-#include <dns/dnstap.pb-c.h>
+
#include <protobuf-c/protobuf-c.h>
#define TAPFILE "testdata/dnstap/dnstap.file"