*/
#include "collectd.h"
+#include "plugin.h"
#include "common.h"
#if HAVE_NETINET_IN_SYSTM_H
memcpy(&us, buf + 2, 2);
us = ntohs(us);
- fprintf (stderr, "Bytes 0, 1: 0x%04hx\n", us);
qh.qr = (us >> 15) & 0x01;
qh.opcode = (us >> 11) & 0x0F;
qh.aa = (us >> 10) & 0x01;
while ((t = strchr(qh.qname, '\r')))
*t = ' ';
for (t = qh.qname; *t; t++)
- *t = tolower(*t);
+ *t = tolower((int) *t);
memcpy(&us, buf + offset, 2);
qh.qtype = ntohs(us);
{
int status;
- fprintf (stderr, "handle_pcap (udata = %p, hdr = %p, pkt = %p): hdr->caplen = %i\n",
+ DEBUG ("handle_pcap (udata = %p, hdr = %p, pkt = %p): hdr->caplen = %i\n",
(void *) udata, (void *) hdr, (void *) pkt,
hdr->caplen);
break;
default:
- fprintf (stderr, "unsupported data link type %d\n",
+ ERROR ("handle_pcap: unsupported data link type %d\n",
pcap_datalink(pcap_obj));
status = 0;
break;