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: Carlos Pignataro <cpignata@xxxxxxxxx>
Date: Mon, 14 Aug 2006 17:30:54 -0400
Joerg,

On 8/10/2006 8:49 AM, Joerg Mayer allegedly said the following:
> 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.

The previous values belong to a different number space, "MPLS Pseudowire
Types Registry" in http://www.iana.org/assignments/pwe3-parameters, used
by LDP. The new values belong to the correct number space, "L2TPv3
Pseudowire Types" in http://www.iana.org/assignments/l2tp-parameters,
used by L2TPv3. Note that one is a 15-bit number while the other is a
16-bit number. So it's not really removing half of the values; even
though there are some numerical "matches" in the two registries, there
are differences (see for example 12 and 13, and some name changes). From
my knowledge the values not registered are also not used (and part of
the intention of the patch is that they are not misused); a fair
assumption is that it was a clerical error mis-assuming the two
protocols, LDP and L2TPv3, used the same space for "PW Types".
Could you please check-in if the patch looks OK?

Many thanks,

--Carlos.

> 
>  Ciao
>      Joerg
> 

-- 
--Carlos Pignataro.
Escalation RTP - cisco Systems