/*
* Copyright (c) 1992, 1993, 1994, 1995, 1996
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code distributions
* retain the above copyright notice and this paragraph in its entirety, (2)
* distributions including binary code include the above copyright notice and
* this paragraph in its entirety in the documentation or other materials
* provided with the distribution, and (3) all advertising materials mentioning
* features or use of this software display the following acknowledgement:
* ``This product includes software developed by the University of California,
* Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
* the University nor the names of its contributors may be used to endorse
* or promote products derived from this software without specific prior
* written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* Original code by Matt Thomas, Digital Equipment Corporation
*
* Extensively modified by Hannes Gredler (hannes@juniper.net) for more
* complete IS-IS support.
*/
#ifndef lint
static const char rcsid[] _U_ =
"@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.106.2.5 2004/03/24 01:45:26 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <tcpdump-stdinc.h>
#include <stdio.h>
#include <string.h>
#include "interface.h"
#include "addrtoname.h"
#include "ethertype.h"
#include "ether.h"
#include "extract.h"
#include "gmpls.h"
#define NLPID_CLNS 129 /* 0x81 */
#define NLPID_ESIS 130 /* 0x82 */
#define NLPID_ISIS 131 /* 0x83 */
#define NLPID_IP6 0x8e
#define NLPID_IP 0xcc
#define NLPID_NULLNS 0
#define IPV4 1 /* AFI value */
#define IPV6 2 /* AFI value */
/*
* IS-IS is defined in ISO 10589. Look there for protocol definitions.
*/
#define SYSTEM_ID_LEN ETHER_ADDR_LEN
#define NODE_ID_LEN SYSTEM_ID_LEN+1
#define LSP_ID_LEN SYSTEM_ID_LEN+2
#define ISIS_VERSION 1
#define PDU_TYPE_MASK 0x1F
#define PRIORITY_MASK 0x7F
#define L1_LAN_IIH 15
#define L2_LAN_IIH 16
#define PTP_IIH 17
#define L1_LSP 18
#define L2_LSP 20
#define L1_CSNP 24
#define L2_CSNP 25
#define L1_PSNP 26
#define L2_PSNP 27
static struct tok isis_pdu_values[] = {
{ L1_LAN_IIH, "L1 Lan IIH"},
{ L2_LAN_IIH, "L2 Lan IIH"},
{ PTP_IIH, "p2p IIH"},
{ L1_LSP, "L1 LSP"},
{ L2_LSP, "L2 LSP"},
{ L1_CSNP, "L1 CSNP"},
{ L2_CSNP, "L2 CSNP"},
{ L1_PSNP, "L1 PSNP"},
{ L2_PSNP, "L2 PSNP"},
{ 0, NULL}
};
/*
* A TLV is a tuple of a type, length and a value and is normally used for
* encoding information in all sorts of places. This is an enumeration of
* the well known types.
*
* list taken from rfc3359 plus some memory from veterans ;-)
*/
#define TLV_AREA_ADDR 1 /* iso10589 */
#define TLV_IS_REACH 2 /* iso10589 */
#define TLV_ESNEIGH 3 /* iso10589 */
#define TLV_PART_DIS 4 /* iso10589 */
#define TLV_PREFIX_NEIGH 5 /* iso10589 */
#define TLV_ISNEIGH 6 /* iso10589 */
#define TLV_ISNEIGH_VARLEN 7 /* iso10589 */
#define TLV_PADDING 8 /* iso10589 */
#define TLV_LSP 9 /* iso10589 */
#define TLV_AUTH 10 /* iso10589, rfc3567 */
#define TLV_CHECKSUM 12 /* rfc3358 */
#define TLV_LSP_BUFFERSIZE 14 /* iso10589 rev2 */
#define TLV_EXT_IS_REACH 22 /* draft-ietf-isis-traffic-05 */
#define TLV_IS_ALIAS_ID 24 /* draft-ietf-isis-ext-lsp-frags-02 */
#define TLV_DECNET_PHASE4 42
#define TLV_LUCENT_PRIVATE 66
#define TLV_INT_IP_REACH 128 /* rfc1195, rfc2966 */
#define TLV_PROTOCOLS 129 /* rfc1195 */
#define TLV_EXT_IP_REACH 130 /* rfc1195, rfc2966 */
#define TLV_IDRP_INFO 131 /* rfc1195 */
#define TLV_IPADDR 132 /* rfc1195 */
#define TLV_IPAUTH 133 /* rfc1195 */
#define TLV_TE_ROUTER_ID 134 /* draft-ietf-isis-traffic-05 */
#define TLV_EXTD_IP_REACH 135 /* draft-ietf-isis-traffic-05 */
#define TLV_HOSTNAME 137 /* rfc2763 */
#define TLV_SHARED_RISK_GROUP 138 /* draft-ietf-isis-gmpls-extensions */
#define TLV_NORTEL_PRIVATE1 176
#define TLV_NORTEL_PRIVATE2 177
#define TLV_HOLDTIME 198 /* ES-IS */
#define TLV_RESTART_SIGNALING 211 /* draft-ietf-isis-restart-01 */
#define TLV_MT_IS_REACH 222 /* draft-ietf-isis-wg-multi-topology-05 */
#define TLV_MT_SUPPORTED 229 /* draft-ietf-isis-wg-multi-topology-05 */
#define TLV_IP6ADDR 232 /* draft-ietf-isis-ipv6-02 */
#define TLV_MT_IP_REACH 235 /* draft-ietf-isis-wg-multi-topology-05 */
#define TLV_IP6_REACH 236 /* draft-ietf-isis-ipv6-02 */
#define TLV_MT_IP6_REACH 237 /* draft-ietf-isis-wg-multi-topology-05 */
#define TLV_PTP_ADJ 240 /* rfc3373 */
#define TLV_IIH_SEQNR 241 /* draft-shen-isis-iih-sequence-00 */
#define TLV_VENDOR_PRIVATE 250 /* draft-ietf-isis-proprietary-tlv-00 */
static struct tok isis_tlv_values[] = {
{ TLV_AREA_ADDR, "Area address(es)"},
{ TLV_IS_REACH, "IS Reachability"},
{ TLV_ESNEIGH, "ES Neighbor(s)"},
{ TLV_PART_DIS, "Partition DIS"},
{ TLV_PREFIX_NEIGH, "Prefix Neighbors"},
{ TLV_ISNEIGH, "IS Neighbor(s)"},
{ TLV_ISNEIGH_VARLEN, "IS Neighbor(s) (variable length)"},
{ TLV_PADDING, "Padding"},
{ TLV_LSP, "LSP entries"},
{ TLV_AUTH, "Authentication"},
{ TLV_CHECKSUM, "Checksum"},
{ TLV_LSP_BUFFERSIZE, "LSP Buffersize"},
{ TLV_EXT_IS_REACH, "Extended IS Reachability"},
{ TLV_IS_ALIAS_ID, "IS Alias ID"},
{ TLV_DECNET_PHASE4, "DECnet Phase IV"},
{ TLV_LUCENT_PRIVATE, "Lucent Proprietary"},
{ TLV_INT_IP_REACH, "IPv4 Internal Reachability"},
{ TLV_PROTOCOLS, "Protocols supported"},
{ TLV_EXT_IP_REACH, "IPv4 External Reachability"},
{ TLV_IDRP_INFO, "Inter-Domain Information Type"},
{ TLV_IPADDR, "IPv4 Interface address(es)"},
{ TLV_IPAUTH, "IPv4 authentication (deprecated)"},
{ TLV_TE_ROUTER_ID, "Traffic Engineering Router ID"},
{ TLV_EXTD_IP_REACH, "Extended IPv4 Reachability"},
{ TLV_HOSTNAME, "Hostname"},
{ TLV_SHARED_RISK_GROUP, "Shared Risk Link Group"},
{ TLV_NORTEL_PRIVATE1, "Nortel Proprietary"},
{ TLV_NORTEL_PRIVATE2, "Nortel Proprietary"},
{ TLV_HOLDTIME, "Holdtime"},
{ TLV_RESTART_SIGNALING, "Restart Signaling"},
{ TLV_MT_IS_REACH, "Multi Topology IS Reachability"},
{ TLV_MT_SUPPORTED, "Multi Topology"},
{ TLV_IP6ADDR, "IPv6 Interface address(es)"},
{ TLV_MT_IP_REACH, "Multi-Topology IPv4 Reachability"},
{ TLV_IP6_REACH, "IPv6 reachability"},
{ TLV_MT_IP6_REACH, "Multi-Topology IP6 Reachability"},
{ TLV_PTP_ADJ, "Point-to-point Adjacency State"},
{ TLV_IIH_SEQNR, "Hello PDU Sequence Number"},
{ TLV_VENDOR_PRIVATE, "Vendor Private"},
{ 0, NULL }
};
#define SUBTLV_EXT_IS_REACH_ADMIN_GROUP 3 /* draft-ietf-isis-traffic-05 */
#define SUBTLV_EXT_IS_REACH_LINK_LOCAL_REMOTE_ID 4 /* draft-ietf-isis-gmpls-extensions */
#define SUBTLV_EXT_IS_REACH_LINK_REMOTE_ID 5 /* draft-ietf-isis-traffic-05 */
#define SUBTLV_EXT_IS_REACH_IPV4_INTF_ADDR 6 /* draft-ietf-isis-traffic-05 */
#define SUBTLV_EXT_IS_REACH_IPV4_NEIGHBOR_ADDR 8 /* draft-ietf-isis-traffic-05 */
#define S
评论0
最新资源