X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/86403131b51dd006f4cde72ee3f641b2d9fb1641..d6aacc676d8540f31d1df72b12b43fc9cde93df6:/gmpls.c diff --git a/gmpls.c b/gmpls.c index 380b0585..23515e98 100644 --- a/gmpls.c +++ b/gmpls.c @@ -1,4 +1,4 @@ -/* +/* * 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 @@ -13,20 +13,17 @@ * Original code by Hannes Gredler (hannes@juniper.net) */ -#ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.1 2003-06-09 23:28:09 guy Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include +#include -#include "interface.h" +#include "netdissect.h" +#include "gmpls.h" -struct tok gmpls_link_prot_values[] = { +/* rfc3471 */ +const struct tok gmpls_link_prot_values[] = { { 0x01, "Extra Traffic"}, { 0x02, "Unprotected"}, { 0x04, "Shared"}, @@ -38,19 +35,28 @@ struct tok gmpls_link_prot_values[] = { { 0, NULL } }; -struct tok gmpls_switch_cap_values[] = { - { 1, "Packet-Switch Capable-1"}, - { 2, "Packet-Switch Capable-2"}, - { 3, "Packet-Switch Capable-3"}, - { 4, "Packet-Switch Capable-4"}, - { 51, "Layer-2 Switch Capable"}, - { 100, "Time-Division-Multiplex"}, - { 150, "Lambda-Switch Capable"}, - { 200, "Fiber-Switch Capable"}, +/* rfc3471 */ +const struct tok gmpls_switch_cap_values[] = { + { GMPLS_PSC1, "Packet-Switch Capable-1"}, + { GMPLS_PSC2, "Packet-Switch Capable-2"}, + { GMPLS_PSC3, "Packet-Switch Capable-3"}, + { GMPLS_PSC4, "Packet-Switch Capable-4"}, + { GMPLS_L2SC, "Layer-2 Switch Capable"}, + { GMPLS_TSC, "Time-Division-Multiplex"}, + { GMPLS_LSC, "Lambda-Switch Capable"}, + { GMPLS_FSC, "Fiber-Switch Capable"}, + { 0, NULL } +}; + +/* rfc4205 */ +const struct tok gmpls_switch_cap_tsc_indication_values[] = { + { 0, "Standard SONET/SDH" }, + { 1, "Arbitrary SONET/SDH" }, { 0, NULL } }; -struct tok gmpls_encoding_values[] = { +/* rfc3471 */ +const struct tok gmpls_encoding_values[] = { { 1, "Packet"}, { 2, "Ethernet V2/DIX"}, { 3, "ANSI/ETSI PDH"}, @@ -65,7 +71,8 @@ struct tok gmpls_encoding_values[] = { { 0, NULL } }; -struct tok gmpls_payload_values[] = { +/* rfc3471 */ +const struct tok gmpls_payload_values[] = { { 0, "Unknown"}, { 1, "Reserved"}, { 2, "Reserved"}, @@ -99,7 +106,7 @@ struct tok gmpls_payload_values[] = { { 30, "POS - Scrambling, 16 bit CRC"}, { 31, "POS - Scrambling, 32 bit CRC"}, { 32, "ATM mapping"}, - { 33, "Ethernet"}, + { 33, "Ethernet PHY"}, { 34, "SONET/SDH"}, { 35, "Reserved (SONET deprecated)"}, { 36, "Digital Wrapper"}, @@ -113,5 +120,73 @@ struct tok gmpls_payload_values[] = { { 44, "HDLC"}, { 45, "Ethernet V2/DIX (only)"}, { 46, "Ethernet 802.3 (only)"}, +/* draft-ietf-ccamp-gmpls-g709-04.txt */ + { 47, "G.709 ODUj"}, + { 48, "G.709 OTUk(v)"}, + { 49, "CBR/CBRa"}, + { 50, "CBRb"}, + { 51, "BSOT"}, + { 52, "BSNT"}, + { 53, "IP/PPP (GFP)"}, + { 54, "Ethernet MAC (framed GFP)"}, + { 55, "Ethernet PHY (transparent GFP)"}, + { 56, "ESCON"}, + { 57, "FICON"}, + { 58, "Fiber Channel"}, + { 0, NULL } +}; + +/* + * Link Type values used by LMP Service Discovery (specifically, the Client + * Port Service Attributes Object). See UNI 1.0 section 9.4.2 for details. + */ +const struct tok lmp_sd_service_config_cpsa_link_type_values[] = { + { 5, "SDH ITU-T G.707"}, + { 6, "SONET ANSI T1.105"}, + { 0, NULL} +}; + +/* + * Signal Type values for SDH links used by LMP Service Discovery (specifically, + * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for + * details. + */ +const struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = { + { 5, "VC-3"}, + { 6, "VC-4"}, + { 7, "STM-0"}, + { 8, "STM-1"}, + { 9, "STM-4"}, + { 10, "STM-16"}, + { 11, "STM-64"}, + { 12, "STM-256"}, + { 0, NULL} +}; + +/* + * Signal Type values for SONET links used by LMP Service Discovery (specifically, + * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for + * details. + */ +const struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = { + { 5, "STS-1 SPE"}, + { 6, "STS-3c SPE"}, + { 7, "STS-1"}, + { 8, "STM-3"}, + { 9, "STM-12"}, + { 10, "STM-48"}, + { 11, "STM-192"}, + { 12, "STM-768"}, + { 0, NULL} +}; + +#define DIFFSERV_BC_MODEL_RDM 0 /* draft-ietf-tewg-diff-te-proto-07 */ +#define DIFFSERV_BC_MODEL_MAM 1 /* draft-ietf-tewg-diff-te-proto-07 */ +#define DIFFSERV_BC_MODEL_EXTD_MAM 254 /* experimental */ + +const struct tok diffserv_te_bc_values[] = { + { DIFFSERV_BC_MODEL_RDM, "Russian dolls"}, + { DIFFSERV_BC_MODEL_MAM, "Maximum allocation"}, + { DIFFSERV_BC_MODEL_EXTD_MAM, "Maximum allocation with E-LSP support"}, { 0, NULL } };