blob: b9fec8e635ad299e382a334edfa563af494d8009 [file] [log] [blame]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001/*
2 * Copyright (c) 1998-2006 The TCPDUMP project
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that: (1) source code
6 * distributions retain the above copyright notice and this paragraph
7 * in its entirety, and (2) distributions including binary code include
8 * the above copyright notice and this paragraph in its entirety in
9 * the documentation or other materials provided with the distribution.
10 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
11 * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
12 * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
13 * FOR A PARTICULAR PURPOSE.
14 *
Elliott Hughescec480a2017-12-19 16:54:57 -080015 * Original code by Hannes Gredler (hannes@gredler.at)
The Android Open Source Project2949f582009-03-03 19:30:46 -080016 */
17
JP Abgrall53f17a92014-02-12 14:02:41 -080018extern const struct tok af_values[];
19extern const struct tok bsd_af_values[];
The Android Open Source Project2949f582009-03-03 19:30:46 -080020
21/* RFC1700 address family numbers */
22#define AFNUM_INET 1
23#define AFNUM_INET6 2
24#define AFNUM_NSAP 3
25#define AFNUM_HDLC 4
26#define AFNUM_BBN1822 5
27#define AFNUM_802 6
28#define AFNUM_E163 7
29#define AFNUM_E164 8
30#define AFNUM_F69 9
31#define AFNUM_X121 10
32#define AFNUM_IPX 11
33#define AFNUM_ATALK 12
34#define AFNUM_DECNET 13
35#define AFNUM_BANYAN 14
36#define AFNUM_E164NSAP 15
37#define AFNUM_VPLS 25
38/* draft-kompella-ppvpn-l2vpn */
39#define AFNUM_L2VPN 196 /* still to be approved by IANA */
40
41/*
42 * BSD AF_ values.
43 *
44 * Unfortunately, the BSDs don't all use the same value for AF_INET6,
45 * so, because we want to be able to read captures from all of the BSDs,
46 * we check for all of them.
47 */
48#define BSD_AFNUM_INET 2
49#define BSD_AFNUM_NS 6 /* XEROX NS protocols */
50#define BSD_AFNUM_ISO 7
51#define BSD_AFNUM_APPLETALK 16
52#define BSD_AFNUM_IPX 23
Elliott Hughese2e3bd12017-05-15 10:59:29 -070053#define BSD_AFNUM_INET6_BSD 24 /* NetBSD, OpenBSD, BSD/OS, Npcap */
54#define BSD_AFNUM_INET6_FREEBSD 28 /* FreeBSD */
Elliott Hughes820eced2021-08-20 18:00:50 -070055#define BSD_AFNUM_INET6_DARWIN 30 /* macOS, iOS, other Darwin-based OSes */