/* \summary: OpenBSD packet filter log file printer */
#ifdef HAVE_CONFIG_H
-#include "config.h"
+#include <config.h>
#endif
#ifndef HAVE_NET_PFVAR_H
#include <net/pfvar.h>
#include <net/if_pflog.h>
-#include <netdissect-stdinc.h>
+#include "netdissect-stdinc.h"
#include "netdissect.h"
#include "extract.h"
-static const char tstr[] = "[|pflog]";
static const struct tok pf_reasons[] = {
{ 0, "0(match)" },
{
uint32_t rulenr, subrulenr;
+ ndo->ndo_protocol = "pflog";
rulenr = EXTRACT_BE_U_4(&hdr->rulenr);
subrulenr = EXTRACT_BE_U_4(&hdr->subrulenr);
if (subrulenr == (uint32_t)-1)
const struct pfloghdr *hdr;
uint8_t af;
+ ndo->ndo_protocol = "pflog_if";
/* check length */
if (caplen < sizeof(uint8_t)) {
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return (caplen);
}
hdrlen = BPF_WORDALIGN(hdr->length);
if (caplen < hdrlen) {
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return (hdrlen); /* XXX: true? */
}
return (hdrlen);
trunc:
- ND_PRINT("%s", tstr);
+ nd_print_trunc(ndo);
return (hdrlen);
}
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 8
- * End:
- */