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