The MPLS WG Archive

Cell Relay Retreat>MPLS WG Archive>month:2001-Nov> msg00241



[Date Prev][Date Next][Thread Prev][Thread Next]  
  [Date Index][Thread Index][Author Index][Subject Index]

Session attribute object

  • From: schultz@io.iol.unh.edu
  • Date: Wed, 28 Nov 2001 14:56:21 -0500 (EST)
  • cc: mpls@UU.NET


Hello David,

There is an alternative interpretation that may also have meaning.
Regardless of the multiple interpretations, this paragraph should be
clarified in the next draft update.

[From RSVP-TE]
"The contents of the Session Name field are a string, typically of
display-able characters.  The Length MUST always be a multiple of 4
and MUST be at least 8."

Here I suspect the second sentence could also be referring to the Name
Field Length referred to in the first sentence.  Maybe this sentence
would be more clear if written in the following way:

"The total length of the Session Name field must always be a multiple of
4 and MUST be at least 8."

-----
[From RSVP-TE]
"For an object length that is not a multiple of 4, the object is padded
with trailing NULL characters.  The Name Length field contains the actual
string length."

These two sentences could also be clarified in the following way:

"For a Session Name length that is not a multiple of 4, the Session
Name field is padded with trailing NULL characters.  The Name Length field
contains the actual string length."

The reasoning here is that the object length will never not be a multiple
of 4.  If an object length is, the RSVP-TE draft is contradicting RFC
2205.

Thanks,
-Ben

On Wed, 28 Nov 2001, David Charlap wrote:

> schultz@io.iol.unh.edu wrote:
> >
> > I am experiencing difficulty understanding the following piece of the
> > RSVP-TE draft (from section 4.7.3):
> >
> > "The contents of the Session Name field are a string, typically of
> > display-able characters.  The Length MUST always be a multiple of 4
> > and MUST be at least 8.  For an object length that is not a multiple
> > of 4, the object is padded with trailing NULL characters.  The Name
> > Length field contains the actual string length."
> >
> > There are 2 issues here:
> >
> > 1. I interpret "Length" in the second sentence to mean object
> > length.  Is that correct?  Or is it name length?
>
> Object length.
>
> > 2. Isn't the session name field padded with NULL characters and not
> > the object length field?
>
> Yes.  Since the object length must be a multiple of 4, but the name does
> not, any space between the end of the name and the end of the object
> should be padded with NULL characters.
>
> Note, however, that if the name is a multiple of 4 bytes, then the last
> byte of the name is the last byte of the object.  There is no
> requirement that there be a NULL character following the name.  Be sure
> your code treats it as a counted string and not a null-terminated string
> when parsing the object.
>
> > My understanding of object length fields is that they are always
> > multiples of 4.  Is this object length field an exception?  I would
> > think that the pad characters would be included in an object length
> > field or the parser would not work.
>
> Objects are always multiples of 4 bytes long.  This is a hard
> requirement from RFC 2205.  The pad characters described exist
> specifically for the purpose of adhering to this requirement.
>
> -- David
>