| Commit | Line | Data |
|---|---|---|
| c8cf0f94 PA |
1 | /* |
| 2 | * Redistribution and use in source and binary forms, with or without | |
| 3 | * modification, are permitted provided that: (1) source code | |
| 4 | * distributions retain the above copyright notice and this paragraph | |
| 5 | * in its entirety, and (2) distributions including binary code include | |
| 6 | * the above copyright notice and this paragraph in its entirety in | |
| 7 | * the documentation or other materials provided with the distribution. | |
| 8 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND | |
| 9 | * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT | |
| 10 | * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | |
| 11 | * FOR A PARTICULAR PURPOSE. | |
| 12 | * | |
| 13 | * Original code by Hannes Gredler (hannes@juniper.net) | |
| 14 | */ | |
| 15 | ||
| 16 | #ifndef lint | |
| 17 | static const char rcsid[] _U_ = | |
| 18 | "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.5.2.1 2005/05/19 06:44:02 guy Exp $ (LBL)"; | |
| 19 | #endif | |
| 20 | ||
| 21 | #ifdef HAVE_CONFIG_H | |
| 22 | #include "config.h" | |
| 23 | #endif | |
| 24 | ||
| 25 | #include <tcpdump-stdinc.h> | |
| 26 | ||
| 27 | #include "interface.h" | |
| 28 | ||
| 29 | /* rfc3471 */ | |
| 30 | struct tok gmpls_link_prot_values[] = { | |
| 31 | { 0x01, "Extra Traffic"}, | |
| 32 | { 0x02, "Unprotected"}, | |
| 33 | { 0x04, "Shared"}, | |
| 34 | { 0x08, "Dedicated 1:1"}, | |
| 35 | { 0x10, "Dedicated 1+1"}, | |
| 36 | { 0x20, "Enhanced"}, | |
| 37 | { 0x40, "Reserved"}, | |
| 38 | { 0x80, "Reserved"}, | |
| 39 | { 0, NULL } | |
| 40 | }; | |
| 41 | ||
| 42 | /* rfc3471 */ | |
| 43 | struct tok gmpls_switch_cap_values[] = { | |
| 44 | { 1, "Packet-Switch Capable-1"}, | |
| 45 | { 2, "Packet-Switch Capable-2"}, | |
| 46 | { 3, "Packet-Switch Capable-3"}, | |
| 47 | { 4, "Packet-Switch Capable-4"}, | |
| 48 | { 51, "Layer-2 Switch Capable"}, | |
| 49 | { 100, "Time-Division-Multiplex"}, | |
| 50 | { 150, "Lambda-Switch Capable"}, | |
| 51 | { 200, "Fiber-Switch Capable"}, | |
| 52 | { 0, NULL } | |
| 53 | }; | |
| 54 | ||
| 55 | /* rfc3471 */ | |
| 56 | struct tok gmpls_encoding_values[] = { | |
| 57 | { 1, "Packet"}, | |
| 58 | { 2, "Ethernet V2/DIX"}, | |
| 59 | { 3, "ANSI/ETSI PDH"}, | |
| 60 | { 4, "Reserved"}, | |
| 61 | { 5, "SDH ITU-T G.707/SONET ANSI T1.105"}, | |
| 62 | { 6, "Reserved"}, | |
| 63 | { 7, "Digital Wrapper"}, | |
| 64 | { 8, "Lambda (photonic)"}, | |
| 65 | { 9, "Fiber"}, | |
| 66 | { 10, "Reserved"}, | |
| 67 | { 11, "FiberChannel"}, | |
| 68 | { 0, NULL } | |
| 69 | }; | |
| 70 | ||
| 71 | /* rfc3471 */ | |
| 72 | struct tok gmpls_payload_values[] = { | |
| 73 | { 0, "Unknown"}, | |
| 74 | { 1, "Reserved"}, | |
| 75 | { 2, "Reserved"}, | |
| 76 | { 3, "Reserved"}, | |
| 77 | { 4, "Reserved"}, | |
| 78 | { 5, "Asynchronous mapping of E4"}, | |
| 79 | { 6, "Asynchronous mapping of DS3/T3"}, | |
| 80 | { 7, "Asynchronous mapping of E3"}, | |
| 81 | { 8, "Bit synchronous mapping of E3"}, | |
| 82 | { 9, "Byte synchronous mapping of E3"}, | |
| 83 | { 10, "Asynchronous mapping of DS2/T2"}, | |
| 84 | { 11, "Bit synchronous mapping of DS2/T2"}, | |
| 85 | { 12, "Reserved"}, | |
| 86 | { 13, "Asynchronous mapping of E1"}, | |
| 87 | { 14, "Byte synchronous mapping of E1"}, | |
| 88 | { 15, "Byte synchronous mapping of 31 * DS0"}, | |
| 89 | { 16, "Asynchronous mapping of DS1/T1"}, | |
| 90 | { 17, "Bit synchronous mapping of DS1/T1"}, | |
| 91 | { 18, "Byte synchronous mapping of DS1/T1"}, | |
| 92 | { 19, "VC-11 in VC-12"}, | |
| 93 | { 20, "Reserved"}, | |
| 94 | { 21, "Reserved"}, | |
| 95 | { 22, "DS1 SF Asynchronous"}, | |
| 96 | { 23, "DS1 ESF Asynchronous"}, | |
| 97 | { 24, "DS3 M23 Asynchronous"}, | |
| 98 | { 25, "DS3 C-Bit Parity Asynchronous"}, | |
| 99 | { 26, "VT/LOVC"}, | |
| 100 | { 27, "STS SPE/HOVC"}, | |
| 101 | { 28, "POS - No Scrambling, 16 bit CRC"}, | |
| 102 | { 29, "POS - No Scrambling, 32 bit CRC"}, | |
| 103 | { 30, "POS - Scrambling, 16 bit CRC"}, | |
| 104 | { 31, "POS - Scrambling, 32 bit CRC"}, | |
| 105 | { 32, "ATM mapping"}, | |
| 106 | { 33, "Ethernet PHY"}, | |
| 107 | { 34, "SONET/SDH"}, | |
| 108 | { 35, "Reserved (SONET deprecated)"}, | |
| 109 | { 36, "Digital Wrapper"}, | |
| 110 | { 37, "Lambda"}, | |
| 111 | { 38, "ANSI/ETSI PDH"}, | |
| 112 | { 39, "Reserved"}, | |
| 113 | { 40, "Link Access Protocol SDH (X.85 and X.86)"}, | |
| 114 | { 41, "FDDI"}, | |
| 115 | { 42, "DQDB (ETSI ETS 300 216)"}, | |
| 116 | { 43, "FiberChannel-3 (Services)"}, | |
| 117 | { 44, "HDLC"}, | |
| 118 | { 45, "Ethernet V2/DIX (only)"}, | |
| 119 | { 46, "Ethernet 802.3 (only)"}, | |
| 120 | /* draft-ietf-ccamp-gmpls-g709-04.txt */ | |
| 121 | { 47, "G.709 ODUj"}, | |
| 122 | { 48, "G.709 OTUk(v)"}, | |
| 123 | { 49, "CBR/CBRa"}, | |
| 124 | { 50, "CBRb"}, | |
| 125 | { 51, "BSOT"}, | |
| 126 | { 52, "BSNT"}, | |
| 127 | { 53, "IP/PPP (GFP)"}, | |
| 128 | { 54, "Ethernet MAC (framed GFP)"}, | |
| 129 | { 55, "Ethernet PHY (transparent GFP)"}, | |
| 130 | { 56, "ESCON"}, | |
| 131 | { 57, "FICON"}, | |
| 132 | { 58, "Fiber Channel"}, | |
| 133 | { 0, NULL } | |
| 134 | }; | |
| 135 | ||
| 136 | /* | |
| 137 | * Link Type values used by LMP Service Discovery (specifically, the Client | |
| 138 | * Port Service Attributes Object). See UNI 1.0 section 9.4.2 for details. | |
| 139 | */ | |
| 140 | struct tok lmp_sd_service_config_cpsa_link_type_values[] = { | |
| 141 | { 5, "SDH ITU-T G.707"}, | |
| 142 | { 6, "SONET ANSI T1.105"}, | |
| 143 | { 0, NULL} | |
| 144 | }; | |
| 145 | ||
| 146 | /* | |
| 147 | * Signal Type values for SDH links used by LMP Service Discovery (specifically, | |
| 148 | * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for | |
| 149 | * details. | |
| 150 | */ | |
| 151 | struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = { | |
| 152 | { 5, "VC-3"}, | |
| 153 | { 6, "VC-4"}, | |
| 154 | { 7, "STM-0"}, | |
| 155 | { 8, "STM-1"}, | |
| 156 | { 9, "STM-4"}, | |
| 157 | { 10, "STM-16"}, | |
| 158 | { 11, "STM-64"}, | |
| 159 | { 12, "STM-256"}, | |
| 160 | { 0, NULL} | |
| 161 | }; | |
| 162 | ||
| 163 | /* | |
| 164 | * Signal Type values for SONET links used by LMP Service Discovery (specifically, | |
| 165 | * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for | |
| 166 | * details. | |
| 167 | */ | |
| 168 | struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = { | |
| 169 | { 5, "STS-1 SPE"}, | |
| 170 | { 6, "STS-3c SPE"}, | |
| 171 | { 7, "STS-1"}, | |
| 172 | { 8, "STM-3"}, | |
| 173 | { 9, "STM-12"}, | |
| 174 | { 10, "STM-48"}, | |
| 175 | { 11, "STM-192"}, | |
| 176 | { 12, "STM-768"}, | |
| 177 | { 0, NULL} | |
| 178 | }; | |
| 179 | ||
| 180 | #define DIFFSERV_BC_MODEL_RDM 0 /* draft-ietf-tewg-diff-te-proto-07 */ | |
| 181 | #define DIFFSERV_BC_MODEL_MAM 1 /* draft-ietf-tewg-diff-te-proto-07 */ | |
| 182 | #define DIFFSERV_BC_MODEL_EXTD_MAM 254 /* experimental */ | |
| 183 | ||
| 184 | struct tok diffserv_te_bc_values[] = { | |
| 185 | { DIFFSERV_BC_MODEL_RDM, "Russian dolls"}, | |
| 186 | { DIFFSERV_BC_MODEL_MAM, "Maximum allocation"}, | |
| 187 | { DIFFSERV_BC_MODEL_EXTD_MAM, "Maximum allocation with E-LSP support"}, | |
| 188 | { 0, NULL } | |
| 189 | }; |