-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message format defined by prior negotiation #609
Labels
architectural decision
Discussion of design decision
Comments
Open
package Test is
type Length is range 1 .. 2**14 - 1 with Size => 16;
type Message (Length : Length; Extended : Boolean) is··
message
Data : Opaque
with Size => Length * 8
then Extension
if Extended = True
then null
if Extended = False;
Extension : Opaque
with Size => Length * 8;
end message;
generic
C : Channel with Readable, Writable;
session Session with
Initial => Receive,
Final => Terminated
is
M_R : Message;
begin
state Receive
is
begin
M_R'Reset (Length => 2, Extended => False);
C'Read (M_R);
transition
then Reply
if M_R'Valid
then Terminated
end Receive;
state Reply
is
begin
C'Write (Message'(Length => M_R.Length, Extended => True, Data => M_R.Data, Extension => [3, 4]));
transition
then Terminated
exception
then Error
end Reply;
state Error
is
begin
transition
then Terminated
end Error;
state Terminated is null state;
end Session;
end Test; |
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 7, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
treiher
added a commit
that referenced
this issue
Sep 13, 2021
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context and Problem Statement
There are multiple existing communication protocols where the message format is defined by prior negotiation. The field length (Componolit/systematization-binary-schemas#28) as well as the field type (Componolit/systematization-binary-schemas#53) can be affected.
Considered Options
O1 Generic message type with types as formal parameters (#133)
+ Also usable for different purposes (cf. #133)
− Not directly applicable for variable-length opaque field in DTLS 1.3, NTP, QUIC
− Probably only instances of generic type could be verified
O2 Variant message type with scalars as discriminants
The discriminant could be used in conditions (SPDM, TLS 1.3) and in length aspects (DTLS 1.3, NTP, QUIC).
+ Applicable in all known instances
+ Extension of message verification is simple: references to discriminants can be handled similar as references to fields
Decision Outcome
O2 is the only viable option.
Tasks
The support for parameterized messages in PyRFLX will be added in a subsequent issue (#743).
The text was updated successfully, but these errors were encountered: