HI,
On Tue, August 23, 2022 6:30 am, Toerless Eckert wrote:
> On Mon, Aug 22, 2022 at 08:43:57PM +0200, Carsten Bormann wrote:
>> Grasp-option really is the lower layer of extensibility, which allows
>> you to create new messages that then conform to message-structure.
>> These should provide maximum flexibility.
>>
>> (Message should be/employ a socket, to make this extension point more
>> visible.)
>
> Then let me understand the IMHO fundamental issue about sockets, using the
> RFC8610 3.9 tcp-header example:
>
> Lets say i define:
>
> tcp-header-structure [ tcp-header ]
>
> And i have not defined any $$tcp-option
>
> When an implementation of this now receives a CBOR array with not only
> 2 elements (seq, ack), but with more elements:
Well, if you go back to 3.9, it defines tcp-header as:
tcp-header = {seq: uint, ack: uint, * $$tcp-option}
This means tcp-header is a map. (Not a group).
> MUST it recognize this as a tcp-header-structure - according to CBOR
> parsing rules ?
If you define tcp-header-structure like that and get an array of anything
more than a single map element (with at least two entries), then no, it
would NOT be a valid tcp-header-structure.
> (the way i read rfc8610, the answer is no)
>
> MUST it ignore the array elements after ack ?
Let me rephrase this question. If you get a map structure that has at
least two entries (and two of the keys must be seq and ack), then it's a
tcp-header. If it has fewer than two entries, or you don't have a seq and
ack key in the map, then it is not a tcp-header object.
> Cheers
> Toerless
-derek
> _______________________________________________
> CBOR mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/cbor
>
--
Derek Atkins 617-623-3745
[email protected] www.ihtfp.com
Computer and Internet Security Consultant
_______________________________________________
Anima mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/anima