X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/fe3253b9b8fad9e75f863157eba0780418182f17..d6dc7b3ae163fa1e14b47dd23b01bd5006748b87:/print-raw.c diff --git a/print-raw.c b/print-raw.c index 85e8914c..8d27a06a 100644 --- a/print-raw.c +++ b/print-raw.c @@ -19,30 +19,28 @@ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +/* \summary: Raw IP printer */ + #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include - -#include -#include -#include +#include "netdissect-stdinc.h" -#include "addrtoname.h" -#include "interface.h" +#include "netdissect.h" /* * The DLT_RAW packet has no header. It contains a raw IP packet. */ 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: "); + ndo->ndo_protocol = "raw_if"; + if (ndo->ndo_eflag) + ND_PRINT("ip: "); - ipN_print(p, h->len); + ipN_print(ndo, p, h->len); return (0); }