X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/8b7a740a27e9580a38e5e419188daec61c394c63..b51a0dafc7861eb31d21524ec067d7c529a664b8:/gmpls.c diff --git a/gmpls.c b/gmpls.c index ff9adb59..f0646f1b 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 @@ -10,25 +10,20 @@ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE. * - * Original code by Hannes Gredler (hannes@juniper.net) + * Original code by Hannes Gredler (hannes@gredler.at) */ -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.7 2006-04-14 07:11:59 hannes Exp $ (LBL)"; -#endif - #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif -#include +#include "netdissect-stdinc.h" -#include "interface.h" +#include "netdissect.h" #include "gmpls.h" /* rfc3471 */ -struct tok gmpls_link_prot_values[] = { +const struct tok gmpls_link_prot_values[] = { { 0x01, "Extra Traffic"}, { 0x02, "Unprotected"}, { 0x04, "Shared"}, @@ -41,7 +36,7 @@ struct tok gmpls_link_prot_values[] = { }; /* rfc3471 */ -struct tok gmpls_switch_cap_values[] = { +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"}, @@ -54,14 +49,14 @@ struct tok gmpls_switch_cap_values[] = { }; /* rfc4205 */ -struct tok gmpls_switch_cap_tsc_indication_values[] = { +const struct tok gmpls_switch_cap_tsc_indication_values[] = { { 0, "Standard SONET/SDH" }, { 1, "Arbitrary SONET/SDH" }, { 0, NULL } }; /* rfc3471 */ -struct tok gmpls_encoding_values[] = { +const struct tok gmpls_encoding_values[] = { { 1, "Packet"}, { 2, "Ethernet V2/DIX"}, { 3, "ANSI/ETSI PDH"}, @@ -77,7 +72,7 @@ struct tok gmpls_encoding_values[] = { }; /* rfc3471 */ -struct tok gmpls_payload_values[] = { +const struct tok gmpls_payload_values[] = { { 0, "Unknown"}, { 1, "Reserved"}, { 2, "Reserved"}, @@ -141,22 +136,22 @@ struct tok gmpls_payload_values[] = { { 0, NULL } }; -/* - * Link Type values used by LMP Service Discovery (specifically, the Client +/* + * 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. */ -struct tok lmp_sd_service_config_cpsa_link_type_values[] = { +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 +/* + * 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. */ -struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = { +const struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = { { 5, "VC-3"}, { 6, "VC-4"}, { 7, "STM-0"}, @@ -168,12 +163,12 @@ struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = { { 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 +/* + * 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. */ -struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = { +const struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = { { 5, "STS-1 SPE"}, { 6, "STS-3c SPE"}, { 7, "STS-1"}, @@ -186,10 +181,10 @@ struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = { }; #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_MAM 1 /* draft-ietf-tewg-diff-te-proto-07 */ #define DIFFSERV_BC_MODEL_EXTD_MAM 254 /* experimental */ -struct tok diffserv_te_bc_values[] = { +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"},