All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eddie Kohler <kohler@cs.ucla.edu>
To: dccp@vger.kernel.org
Subject: Re: QUESTION : Feature length about the non-negotiable feature
Date: Tue, 17 Jun 2008 14:08:08 +0000	[thread overview]
Message-ID: <4857C548.8000008@cs.ucla.edu> (raw)
In-Reply-To: <48579530.4010807@cn.fujitsu.com>

Implementing this option as variable length is not RFC compliant.  If you 
would like to be forwarded the discussion about fixed vs. variable length -- 
the option was originally variable length -- please let me know.  Until then 
it is best to follow the RFC, assuming that you are trying to implement DCCP 
rather than something else.

Eddie


Gerrit Renker wrote:
> Quoting Wei Yongjun:
>> Now non-negotiable feature does not has a fix size, it's length is  
>> decide by the value of the non-negotiable feature. For example, the  
>> client send Sequence Window Feature as the following: 0x23 0x04 0x03  
>> 0x64, the Sequence Window Feature has the length of 1-byte only.
>>
>> But RFC4340 said:
>>
>> 7.5.2.  Sequence Window Feature
>>   Sequence Window has feature number 3 and is non-negotiable.  It takes  
>> 48-bit (6-byte) integer values, like DCCP sequence numbers.  Change  and 
>> Confirm options for Sequence Window are therefore 9 bytes long.
>>
>> Is this correct? Or there are some RFCs said the non-negotiable feature  
>> has variable length?
>>
> You are correct - the RFC states fixed lenghts, even if values can be
> communicated in much smaller options.
> 
> The implementation does not implement the fixed lengths suggested by the
> RFC, since this does not make sense. The implementation will always chose
> the smallest-possible container length.
> 
> I believe that this is the preferrable approach. In particular since
> DCCP is a protocol which has a special header flag (`X') to allow saving
> 3 bytes. Why use 6 bytes when the value fits comfortably in a single
> byte?
> 
> Moreover, a lot of problems are generated by all these copious option
> lengths - unless using very small payloads, it is easily possible to
> exceed the maximum packet size.
> 
> Thus, although the RFC says otherwise, I think that using the smallest
> option size for a given value is the right thing to do.
> --
> To unsubscribe from this list: send the line "unsubscribe dccp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-06-17 14:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-17 10:42 QUESTION : Feature length about the non-negotiable feature Wei Yongjun
2008-06-17 11:02 ` Gerrit Renker
2008-06-17 14:08 ` Eddie Kohler [this message]
2008-06-18  0:56 ` Wei Yongjun
2008-06-18  6:36 ` Gerrit Renker
2008-06-18  8:16 ` Gerrit Renker
2008-06-19  7:18 ` Wei Yongjun
2008-06-19  8:21 ` Gerrit Renker
2008-06-19 11:42 ` Eddie Kohler
2008-06-19 13:38 ` Gerrit Renker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4857C548.8000008@cs.ucla.edu \
    --to=kohler@cs.ucla.edu \
    --cc=dccp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.