139297Sfenner/* 239297Sfenner * Copyright (c) 1996 339297Sfenner * The Regents of the University of California. All rights reserved. 439297Sfenner * 539297Sfenner * Redistribution and use in source and binary forms, with or without 639297Sfenner * modification, are permitted provided that: (1) source code distributions 739297Sfenner * retain the above copyright notice and this paragraph in its entirety, (2) 839297Sfenner * distributions including binary code include the above copyright notice and 939297Sfenner * this paragraph in its entirety in the documentation or other materials 1039297Sfenner * provided with the distribution, and (3) all advertising materials mentioning 1139297Sfenner * features or use of this software display the following acknowledgement: 1239297Sfenner * ``This product includes software developed by the University of California, 1339297Sfenner * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of 1439297Sfenner * the University nor the names of its contributors may be used to endorse 1539297Sfenner * or promote products derived from this software without specific prior 1639297Sfenner * written permission. 1739297Sfenner * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 1839297Sfenner * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 1939297Sfenner * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 2039297Sfenner */ 2139297Sfenner 2239297Sfenner#ifndef lint 23127668Sbmsstatic const char rcsid[] _U_ = 24190207Srpaulo "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.41 2003-11-16 09:36:34 guy Exp $ (LBL)"; 2539297Sfenner#endif 2639297Sfenner 2756893Sfenner#ifdef HAVE_CONFIG_H 2856893Sfenner#include "config.h" 2956893Sfenner#endif 3056893Sfenner 31127668Sbms#include <tcpdump-stdinc.h> 3239297Sfenner 3339297Sfenner#include <pcap.h> 3439297Sfenner#include <stdio.h> 3539297Sfenner#include <string.h> 3639297Sfenner 3739297Sfenner#include "addrtoname.h" 3839297Sfenner#include "interface.h" 3939297Sfenner 4039297Sfenner/* 4139297Sfenner * The DLT_RAW packet has no header. It contains a raw IP packet. 4239297Sfenner */ 4339297Sfenner 44127668Sbmsu_int 45127668Sbmsraw_if_print(const struct pcap_pkthdr *h, const u_char *p) 4639297Sfenner{ 4739297Sfenner if (eflag) 4839297Sfenner printf("ip: "); 4939297Sfenner 50127668Sbms ipN_print(p, h->len); 5139297Sfenner 52127668Sbms return (0); 5339297Sfenner} 54