Wireshark-dev: Re: [Wireshark-dev] RRC Messages does not decode correctely

From: "Anders Broman" <a.broman@xxxxxxxxx>
Date: Thu, 30 Aug 2007 22:47:15 +0200
Hi,
This is what it looks like. As I see it the problematic thing is the values
But I realised that code similar to what's needed is in
dissect_per_octet_string() it alos looks like dissect_per_bit_string() is
not returning a value_tvb in all paths.
I don't know if there'll be a significant performance hit by doing something
like:
			while (j < (guint32)min_len){
				for(i=0;i<8;i++){
					offset=dissect_per_boolean(tvb,
offset, actx, tree, -1, &bit);
					buff[j]=(buff[j]<<1)|bit;
				}
				j = j+1;
			}
			pbytes = buff;
			out_tvb = tvb_new_real_data(buff,min_len,min_len);
			/* Arrange that the allocated packet data copy be
freed when the
			 * tvbuff is freed. 
			 */
			tvb_set_free_cb(out_tvb, g_free );
			tvb_set_child_real_data_tvbuff(tvb,out_tvb);
			add_new_data_source(actx->pinfo, out_tvb, "PER
unaligned decoded OCTET STRING");


Frame 1 (33 bytes on wire, 33 bytes captured)
DLT: 147
Radio Resource Control (RRC) protocol
    UL-DCCH-Message
        message: rrcConnectionSetupComplete (18)
            rrcConnectionSetupComplete
                rrc-TransactionIdentifier: 0
                startList: 2 items
                    Item 0
                        Item
                            cn-DomainIdentity: cs-domain (0)
                            start-Value: 8802AF
                    Item 1
                        Item
                            cn-DomainIdentity: ps-domain (1)
                            start-Value: 201975
                ue-RadioAccessCapability
                    pdcp-Capability
                        0... .... losslessSRNS-RelocationSupport: False
                        supportForRfc2507: supported (1)
                            supported: dummy (0)
                    rlc-Capability
                        totalRLC-AM-BufferSize: kb1000 (6)
                        maximumRLC-WindowSize: mws2047 (0)
                        maximumAM-EntityNumber: am30 (6)
                    transportChannelCapability
                        dl-TransChCapability
                            maxNoBitsReceived: b163840 (12)
                            maxConvCodeBitsReceived: b163840 (12)
                            turboDecodingSupport: supported (1)
                                supported: b163840 (12)
                            maxSimultaneousTransChs: e32 (3)
                            maxSimultaneousCCTrCH-Count: 8
                            maxReceivedTransportBlocks: tb512 (9)
                            maxNumberOfTFC: tfc1024 (8)
                            maxNumberOfTF: tf1024 (5)
                        ul-TransChCapability
                            maxNoBitsTransmitted: b163840 (12)
                            maxConvCodeBitsTransmitted: b163840 (12)
                            turboEncodingSupport: supported (1)
                                supported: b163840 (12)
                            maxSimultaneousTransChs: e32 (4)
                            modeSpecificInfo: fdd (0)
                                fdd: NULL
                            maxTransmittedBlocks: tb512 (10)
                            maxNumberOfTFC: tfc1024 (10)
                            maxNumberOfTF: tf1024 (5)
                    rf-Capability
                        fddRF-Capability
                            ue-PowerClass: 1
                            txRxFrequencySeparation: default-TxRx-separation
(0)
                    physicalChannelCapability
                        fddPhysChCapability
                            downlinkPhysChCapability
                                maxNoDPCH-PDSCH-Codes: 1
                                maxNoPhysChBitsReceived: b48000 (11)
                                .... 1... supportForSF-512: True
                                .... .1.. dummy: True
                                dummy2: supported (1)
                                    supported
                                        maxNoSCCPCH-RL: rl1 (0)
                                        .... ...1
simultaneousSCCPCH-DPCH-DPDCH-Reception: True
                            uplinkPhysChCapability
                                maxNoDPDCH-BitsTransmitted: b9600 (4)
                                .... 1... dummy: True
                    ue-MultiModeRAT-Capability
                        multiRAT-CapabilityList
                            .... .1.. supportOfGSM: True
                            .... ..1. supportOfMulticarrier: True
                        multiModeCapability: fdd (1)
                    securityCapability
                        cipheringAlgorithmCap: FFFF
                        integrityProtectionAlgorithmCap: FFFF
                    ue-positioning-Capability
                        .1.. .... standaloneLocMethodsSupported: True
                        ..1. .... ue-BasedOTDOA-Supported: True
                        networkAssistedGPS-Supported: networkBased (0)
                        .... .1.. supportForUE-GPS-TimingOfCellFrames: True
                        .... ..1. supportForIPDL: True
                    measurementCapability
                        downlinkCompressedMode
                            ..1. .... fdd-Measurements: True
                            ...0 .... tdd-Measurements: False
                            gsm-Measurements
                                .... 1... gsm900: True
                                .... .1.. dcs1800: True
                                .... ..1. gsm1900: True
                            .... ...1 multiCarrierMeasurements: True
                        uplinkCompressedMode
                            ...1 .... fdd-Measurements: True
                            .... 0... tdd-Measurements: False
                            gsm-Measurements
                                .... .1.. gsm900: True
                                .... ..1. dcs1800: True
                                .... ...1 gsm1900: True
                            1... .... multiCarrierMeasurements: True
                v370NonCriticalExtensions
                    rrcConnectionSetupComplete-v370ext
                    v380NonCriticalExtensions
                        rrcConnectionSetupComplete-v380ext
                            dl-PhysChCapabilityFDD-v380ext
                        v3a0NonCriticalExtensions
                            rrcConnectionSetupComplete-v3a0ext
                            laterNonCriticalExtensions
                                v3g0NonCriticalExtensions
                                    rrcConnectionSetupComplete-v3g0ext
                                    v4b0NonCriticalExtensions
                                        rrcConnectionSetupComplete-v4b0ext
                                        v590NonCriticalExtensions
 
rrcConnectionSetupComplete-v590ext
 
ue-RadioAccessCapability-v590ext
 
dl-CapabilityWithSimultaneousHS-DSCHConfig: kbps384 (3)
                                                    pdcp-Capability-r5-ext
                                                        .... .1..
supportForRfc3095ContextRelocation: True
                                                        maxHcContextSpace:
by131072 (3)
                                                    rlc-Capability-r5-ext
 
totalRLC-AM-BufferSize: kb750 (3)
 
physicalChannelCapability
                                                        fdd-hspdsch:
supported (0)
                                                            supported
 
hsdsch-physical-layer-category: 12
                                                                ..1. ....
dummy: True
                                                                ...0 ....
dummy2: False
                                                        tdd384-hspdsch:
unsupported (1)
                                                            unsupported:
NULL
                                                        tdd128-hspdsch:
unsupported (1)
                                                            unsupported:
NULL
 
multiModeRAT-Capability-v590ext
                                                        .... ..0.
supportOfUTRAN-ToGERAN-NACC: False
 
ue-RATSpecificCapability-v590ext
 
geranIu-RadioAccessCapability: 04

-----Ursprungligt meddelande-----
Från: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Martin Andersson
Skickat: den 30 augusti 2007 22:33
Till: Developer support list for Wireshark
Ämne: Re: [Wireshark-dev] RRC Messages does not decode correctely

I think it's OK with hex representation of "BIT STRING".

My reflection of the difference hex/bit representation was more a 
clarification
to the difference in output, between wireshark and the supplied output.

But maybe you can use the output to see how your updates to UPER is 
corresponding
to the output from an external tool.

rg/Martin



Anders Broman wrote:
> Hi,
> The problem is how to handle bitstrings of 17-65k bits length
> I don't really fancy doing
> for(i=0;i<min_len;i++){
> 	offset=dissect_per_boolean(tvb, offset, actx, tree, -1, &bit);
> 	bytes[0]=(bytes[0]<<1)|bit;
> }
> Etc for 65k long ones...
>
> I don't know how usual really long bitstrings are perhaps we could only
> display the value for the ones up to 32 bits?
>
> Would a display like
> ...0 0000 (etc) 00.. Be better?
> Regards
> Anders
> -----Ursprungligt meddelande-----
> Från: wireshark-dev-bounces@xxxxxxxxxxxxx
> [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] För Martin Andersson
> Skickat: den 30 augusti 2007 19:48
> Till: Developer support list for Wireshark
> Ämne: Re: [Wireshark-dev] RRC Messages does not decode correctely
>
> Anders Broman (AL/EAB) wrote:
>   
>> Hi,
>> A quick fix to packet-per.c the displayed value will be wrong though.
>>     
> Hej Anders
>
> As referense how the value should be decoded (the bitstring are in hex 
> in wireshark).
>
> rg/Martin
>
>
>
> value UL-DCCH-Message ::=
> {
>   message rrcConnectionSetupComplete :
>     {
>       rrc-TransactionIdentifier 0,
>       startList
>       {
>         {
>           cn-DomainIdentity cs-domain,
>           start-Value '00000000 10101011 1100'B
>         },
>         {
>           cn-DomainIdentity ps-domain,
>           start-Value '00000000 11001011 1010'B
>         }
>       },
>       ue-RadioAccessCapability
>       {
>         pdcp-Capability
>         {
>           losslessSRNS-RelocationSupport FALSE,
>           supportForRfc2507 supported : dummy
>         },
>         rlc-Capability
>         {
>           totalRLC-AM-BufferSize kb1000,
>           maximumRLC-WindowSize mws2047,
>           maximumAM-EntityNumber am30
>         },
>         transportChannelCapability
>         {
>           dl-TransChCapability
>           {
>             maxNoBitsReceived b163840,
>             maxConvCodeBitsReceived b163840,
>             turboDecodingSupport supported : b163840,
>             maxSimultaneousTransChs e32,
>             maxSimultaneousCCTrCH-Count 8,
>             maxReceivedTransportBlocks tb512,
>             maxNumberOfTFC tfc1024,
>             maxNumberOfTF tf1024
>           },
>           ul-TransChCapability
>           {
>             maxNoBitsTransmitted b163840,
>             maxConvCodeBitsTransmitted b163840,
>             turboEncodingSupport supported : b163840,
>             maxSimultaneousTransChs e32,
>             modeSpecificInfo fdd : NULL,
>             maxTransmittedBlocks tb512,
>             maxNumberOfTFC tfc1024,
>             maxNumberOfTF tf1024
>           }
>         },
>         rf-Capability
>         {
>           fddRF-Capability
>           {
>             ue-PowerClass 1,
>             txRxFrequencySeparation default-TxRx-separation
>           }
>         },
>         physicalChannelCapability
>         {
>           fddPhysChCapability
>           {
>             downlinkPhysChCapability
>             {
>               maxNoDPCH-PDSCH-Codes 1,
>               maxNoPhysChBitsReceived b48000,
>               supportForSF-512 TRUE,
>               dummy TRUE,
>               dummy2 supported :
>                 {
>                   maxNoSCCPCH-RL rl1,
>                   simultaneousSCCPCH-DPCH-DPDCH-Reception TRUE
>                 }
>             },
>             uplinkPhysChCapability
>             {
>               maxNoDPDCH-BitsTransmitted b9600,
>               dummy TRUE
>             }
>           }
>         },
>         ue-MultiModeRAT-Capability
>         {
>           multiRAT-CapabilityList
>           {
>             supportOfGSM TRUE,
>             supportOfMulticarrier TRUE
>           },
>           multiModeCapability fdd
>         },
>         securityCapability
>         {
>           cipheringAlgorithmCap { spare15, spare14, spare13, spare12, 
> spare11, spare10, spare9, spare8, spare7, spare6, spare5, spare4, 
> spare3, spare2, uea1, uea0 },
>           integrityProtectionAlgorithmCap { spare15, spare14, spare13, 
> spare12, spare11, spare10, spare9, spare8, spare7, spare6, spare5, 
> spare4, spare3, spare2, uia1, spare0 }
>         },
>         ue-positioning-Capability
>         {
>           standaloneLocMethodsSupported TRUE,
>           ue-BasedOTDOA-Supported TRUE,
>           networkAssistedGPS-Supported networkBased,
>           supportForUE-GPS-TimingOfCellFrames TRUE,
>           supportForIPDL TRUE
>         },
>         measurementCapability
>         {
>           downlinkCompressedMode
>           {
>             fdd-Measurements TRUE,
>             tdd-Measurements FALSE,
>             gsm-Measurements
>             {
>               gsm900 TRUE,
>               dcs1800 TRUE,
>               gsm1900 TRUE
>             },
>             multiCarrierMeasurements TRUE
>           },
>           uplinkCompressedMode
>           {
>             fdd-Measurements TRUE,
>             tdd-Measurements FALSE,
>             gsm-Measurements
>             {
>               gsm900 TRUE,
>               dcs1800 TRUE,
>               gsm1900 TRUE
>             },
>             multiCarrierMeasurements TRUE
>           }
>         }
>       },
>       v370NonCriticalExtensions
>       {
>         rrcConnectionSetupComplete-v370ext
>         {
>         },
>         v380NonCriticalExtensions
>         {
>           rrcConnectionSetupComplete-v380ext
>           {
>             dl-PhysChCapabilityFDD-v380ext
>             {
>             }
>           },
>           v3a0NonCriticalExtensions
>           {
>             rrcConnectionSetupComplete-v3a0ext
>             {
>             },
>             laterNonCriticalExtensions
>             {
>               v3g0NonCriticalExtensions
>               {
>                 rrcConnectionSetupComplete-v3g0ext
>                 {
>                 },
>                 v4b0NonCriticalExtensions
>                 {
>                   rrcConnectionSetupComplete-v4b0ext
>                   {
>                   },
>                   v590NonCriticalExtensions
>                   {
>                     rrcConnectionSetupComplete-v590ext
>                     {
>                       ue-RadioAccessCapability-v590ext
>                       {
>                         dl-CapabilityWithSimultaneousHS-DSCHConfig
kbps384,
>                         pdcp-Capability-r5-ext
>                         {
>                           supportForRfc3095ContextRelocation TRUE,
>                           maxHcContextSpace by131072
>                         },
>                         rlc-Capability-r5-ext
>                         {
>                           totalRLC-AM-BufferSize kb750
>                         },
>                         physicalChannelCapability
>                         {
>                           fdd-hspdsch supported :
>                             {
>                               hsdsch-physical-layer-category 12,
>                               dummy TRUE,
>                               dummy2 FALSE
>                             },
>                           tdd384-hspdsch unsupported : NULL,
>                           tdd128-hspdsch unsupported : NULL
>                         },
>                         multiModeRAT-Capability-v590ext
>                         {
>                           supportOfUTRAN-ToGERAN-NACC FALSE
>                         }
>                       },
>                       ue-RATSpecificCapability-v590ext
>                       {
>                         geranIu-RadioAccessCapability '001'B
>                       }
>                     }
>                   }
>                 }
>               }
>             }
>           }
>         }
>       }
>     }
> }
>
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
>
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
>   

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev