xref: /netbsd-src/external/bsd/tcpdump/dist/print-unsupported.c (revision c41df9f6167ea7cd2f761f0a97783c8267cb8847)
1*d881c474Schristos /*
2*d881c474Schristos  * Copyright (c) 2020 The TCPDUMP project
3*d881c474Schristos  * All rights reserved.
4*d881c474Schristos  *
5*d881c474Schristos  * Redistribution and use in source and binary forms, with or without
6*d881c474Schristos  * modification, are permitted provided that: (1) source code
7*d881c474Schristos  * distributions retain the above copyright notice and this paragraph
8*d881c474Schristos  * in its entirety, and (2) distributions including binary code include
9*d881c474Schristos  * the above copyright notice and this paragraph in its entirety in
10*d881c474Schristos  * the documentation or other materials provided with the distribution.
11*d881c474Schristos  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
12*d881c474Schristos  * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
13*d881c474Schristos  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14*d881c474Schristos  * FOR A PARTICULAR PURPOSE.
15*d881c474Schristos  */
16*d881c474Schristos 
17*d881c474Schristos /* \summary: unsupported link-layer protocols printer */
18*d881c474Schristos 
19*d881c474Schristos #include <config.h>
20*d881c474Schristos 
21*d881c474Schristos #include "netdissect-stdinc.h"
22*d881c474Schristos 
23*d881c474Schristos #include "netdissect.h"
24*d881c474Schristos 
25*d881c474Schristos void
26*d881c474Schristos unsupported_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
27*d881c474Schristos 		     const u_char *p)
28*d881c474Schristos {
29*d881c474Schristos 	ndo->ndo_protocol = "unsupported";
30*d881c474Schristos 	nd_print_protocol_caps(ndo);
31*d881c474Schristos 	hex_and_ascii_print(ndo, "\n\t", p, h->caplen);
32*d881c474Schristos }
33