summaryrefslogtreecommitdiffstats
path: root/print-raw.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-01-06 19:03:11 +0000
committerdelphij <delphij@FreeBSD.org>2015-01-06 19:03:11 +0000
commit08263d19579d35a7a65e0c8bcb768504ce76d04e (patch)
treeb0af675e15d65cc0adac2367c37233a794389c9a /print-raw.c
parent89918529102669b0d24d8aac9e5516b010b1c81c (diff)
downloadFreeBSD-src-08263d19579d35a7a65e0c8bcb768504ce76d04e.zip
FreeBSD-src-08263d19579d35a7a65e0c8bcb768504ce76d04e.tar.gz
Vendor import of tcpdump 4.6.2.
Diffstat (limited to 'print-raw.c')
-rw-r--r--print-raw.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/print-raw.c b/print-raw.c
index 8e376ce5..d20387c 100644
--- a/print-raw.c
+++ b/print-raw.c
@@ -19,22 +19,13 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#ifndef lint
-static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.41 2003-11-16 09:36:34 guy Exp $ (LBL)";
-#endif
-
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <tcpdump-stdinc.h>
-#include <pcap.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "addrtoname.h"
#include "interface.h"
/*
@@ -42,12 +33,12 @@ static const char rcsid[] _U_ =
*/
u_int
-raw_if_print(const struct pcap_pkthdr *h, const u_char *p)
+raw_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
{
- if (eflag)
- printf("ip: ");
+ if (ndo->ndo_eflag)
+ ND_PRINT((ndo, "ip: "));
- ipN_print(p, h->len);
+ ipN_print(ndo, p, h->len);
return (0);
}
OpenPOWER on IntegriCloud