]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pflog.c
don't pass on src & dst MAC adresses to the isoclns decoder as MAC adresses
[tcpdump] / print-pflog.c
index e1c8af98bee29b5b25b3696746f24b6508070313..d0ac305c4eb810fce42e8a1350f738b0ab6c0b8b 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.3 2002-08-01 08:53:23 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.7 2002-12-19 09:39:14 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -96,30 +96,19 @@ pflog_print(const struct pfloghdr *hdr)
            hdr->ifname);
 }
 
-void
-pflog_if_print(u_char *user, const struct pcap_pkthdr *h,
-     register const u_char *p)
+u_int
+pflog_if_print(const struct pcap_pkthdr *h, register const u_char *p)
 {
        u_int length = h->len;
        u_int caplen = h->caplen;
        const struct pfloghdr *hdr;
        u_int8_t af;
 
-       ts_print(&h->ts);
-
        if (caplen < PFLOG_HDRLEN) {
                printf("[|pflog]");
-               goto out;
+               return (caplen);
        }
 
-       /*
-        * Some printers want to get back at the link level addresses,
-        * and/or check that they're not walking off the end of the packet.
-        * Rather than pass them all the way down, we set these globals.
-        */
-       packetp = p;
-       snapend = p + caplen;
-
        hdr = (const struct pfloghdr *)p;
        if (eflag)
                pflog_print(hdr);
@@ -147,11 +136,5 @@ pflog_if_print(u_char *user, const struct pcap_pkthdr *h,
                        default_print(p, caplen);
        }
 
-       if (xflag)
-               default_print(p, caplen);
-out:
-       putchar('\n');
-       --infodelay;
-       if (infoprint)
-               info(0);
+       return (PFLOG_HDRLEN);
 }