af.c revision 1.2 1 1.1 christos /*
2 1.1 christos * Copyright (c) 1998-2006 The TCPDUMP project
3 1.1 christos *
4 1.1 christos * Redistribution and use in source and binary forms, with or without
5 1.1 christos * modification, are permitted provided that: (1) source code
6 1.1 christos * distributions retain the above copyright notice and this paragraph
7 1.1 christos * in its entirety, and (2) distributions including binary code include
8 1.1 christos * the above copyright notice and this paragraph in its entirety in
9 1.1 christos * the documentation or other materials provided with the distribution.
10 1.1 christos * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
11 1.1 christos * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
12 1.1 christos * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
13 1.1 christos * FOR A PARTICULAR PURPOSE.
14 1.1 christos *
15 1.1 christos * Original code by Hannes Gredler (hannes (at) juniper.net)
16 1.1 christos */
17 1.1 christos
18 1.2 christos #include <sys/cdefs.h>
19 1.1 christos #ifndef lint
20 1.2 christos #if 0
21 1.1 christos static const char rcsid[] _U_ =
22 1.1 christos "@(#) Header: /tcpdump/master/tcpdump/af.c,v 1.3 2006-03-23 14:58:44 hannes Exp (LBL)";
23 1.2 christos #else
24 1.2 christos __RCSID("$NetBSD: af.c,v 1.2 2010/12/05 05:11:30 christos Exp $");
25 1.2 christos #endif
26 1.1 christos #endif
27 1.1 christos
28 1.1 christos #ifdef HAVE_CONFIG_H
29 1.1 christos #include "config.h"
30 1.1 christos #endif
31 1.1 christos
32 1.1 christos #include <tcpdump-stdinc.h>
33 1.1 christos #include "interface.h"
34 1.1 christos #include "af.h"
35 1.1 christos
36 1.1 christos const struct tok af_values[] = {
37 1.1 christos { 0, "Reserved"},
38 1.1 christos { AFNUM_INET, "IPv4"},
39 1.1 christos { AFNUM_INET6, "IPv6"},
40 1.1 christos { AFNUM_NSAP, "NSAP"},
41 1.1 christos { AFNUM_HDLC, "HDLC"},
42 1.1 christos { AFNUM_BBN1822, "BBN 1822"},
43 1.1 christos { AFNUM_802, "802"},
44 1.1 christos { AFNUM_E163, "E.163"},
45 1.1 christos { AFNUM_E164, "E.164"},
46 1.1 christos { AFNUM_F69, "F.69"},
47 1.1 christos { AFNUM_X121, "X.121"},
48 1.1 christos { AFNUM_IPX, "Novell IPX"},
49 1.1 christos { AFNUM_ATALK, "Appletalk"},
50 1.1 christos { AFNUM_DECNET, "Decnet IV"},
51 1.1 christos { AFNUM_BANYAN, "Banyan Vines"},
52 1.1 christos { AFNUM_E164NSAP, "E.164 with NSAP subaddress"},
53 1.1 christos { AFNUM_L2VPN, "Layer-2 VPN"},
54 1.1 christos { AFNUM_VPLS, "VPLS"},
55 1.1 christos { 0, NULL},
56 1.1 christos };
57 1.1 christos
58 1.1 christos const struct tok bsd_af_values[] = {
59 1.1 christos { BSD_AFNUM_INET, "IPv4" },
60 1.1 christos { BSD_AFNUM_NS, "NS" },
61 1.1 christos { BSD_AFNUM_ISO, "ISO" },
62 1.1 christos { BSD_AFNUM_APPLETALK, "Appletalk" },
63 1.1 christos { BSD_AFNUM_IPX, "IPX" },
64 1.1 christos { BSD_AFNUM_INET6_BSD, "IPv6" },
65 1.1 christos { BSD_AFNUM_INET6_FREEBSD, "IPv6" },
66 1.1 christos { BSD_AFNUM_INET6_DARWIN, "IPv6" },
67 1.1 christos { 0, NULL}
68 1.1 christos };
69