141c99275SPeter Avalos /*
241c99275SPeter Avalos * Copyright (c) 1996
341c99275SPeter Avalos * The Regents of the University of California. All rights reserved.
441c99275SPeter Avalos *
541c99275SPeter Avalos * Redistribution and use in source and binary forms, with or without
641c99275SPeter Avalos * modification, are permitted provided that: (1) source code distributions
741c99275SPeter Avalos * retain the above copyright notice and this paragraph in its entirety, (2)
841c99275SPeter Avalos * distributions including binary code include the above copyright notice and
941c99275SPeter Avalos * this paragraph in its entirety in the documentation or other materials
1041c99275SPeter Avalos * provided with the distribution, and (3) all advertising materials mentioning
1141c99275SPeter Avalos * features or use of this software display the following acknowledgement:
1241c99275SPeter Avalos * ``This product includes software developed by the University of California,
1341c99275SPeter Avalos * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
1441c99275SPeter Avalos * the University nor the names of its contributors may be used to endorse
1541c99275SPeter Avalos * or promote products derived from this software without specific prior
1641c99275SPeter Avalos * written permission.
1741c99275SPeter Avalos * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
1841c99275SPeter Avalos * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
1941c99275SPeter Avalos * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
2041c99275SPeter Avalos */
2141c99275SPeter Avalos
22411677aeSAaron LI /* \summary: Raw IP printer */
2341c99275SPeter Avalos
2441c99275SPeter Avalos #ifdef HAVE_CONFIG_H
25*ed775ee7SAntonio Huete Jimenez #include <config.h>
2641c99275SPeter Avalos #endif
2741c99275SPeter Avalos
28*ed775ee7SAntonio Huete Jimenez #include "netdissect-stdinc.h"
2941c99275SPeter Avalos
30411677aeSAaron LI #include "netdissect.h"
3141c99275SPeter Avalos
3241c99275SPeter Avalos /*
3341c99275SPeter Avalos * The DLT_RAW packet has no header. It contains a raw IP packet.
3441c99275SPeter Avalos */
3541c99275SPeter Avalos
36*ed775ee7SAntonio Huete Jimenez void
raw_if_print(netdissect_options * ndo,const struct pcap_pkthdr * h,const u_char * p)37411677aeSAaron LI raw_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char *p)
3841c99275SPeter Avalos {
39*ed775ee7SAntonio Huete Jimenez ndo->ndo_protocol = "raw";
40*ed775ee7SAntonio Huete Jimenez ndo->ndo_ll_hdr_len += 0;
41411677aeSAaron LI if (ndo->ndo_eflag)
42*ed775ee7SAntonio Huete Jimenez ND_PRINT("ip: ");
4341c99275SPeter Avalos
44411677aeSAaron LI ipN_print(ndo, p, h->len);
4541c99275SPeter Avalos }
46