Subject: [Sigtran] IUA: Bit order in DLCI field... please explain again

From: Pascal Bouveron <[email-masked]>
Date: Wed, 12 Jun 2002 12:19:22 -0400

Hi,

After having browsed into the mail archives about this subject, i found answers a bit confusing.
I would like to make absolutely sure about the DLCI encoding format within the DLCI Parameter of the IUA.

Would the DLCI be coded as follows (format #1): (bit 0 is transmitted first and is the MSBit)

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |0|S|  SAPI     |1|      TEI    |                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

With SAPI=0 and TEI=0, the 32-bit value would then be 0x00800000.
With SAPI=0 and TEI=64=0x40, the 32-bit value would then be 0x00C00000.

Or would it rather be encoded as in format #2 below:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  SAPI     |S|0|      TEI    |1|                               |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

With SAPI=0 and TEI=0, the 32-bit value would then be 0x00010000.
With SAPI=0 and TEI=64=0x40, the 32-bit value would then be 0x00030000.

According to Q.921, the format of the DLCI field is encoded and transmitted in the following order:
(bit 0 is transmitted first, and is the MSBit):

       0                   1           
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |  SAPI     |S|0|      TEI    |1|
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

In my opinion,  format #2 would be the correct format considering that the RFC says
"The DLCI field (including the SAPI and TEI)is coded in accordance with Q.921.".

Using Format #2 would seem more "natural", as the transcription to the Q.921 format is immediate,
whereas using format #1 would require bit-inversion in each (8-bits) octet of the DLCI value
before encoding it into a Q.921 frame.

However, I faced DLCI format mismatch when trying to interop with several other
vendors' IUA devices, which where obviously using Format #1,
i.e with SAPI=0 and TEI=0, the 32-bit value is 0x00800000.

Even the Ethereal analyzer decodes the DLCI as in Format #1.

So the question is: Format #1 or Format #2 ?

Thanks,
Pascal Bouveron -- Netbricks (formerly Omnitel) 
mailto:[email-masked] -- http://www.netbricks.com

_______________________________________________
Sigtran mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/sigtran

---

From: [email-masked]
Date: Mon, 17 Jun 2002 12:17:48 +0530

Hi Pascal Bouveron ,
I agree with you that format #2 is correct and should be used/implemented,
except that, the value you have mentioned for SAPI = 0, TEI = 64.
In this case, the 32-bit value would NOT then be 0x00030000.
It would be 0x00810000.

Here the thumb rule is,

for TEI, if you want to put value "X", then in while
setting the value, set 2*X+1.
for SAPI, if you want to put value "Y", then in while
setting the value, set 4*Y.

thanks,
Dipak

Pascal Bouveron <[email-masked]> on 06/12/2002 10:49:22 PM

To:   "[email-masked]" <[email-masked]>
cc:    (bcc: Dipak Bash/HSS)

Subject:  [Sigtran] IUA: Bit order in DLCI field... please explain again

Hi,

After having browsed into the mail archives about this subject, i found answers
a bit confusing.
I would like to make absolutely sure about the DLCI encoding format within the
DLCI Parameter of the IUA.

Would the DLCI be coded as follows (format #1): (bit 0 is transmitted first and
is the MSBit)

       0                   1                   2                   3

       0                   1                   2                   3

According to Q.921, the format of the DLCI field is encoded and transmitted in
the following order:
(bit 0 is transmitted first, and is the MSBit):

       0                   1

In my opinion,  format #2 would be the correct format considering that the RFC
says
"The DLCI field (including the SAPI and TEI)is coded in accordance with Q.921.".

Using Format #2 would seem more "natural", as the transcription to the Q.921
format is immediate,
whereas using format #1 would require bit-inversion in each (8-bits) octet of
the DLCI value
before encoding it into a Q.921 frame.

Thanks,