Home | History | Annotate | Line # | Download | only in dist
af.c revision 1.5
      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.5  christos __RCSID("$NetBSD: af.c,v 1.5 2017/01/24 23:29:13 christos Exp $");
     21  1.1  christos #endif
     22  1.1  christos 
     23  1.1  christos #ifdef HAVE_CONFIG_H
     24  1.1  christos #include "config.h"
     25  1.1  christos #endif
     26  1.1  christos 
     27  1.5  christos #include <netdissect-stdinc.h>
     28  1.5  christos #include "netdissect.h"
     29  1.1  christos #include "af.h"
     30  1.1  christos 
     31  1.1  christos const struct tok af_values[] = {
     32  1.1  christos     { 0,                      "Reserved"},
     33  1.1  christos     { AFNUM_INET,             "IPv4"},
     34  1.1  christos     { AFNUM_INET6,            "IPv6"},
     35  1.1  christos     { AFNUM_NSAP,             "NSAP"},
     36  1.1  christos     { AFNUM_HDLC,             "HDLC"},
     37  1.1  christos     { AFNUM_BBN1822,          "BBN 1822"},
     38  1.1  christos     { AFNUM_802,              "802"},
     39  1.1  christos     { AFNUM_E163,             "E.163"},
     40  1.1  christos     { AFNUM_E164,             "E.164"},
     41  1.1  christos     { AFNUM_F69,              "F.69"},
     42  1.1  christos     { AFNUM_X121,             "X.121"},
     43  1.1  christos     { AFNUM_IPX,              "Novell IPX"},
     44  1.1  christos     { AFNUM_ATALK,            "Appletalk"},
     45  1.1  christos     { AFNUM_DECNET,           "Decnet IV"},
     46  1.1  christos     { AFNUM_BANYAN,           "Banyan Vines"},
     47  1.1  christos     { AFNUM_E164NSAP,         "E.164 with NSAP subaddress"},
     48  1.1  christos     { AFNUM_L2VPN,            "Layer-2 VPN"},
     49  1.1  christos     { AFNUM_VPLS,             "VPLS"},
     50  1.1  christos     { 0, NULL},
     51  1.1  christos };
     52  1.1  christos 
     53  1.1  christos const struct tok bsd_af_values[] = {
     54  1.1  christos     { BSD_AFNUM_INET, "IPv4" },
     55  1.1  christos     { BSD_AFNUM_NS, "NS" },
     56  1.1  christos     { BSD_AFNUM_ISO, "ISO" },
     57  1.1  christos     { BSD_AFNUM_APPLETALK, "Appletalk" },
     58  1.1  christos     { BSD_AFNUM_IPX, "IPX" },
     59  1.1  christos     { BSD_AFNUM_INET6_BSD, "IPv6" },
     60  1.1  christos     { BSD_AFNUM_INET6_FREEBSD, "IPv6" },
     61  1.1  christos     { BSD_AFNUM_INET6_DARWIN, "IPv6" },
     62  1.1  christos     { 0, NULL}
     63  1.1  christos };
     64