Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Small patch for l2tp numbers

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Thu, 10 Aug 2006 14:49:00 +0200
On Sat, Jul 22, 2006 at 09:11:26PM -0400, Carlos Pignataro wrote:
> Please find attached a patch with updates to l2tpv3's l2_sublayer_vals
> and pw_types_vals numbers (and pw type decoding).

> @@ -462,35 +468,20 @@
>    { 0,                         		NULL }
>  };
>  
> -#define NUM_PW_TYPES  0x1A
> -static const value_string pw_types_vals[NUM_PW_TYPES+1] = {
> -	{ 0,  "End of PW Capability List" },
> -	{ 1,  "Frame Relay DLCI (Martini Mode)" },
> -	{ 2,  "ATM AAL5 SDU VCC transport" },
> -	{ 3,  "ATM transparent cell transport" },
> -	{ 4,  "Ethernet Tagged Mode" },
> -	{ 5,  "Ethernet" },
> -	{ 6,  "HDLC" },
> -	{ 7,  "PPP" },
> -	{ 8,  "SONET/SDH Circuit Emulation Service Over MPLS (CEM) [Note1]" },
> -	{ 9,  "ATM n-to-one VCC cell transport" },
> -	{ 10, "ATM n-to-one VPC cell transport" },
> -	{ 11, "IP Layer2 Transport" },
> -	{ 12, "ATM one-to-one VCC Cell Mode" },
> -	{ 13, "ATM one-to-one VPC Cell Mode" },
> -	{ 14, "ATM AAL5 PDU VCC transport" },
> -	{ 15, "Frame-Relay Port mode" },
> -	{ 16, "SONET/SDH Circuit Emulation over Packet (CEP)" },
> -	{ 17, "Structure-agnostic E1 over Packet (SAToP)" },
> -	{ 18, "Structure-agnostic T1 (DS1) over Packet (SAToP)" },
> -	{ 19, "Structure-agnostic E3 over Packet (SAToP)" },
> -	{ 20, "Structure-agnostic T3 (DS3) over Packet (SAToP)" },
> -	{ 21, "CESoPSN basic mode" },
> -	{ 22, "TDMoIP basic mode" },
> -	{ 23, "CESoPSN TDM with CAS" },
> -	{ 24, "TDMoIP TDM with CAS" },
> -	{ 25, "Frame Relay DLCI" },
> -	{ 0,  "NULL" },
> +static const value_string pw_types_vals[] = {
> +	{ 0x0001,  "Frame Relay DLCI" },
> +	{ 0x0002,  "ATM AAL5 SDU VCC transport" },
> +	{ 0x0003,  "ATM Cell transparent Port Mode" },
> +	{ 0x0004,  "Ethernet VLAN" },
> +	{ 0x0005,  "Ethernet" },
> +	{ 0x0006,  "HDLC" },
> +	{ 0x0007,  "PPP" },
> +	{ 0x0009,  "ATM Cell transport VCC Mode" },
> +	{ 0x000A,  "ATM Cell transport VPC Mode" },
> +	{ 0x000B,  "IP Transport" },
> +	{ 0x000C,  "MPEG-TS Payload Type (MPTPW)" },
> +	{ 0x000D,  "Packet Streaming Protocol (PSPPW)" },
> +	{ 0,  NULL },
>  };

Why do you remove half of the values?  Is it just because it isn't on
the assigned numbers list or do you know that they aren't used by
somebody for the purposes mentioned. Apart from that question, your
patch looks good to me.

 Ciao
     Joerg