1127668Sbms/* 2127668Sbms * Redistribution and use in source and binary forms, with or without 3127668Sbms * modification, are permitted provided that: (1) source code 4127668Sbms * distributions retain the above copyright notice and this paragraph 5127668Sbms * in its entirety, and (2) distributions including binary code include 6127668Sbms * the above copyright notice and this paragraph in its entirety in 7127668Sbms * the documentation or other materials provided with the distribution. 8127668Sbms * THIS SOFTWARE IS PROVIDED ``AS IS'' AND 9127668Sbms * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT 10127668Sbms * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 11127668Sbms * FOR A PARTICULAR PURPOSE. 12127668Sbms * 13127668Sbms * Original code by Hannes Gredler (hannes@juniper.net) 14127668Sbms */ 15127668Sbms 16127668Sbms#ifndef lint 17127668Sbmsstatic const char rcsid[] _U_ = 18190207Srpaulo "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.7 2006-04-14 07:11:59 hannes Exp $ (LBL)"; 19127668Sbms#endif 20127668Sbms 21127668Sbms#ifdef HAVE_CONFIG_H 22127668Sbms#include "config.h" 23127668Sbms#endif 24127668Sbms 25127668Sbms#include <tcpdump-stdinc.h> 26127668Sbms 27127668Sbms#include "interface.h" 28190207Srpaulo#include "gmpls.h" 29127668Sbms 30127668Sbms/* rfc3471 */ 31214478Srpauloconst struct tok gmpls_link_prot_values[] = { 32127668Sbms { 0x01, "Extra Traffic"}, 33127668Sbms { 0x02, "Unprotected"}, 34127668Sbms { 0x04, "Shared"}, 35127668Sbms { 0x08, "Dedicated 1:1"}, 36127668Sbms { 0x10, "Dedicated 1+1"}, 37127668Sbms { 0x20, "Enhanced"}, 38127668Sbms { 0x40, "Reserved"}, 39127668Sbms { 0x80, "Reserved"}, 40127668Sbms { 0, NULL } 41127668Sbms}; 42127668Sbms 43127668Sbms/* rfc3471 */ 44214478Srpauloconst struct tok gmpls_switch_cap_values[] = { 45190207Srpaulo { GMPLS_PSC1, "Packet-Switch Capable-1"}, 46190207Srpaulo { GMPLS_PSC2, "Packet-Switch Capable-2"}, 47190207Srpaulo { GMPLS_PSC3, "Packet-Switch Capable-3"}, 48190207Srpaulo { GMPLS_PSC4, "Packet-Switch Capable-4"}, 49190207Srpaulo { GMPLS_L2SC, "Layer-2 Switch Capable"}, 50190207Srpaulo { GMPLS_TSC, "Time-Division-Multiplex"}, 51190207Srpaulo { GMPLS_LSC, "Lambda-Switch Capable"}, 52190207Srpaulo { GMPLS_FSC, "Fiber-Switch Capable"}, 53127668Sbms { 0, NULL } 54127668Sbms}; 55127668Sbms 56190207Srpaulo/* rfc4205 */ 57214478Srpauloconst struct tok gmpls_switch_cap_tsc_indication_values[] = { 58190207Srpaulo { 0, "Standard SONET/SDH" }, 59190207Srpaulo { 1, "Arbitrary SONET/SDH" }, 60190207Srpaulo { 0, NULL } 61190207Srpaulo}; 62190207Srpaulo 63127668Sbms/* rfc3471 */ 64214478Srpauloconst struct tok gmpls_encoding_values[] = { 65127668Sbms { 1, "Packet"}, 66127668Sbms { 2, "Ethernet V2/DIX"}, 67127668Sbms { 3, "ANSI/ETSI PDH"}, 68127668Sbms { 4, "Reserved"}, 69127668Sbms { 5, "SDH ITU-T G.707/SONET ANSI T1.105"}, 70127668Sbms { 6, "Reserved"}, 71127668Sbms { 7, "Digital Wrapper"}, 72127668Sbms { 8, "Lambda (photonic)"}, 73127668Sbms { 9, "Fiber"}, 74127668Sbms { 10, "Reserved"}, 75127668Sbms { 11, "FiberChannel"}, 76127668Sbms { 0, NULL } 77127668Sbms}; 78127668Sbms 79127668Sbms/* rfc3471 */ 80214478Srpauloconst struct tok gmpls_payload_values[] = { 81127668Sbms { 0, "Unknown"}, 82127668Sbms { 1, "Reserved"}, 83127668Sbms { 2, "Reserved"}, 84127668Sbms { 3, "Reserved"}, 85127668Sbms { 4, "Reserved"}, 86127668Sbms { 5, "Asynchronous mapping of E4"}, 87127668Sbms { 6, "Asynchronous mapping of DS3/T3"}, 88127668Sbms { 7, "Asynchronous mapping of E3"}, 89127668Sbms { 8, "Bit synchronous mapping of E3"}, 90127668Sbms { 9, "Byte synchronous mapping of E3"}, 91127668Sbms { 10, "Asynchronous mapping of DS2/T2"}, 92127668Sbms { 11, "Bit synchronous mapping of DS2/T2"}, 93127668Sbms { 12, "Reserved"}, 94127668Sbms { 13, "Asynchronous mapping of E1"}, 95127668Sbms { 14, "Byte synchronous mapping of E1"}, 96127668Sbms { 15, "Byte synchronous mapping of 31 * DS0"}, 97127668Sbms { 16, "Asynchronous mapping of DS1/T1"}, 98127668Sbms { 17, "Bit synchronous mapping of DS1/T1"}, 99127668Sbms { 18, "Byte synchronous mapping of DS1/T1"}, 100127668Sbms { 19, "VC-11 in VC-12"}, 101127668Sbms { 20, "Reserved"}, 102127668Sbms { 21, "Reserved"}, 103127668Sbms { 22, "DS1 SF Asynchronous"}, 104127668Sbms { 23, "DS1 ESF Asynchronous"}, 105127668Sbms { 24, "DS3 M23 Asynchronous"}, 106127668Sbms { 25, "DS3 C-Bit Parity Asynchronous"}, 107127668Sbms { 26, "VT/LOVC"}, 108127668Sbms { 27, "STS SPE/HOVC"}, 109127668Sbms { 28, "POS - No Scrambling, 16 bit CRC"}, 110127668Sbms { 29, "POS - No Scrambling, 32 bit CRC"}, 111127668Sbms { 30, "POS - Scrambling, 16 bit CRC"}, 112127668Sbms { 31, "POS - Scrambling, 32 bit CRC"}, 113127668Sbms { 32, "ATM mapping"}, 114127668Sbms { 33, "Ethernet PHY"}, 115127668Sbms { 34, "SONET/SDH"}, 116127668Sbms { 35, "Reserved (SONET deprecated)"}, 117127668Sbms { 36, "Digital Wrapper"}, 118127668Sbms { 37, "Lambda"}, 119127668Sbms { 38, "ANSI/ETSI PDH"}, 120127668Sbms { 39, "Reserved"}, 121127668Sbms { 40, "Link Access Protocol SDH (X.85 and X.86)"}, 122127668Sbms { 41, "FDDI"}, 123127668Sbms { 42, "DQDB (ETSI ETS 300 216)"}, 124127668Sbms { 43, "FiberChannel-3 (Services)"}, 125127668Sbms { 44, "HDLC"}, 126127668Sbms { 45, "Ethernet V2/DIX (only)"}, 127127668Sbms { 46, "Ethernet 802.3 (only)"}, 128127668Sbms/* draft-ietf-ccamp-gmpls-g709-04.txt */ 129127668Sbms { 47, "G.709 ODUj"}, 130127668Sbms { 48, "G.709 OTUk(v)"}, 131127668Sbms { 49, "CBR/CBRa"}, 132127668Sbms { 50, "CBRb"}, 133127668Sbms { 51, "BSOT"}, 134127668Sbms { 52, "BSNT"}, 135127668Sbms { 53, "IP/PPP (GFP)"}, 136127668Sbms { 54, "Ethernet MAC (framed GFP)"}, 137127668Sbms { 55, "Ethernet PHY (transparent GFP)"}, 138127668Sbms { 56, "ESCON"}, 139127668Sbms { 57, "FICON"}, 140127668Sbms { 58, "Fiber Channel"}, 141127668Sbms { 0, NULL } 142127668Sbms}; 143146773Ssam 144147899Ssam/* 145147899Ssam * Link Type values used by LMP Service Discovery (specifically, the Client 146147899Ssam * Port Service Attributes Object). See UNI 1.0 section 9.4.2 for details. 147147899Ssam */ 148214478Srpauloconst struct tok lmp_sd_service_config_cpsa_link_type_values[] = { 149147899Ssam { 5, "SDH ITU-T G.707"}, 150147899Ssam { 6, "SONET ANSI T1.105"}, 151147899Ssam { 0, NULL} 152147899Ssam}; 153147899Ssam 154147899Ssam/* 155147899Ssam * Signal Type values for SDH links used by LMP Service Discovery (specifically, 156147899Ssam * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for 157147899Ssam * details. 158147899Ssam */ 159214478Srpauloconst struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = { 160147899Ssam { 5, "VC-3"}, 161147899Ssam { 6, "VC-4"}, 162147899Ssam { 7, "STM-0"}, 163147899Ssam { 8, "STM-1"}, 164147899Ssam { 9, "STM-4"}, 165147899Ssam { 10, "STM-16"}, 166147899Ssam { 11, "STM-64"}, 167147899Ssam { 12, "STM-256"}, 168147899Ssam { 0, NULL} 169147899Ssam}; 170147899Ssam 171147899Ssam/* 172147899Ssam * Signal Type values for SONET links used by LMP Service Discovery (specifically, 173147899Ssam * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for 174147899Ssam * details. 175147899Ssam */ 176214478Srpauloconst struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = { 177147899Ssam { 5, "STS-1 SPE"}, 178147899Ssam { 6, "STS-3c SPE"}, 179147899Ssam { 7, "STS-1"}, 180147899Ssam { 8, "STM-3"}, 181147899Ssam { 9, "STM-12"}, 182147899Ssam { 10, "STM-48"}, 183147899Ssam { 11, "STM-192"}, 184147899Ssam { 12, "STM-768"}, 185147899Ssam { 0, NULL} 186147899Ssam}; 187147899Ssam 188146773Ssam#define DIFFSERV_BC_MODEL_RDM 0 /* draft-ietf-tewg-diff-te-proto-07 */ 189146773Ssam#define DIFFSERV_BC_MODEL_MAM 1 /* draft-ietf-tewg-diff-te-proto-07 */ 190146773Ssam#define DIFFSERV_BC_MODEL_EXTD_MAM 254 /* experimental */ 191146773Ssam 192214478Srpauloconst struct tok diffserv_te_bc_values[] = { 193146773Ssam { DIFFSERV_BC_MODEL_RDM, "Russian dolls"}, 194146773Ssam { DIFFSERV_BC_MODEL_MAM, "Maximum allocation"}, 195146773Ssam { DIFFSERV_BC_MODEL_EXTD_MAM, "Maximum allocation with E-LSP support"}, 196146773Ssam { 0, NULL } 197146773Ssam}; 198