Skip to content
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

Length restriction for nested message not considered #356

Closed
6 tasks done
treiher opened this issue Jul 20, 2020 · 0 comments · Fixed by #493
Closed
6 tasks done

Length restriction for nested message not considered #356

treiher opened this issue Jul 20, 2020 · 0 comments · Fixed by #493
Assignees
Labels
bug generator Related to generator package (SPARK code generation)

Comments

@treiher
Copy link
Collaborator

treiher commented Jul 20, 2020

Currently, two different bounds are stored in a context:

  • The byte range (Buffer_First, Buffer_Last) of the memory used for the message.
  • The bit range (First, Last) defining the beginning and end of the message.

While the bit range is fixed when parsing a message, Last is changed during the creation of a message. Last can be increased as long as it does not exceed Buffer_Last (converted to bit). This is sufficient if only one message is considered. But as soon as the length is restricted by an underlying message, a hard limit for Last is needed which is possibly lower then Buffer_Last.

The following cases must be considered:

  • Length of contained message is defined by containing message (e.g., IPv4, UDP)
  • Length of contained message is undefined, but must be in certain bounds (e.g., Ethernet II, DHCP, ICMP)

Related issues:

  • Length of contained message should only be settable to correct value
  • Length should not be required for setting opaque field when message length is defined by containing message

Requires:

@treiher treiher added bug generator Related to generator package (SPARK code generation) labels Jul 20, 2020
@treiher treiher added this to To do in RecordFlux 0.4.1 via automation Jul 20, 2020
@treiher treiher added this to To do in RecordFlux 0.5 via automation Jul 22, 2020
@treiher treiher removed this from To do in RecordFlux 0.4.1 Jul 22, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Nov 6, 2020
treiher added a commit that referenced this issue Nov 6, 2020
- Consider size restrictions of refined fields
- Allow setting array fields with size defined by message size

Ref. #356, #486
treiher added a commit that referenced this issue Nov 10, 2020
- Consider size restrictions of refined fields
- Allow setting array fields with size defined by message size

Ref. #356, #486
@treiher treiher moved this from In progress to Done in RecordFlux 0.5 Nov 10, 2020
treiher added a commit that referenced this issue Nov 10, 2020
- Consider size restrictions of refined fields
- Allow setting array fields with size defined by message size

Ref. #356, #486
treiher added a commit that referenced this issue Nov 11, 2020
- Consider size restrictions of refined fields
- Allow setting array fields with size defined by message size

Ref. #356, #486
treiher added a commit that referenced this issue Nov 16, 2020
- Consider size restrictions of refined fields
- Allow setting array fields with size defined by message size

Ref. #356, #486
RecordFlux 0.5 automation moved this from Done to Merged Nov 17, 2020
treiher added a commit that referenced this issue Nov 17, 2020
- Consider size restrictions of refined fields
- Allow setting array fields with size defined by message size

Ref. #356, #486
treiher added a commit that referenced this issue Jan 22, 2021
The condition was a remnent of the differentiation between bounded and
unbounded opaque fields. Due to the changes for #356 this is not needed
anymore.
treiher added a commit that referenced this issue Jan 22, 2021
The condition was a remnent of the differentiation between bounded and
unbounded opaque fields. Due to the changes for #356 this is not needed
anymore.
treiher added a commit that referenced this issue Jan 22, 2021
The condition was a remnant of the differentiation between bounded and
unbounded opaque fields. Due to the changes for #356 this is not needed
anymore.
treiher added a commit that referenced this issue Jan 25, 2021
The condition was a remnant of the differentiation between bounded and
unbounded opaque fields. Due to the changes for #356 this is not needed
anymore.
@treiher treiher mentioned this issue Aug 4, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug generator Related to generator package (SPARK code generation)
Projects
No open projects
RecordFlux 0.5
  
Merged
Development

Successfully merging a pull request may close this issue.

1 participant