Subject: [Dime] rfc3588 query

From: Vijay Iyengar <[email-masked]>
Date: Thu, 11 Jun 2009 19:58:05 +0200

Hi ,

I have a question or I am confused.

The command flags as defined in Chapter 3 in RFC3588 are as below

       0 1 2 3 4 5 6 7
      +-+-+-+-+-+-+-+-+
      |R P E T r r r r|
      +-+-+-+-+-+-+-+-+

How would exactly this look on the wire? Will be 0x80 or 0x01? I am
getting confused with the illustration of the DIAMETER header format
and the bits.

Thanks in advance.

Regards
Vj

3. Diameter Header

   A summary of the Diameter header format is shown below.  The fields
   are transmitted in network byte order.

    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
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |    Version    |                 Message Length                |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   | command flags |                  Command-Code                 |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                         Application-ID                        |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      Hop-by-Hop Identifier                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                      End-to-End Identifier                    |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  AVPs ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-

   Version
      This Version field MUST be set to 1 to indicate Diameter Version
      1.

   Message Length
      The Message Length field is three octets and indicates the length
      of the Diameter message including the header fields.

   Command Flags
      The Command Flags field is eight bits.  The following bits are
      assigned:

       0 1 2 3 4 5 6 7
      +-+-+-+-+-+-+-+-+
      |R P E T r r r r|
      +-+-+-+-+-+-+-+-+

      R(equest)   - If set, the message is a request.  If cleared, the
                    message is an answer.
      P(roxiable) - If set, the message MAY be proxied, relayed or
                    redirected.  If cleared, the message MUST be
                    locally processed.
      E(rror)     - If set, the message contains a protocol error,
                    and the message will not conform to the ABNF
                    described for this command.  Messages with the 'E'

---

From: Jan Nordqvist <[email-masked]>
Date: Thu, 11 Jun 2009 11:17:51 -0700

VJ,

It is per IETF standard, i.e. only R set would appear as 0x80 in your 
computer memory receive buffer. (On the wire it would appear as a pulse 
train :)

Jan Nordqvist

Vijay Iyengar wrote:
> _______________________________________________
> DiME mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/dime
>
>

---

From: "Glen Zorn" <[email-masked]>
Date: Fri, 12 Jun 2009 12:03:14 +0700

Vijay Iyengar [mailto://[email-masked]] writes:

...

> The command flags as defined in Chapter 3 in RFC3588 are as below

It _is_ different from the way in which bit are usually numbered in, for
example, computer science textbooks (where the bits are normally numbered
from right to left w/the least significant bit numbered zero (i.e., the
number of the bit corresponds to its binary exponent)).  In Diameter (and
RADIUS and PPP), bits are labeled in order of transmission, from left to
right.

...