All,
Whilst doing the latest lot of updates, I've found an error in the current FN draft. It is to do with the way default_methods are used. To recap, default_methods are referred to if and only if there is no encoding given for a field in a packet format. If an encoding is given for that field then there is no need to refer to the default: it is just a fall back to use when no other encoding is specified.
In the Appendix B (which I'm currently editing) we have the following in an example:
control_fields = scaled_seq_no;
default_methods =
{
version_no ::= uncompressed_value(2,1);
type ::= irregular(2);
flow_id ::= static;
reserved_flag ::= uncompressed_value(1,0);
% need modulo maths to calculate scaling correctly,
% due to 4 bit wrap around
let(scaled_seq_no:uncomp_value
== ((mod(15 - sequence_no:uncomp_value, 3) * 16
+ sequence_no:uncomp_value) / 3));
scaled_seq_no ::= lsb(1,-1);
};
The problem here is that the default_methods specifies not only the *default* encoding for the field (lsb), but also the binding for the uncompressed value of the field. The default encoding isn't referred to when a packet format specifies an encoding of its own - that fine. The binding for the uncompressed value however should ALWAYS be referred to, since this is what gives the control field its value. Since this binding is in default_methods, it will not always be referred to =(
The way the FN draft is currently written, the solution to this problem is to move the essential bit of code (the "let" statement) into the uc_format encodings list. However, this is not a cure-all since sometimes there will be multiple uc_formats.
The intuitive solution is to put the binding for the uncompressed value of the control field under the control_fields list. Apart from clarifying an issue which is currently not nailed down in the draft (whether or not a field encodings list can be specified for control_fields), it actually reads really nicely:
control_fields = scaled_seq_no %[ 4 ]
{
% need modulo maths to calculate scaling correctly,
% due to 4 bit wrap around
let(scaled_seq_no:uncomp_value
== ((mod(15 - sequence_no:uncomp_value, 3) * 16
+ sequence_no:uncomp_value) / 3));
};
default_methods =
{
version_no ::= uncompressed_value(2,1);
type ::= irregular(2);
flow_id ::= static;
reserved_flag ::= uncompressed_value(1,0);
scaled_seq_no ::= lsb(1,-1);
};
As an aside, since this is really just a clarification it shouldn't affect the current packet formats as far as I can see.
I thought I'd better post this in case there were any objections - it strikes me this could be viewed as more than just an editing issue!
Regards
Raffles
_______________________________________________
Rohc mailing list
Rohc at ietf.org
https://www1.ietf.org/mailman/listinfo/rohc